JP2008165657A - Image restoration device, image restoration method, and image restoration program - Google Patents
Image restoration device, image restoration method, and image restoration program Download PDFInfo
- Publication number
- JP2008165657A JP2008165657A JP2006356778A JP2006356778A JP2008165657A JP 2008165657 A JP2008165657 A JP 2008165657A JP 2006356778 A JP2006356778 A JP 2006356778A JP 2006356778 A JP2006356778 A JP 2006356778A JP 2008165657 A JP2008165657 A JP 2008165657A
- Authority
- JP
- Japan
- Prior art keywords
- image
- image information
- restoration
- point spread
- spread function
- 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
- 238000000034 method Methods 0.000 title claims description 47
- 238000001514 detection method Methods 0.000 claims abstract description 34
- 230000004044 response Effects 0.000 claims abstract description 31
- 238000003384 imaging method Methods 0.000 claims abstract description 19
- 238000001228 spectrum Methods 0.000 claims description 22
- 238000013215 result calculation Methods 0.000 claims description 13
- 238000005520 cutting process Methods 0.000 claims description 10
- 230000001131 transforming effect Effects 0.000 claims description 5
- 208000024891 symptom Diseases 0.000 claims 1
- 230000006870 function Effects 0.000 description 56
- 230000008569 process Effects 0.000 description 36
- 230000008859 change Effects 0.000 description 9
- 230000015556 catabolic process Effects 0.000 description 6
- 238000006731 degradation reaction Methods 0.000 description 6
- 238000009826 distribution Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 230000006866 deterioration Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 238000005070 sampling Methods 0.000 description 3
- 230000032258 transport Effects 0.000 description 3
- 230000007723 transport mechanism Effects 0.000 description 3
- 238000003860 storage Methods 0.000 description 2
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
本発明は、撮像装置から得られる画像の振れを表す振れ検出情報を含む劣化画像情報を、ウィーナフィルタを使用して原画像情報を復元する画像復元装置、画像復元方法及び画像復元プログラムに関する。 The present invention relates to an image restoration apparatus, an image restoration method, and an image restoration program for restoring original image information using degraded image information including shake detection information representing shake of an image obtained from an imaging apparatus using a Wiener filter.
従来の画像復元装置としては、例えば劣化関数を用いて、劣化画像から元画像に近い復元画像を復元する際に、劣化関数を構成する振れ方向、振れ量等の劣化パラメータを変化させながら劣化画像を復元し、復元された画像の画像復元度を求め、該画像復元度を基に劣化パラメータを選択して劣化関数を導出し、該劣化関数により復元画像を生成するようにした画像処理方法及び装置が提案されている(例えば特許文献1参照)。 As a conventional image restoration device, for example, when restoring a restored image close to the original image from a degraded image using a degradation function, the degraded image is changed while changing degradation parameters such as a shake direction and a shake amount constituting the degradation function. An image processing method for obtaining an image restoration degree of the restored image, selecting a deterioration parameter based on the degree of image restoration, deriving a deterioration function, and generating a restored image using the deterioration function; An apparatus has been proposed (see, for example, Patent Document 1).
しかしながら、上記特許文献1に記載の従来例にあっては、振れ方向、振れ量等の劣化パラメータを変化させるだけであるので、劣化画像を復元する際のリンギングを抑制することはできない。
このため、従来、劣化画像情報の雑音に関する統計的性質が既知の場合、その情報を利用し、逆フィルタの雑音に対する弱点を補う方法としてウィーナフィルタが知られている(非特許文献1参照)。このウィーナフィルタは元画像f(x,y)と復元画像f^(x,y)との平均2乗誤差が最小となるような復元方法であり、その周波数応答M(u,v)は下記のようにして算出される。
However, in the conventional example described in
For this reason, a Wiener filter is conventionally known as a method for compensating for the weakness of the inverse filter using noise when the statistical properties of the degraded image information regarding noise are known (see Non-Patent Document 1). This Wiener filter is a restoration method that minimizes the mean square error between the original image f (x, y) and the restored image f ^ (x, y), and the frequency response M (u, v) is as follows. It is calculated as follows.
観測された画像のフーリエ変換G(u,v)に周波数応答M(u,v)を掛けた後フーリエ逆変換すると、復元画像が求まる。通常は[Pnn(u,v)/Pff(u,v)を正確に求めることができないため、適当な定数Γで近似することが多い。ウィーナフィルタでは、この項があるため、H(u,v)=0となるような周波数でM(u,v)=0となり、逆フィルタのような不安定さは生じない。
しかしながら、上記非特許文献1に記載された従来例にあっては、ウィーナフィルタの周波数応答M(u,v)を算出するために適当な近似定数Γを使用するようにしているので、この近似定数Γが大きいと、リンギングの問題は改善されるが、鮮明さが不十分となり、逆に近似定数Γが小さいと、鮮明になるが、リンギングが発生することになり、最適なΓを決定することが困難であるという未解決の課題がある。
However, in the conventional example described in Non-Patent
そこで、本発明は、上記従来例の未解決の課題に着目してなされたものであり、リンギングを抑制しながら鮮明さを確保することができるウィーナフィルタを使用した画像復元装置、画像復元方法及び画像復元プログラムを提供することを目的としている。 Therefore, the present invention has been made paying attention to the unsolved problems of the above conventional example, and an image restoration apparatus, an image restoration method, and an image restoration method using a Wiener filter capable of ensuring sharpness while suppressing ringing. It aims to provide an image restoration program.
本発明の第1の技術手段は、撮像装置から得られる画像の振れを表す振れ検出情報を含む劣化画像情報を、ウィーナフィルタを使用して原画像情報を復元する画像復元装置であって、前記劣化画像情報に含まれる前記振れ検出情報に基づいて前記ウィーナフィルタの点広がり関数を推定する点広がり関数推定手段と、前記劣化画像情報から切り出した局所領域画像情報毎に前記点広がり関数と最適な近似定数とに基づいて算出される前記ウィーナフィルタの周波数応答に基づいて局所領域復元画像情報を生成する画像復元手段とを有することを特徴としている。 A first technical means of the present invention is an image restoration device that restores original image information by using a Wiener filter for degraded image information including shake detection information representing shake of an image obtained from an imaging device, Point spread function estimating means for estimating the point spread function of the Wiener filter based on the shake detection information included in the deteriorated image information, and the point spread function and the optimum for each local area image information cut out from the deteriorated image information And image restoration means for generating local region restoration image information based on the frequency response of the Wiener filter calculated based on the approximate constant.
この第1の技術手段では、角速度データ等の撮像装置の振れ検出情報を含む劣化画像情報から振れ検出情報に基づいてウィーナフィルタの点広がり関数を算出し、劣化画像情報から切り出した局所領域画像情報毎に、点広がり関数と最適な近似定数とに基づいて算出されるウィーナフィルタの周波数応答に基づいて局所領域復元画像情報を生成するので、劣化画像情報の局所領域画像情報毎に最適な近似定数を設定することができ、リンギングを抑制しながら鮮明さを確保した画像復元を行うことができる。 In the first technical means, the local area image information cut out from the deteriorated image information by calculating the point spread function of the Wiener filter based on the shake detection information from the deteriorated image information including the shake detection information of the imaging device such as angular velocity data. Since the local area restoration image information is generated based on the frequency response of the Wiener filter calculated based on the point spread function and the optimum approximation constant for each time, the optimum approximation constant for each local area image information of the degraded image information Can be set, and image restoration can be performed while ensuring sharpness while suppressing ringing.
また、第2の技術手段は、上記第1の技術手段において、前記振れ検出情報は撮像装置の上下及び左右の振れを検出する角速度センサの出力情報であることを特徴としている。
この第2の技術手段においては、撮像装置の前後左右の振れを角速度センサで正確に検出することができるので、この角速度センサの出力情報を使用して点広がり関数を算出することにより、劣化画像情報の振れに応じた点広がり関数を算出することができる。
Further, the second technical means is characterized in that, in the first technical means, the shake detection information is output information of an angular velocity sensor that detects vertical and horizontal shakes of the imaging apparatus.
In the second technical means, since the angular velocity sensor can accurately detect the back-and-forth, right-and-left shake of the imaging apparatus, the degradation image is calculated by calculating the point spread function using the output information of the angular velocity sensor. It is possible to calculate a point spread function according to information fluctuation.
さらに、本発明の第3の技術手段は、第1又は第2の技術手段において、前記点広がり関数推定手段は、前記振れ検出情報から点広がり関数のフーリエスペクトルを算出するように構成されていることを特徴としている。
この第3の技術手段では、点広がり関数推定手段で点広がり関数のフーリエスペクトルを算出するので、このフーリエスペクトルと、その共役複素数と、近似定数Γとからウィーナフィルタの周波数応答を算出することができる。
Further, the third technical means of the present invention is the first or second technical means, wherein the point spread function estimating means is configured to calculate a Fourier spectrum of the point spread function from the shake detection information. It is characterized by that.
In the third technical means, the point spread function estimating means calculates the Fourier spectrum of the point spread function, so that the frequency response of the Wiener filter can be calculated from this Fourier spectrum, its conjugate complex number, and the approximate constant Γ. it can.
さらにまた、本発明の第4の技術手段は、第1〜第3の技術手段の1つにおいて、前記点広がり関数推定手段は、前記振れ検出情報の振れ幅が大きいときに当該触れ検出情報をスプライン補間処理することを特徴としている。
この第4の技術手段では、振れ検出情報の触れ幅が大きいときに振れ検出情報をスプライン補間処理するので、より多くの振れ検出情報を得ることができ、正確な点広がり関数を算出することができる。
Furthermore, the fourth technical means of the present invention is the one of the first to third technical means, wherein the point spread function estimating means outputs the touch detection information when a shake width of the shake detection information is large. It is characterized by spline interpolation processing.
In the fourth technical means, since the shake detection information is spline-interpolated when the touch width of the shake detection information is large, more shake detection information can be obtained and an accurate point spread function can be calculated. it can.
なおさらに、本発明の第5の技術手段は、上記第1乃至第4の技術手段の1つにおいて、前記点広がり関数推定手段は、前記振れ検出情報をガウスフィルタ処理することを特徴としている。
この第5の技術手段では、振れ検出情報をガウスフィルタ処理することにより、振れ検出情報が平滑化されてより正確な点広がり関数を算出することができる。
Still further, according to a fifth technical means of the present invention, in any one of the first to fourth technical means, the point spread function estimating means performs a Gaussian filter process on the shake detection information.
In the fifth technical means, the shake detection information is smoothed by performing Gaussian filter processing on the shake detection information, and a more accurate point spread function can be calculated.
また、本発明の第6の技術手段は、第1〜第5の技術手段の1つにおいて、前記画像復元手段は、前記劣化画像情報から局所領域画像情報を切り出す画像情報切り出し手段と、該画像情報切り出し手段で切り出した前記局所領域画像情報をフーリエ変換した空間周波数領域情報に、前記点広がり関数推定手段で推定した前記点広がり関数と所定数の異なる近似定数Γとに基づいて算出されたウィーナフィルタの周波数応答を掛けて所定数の復元結果を算出する復元結果算出手段と、該復元結果算出手段で算出した所定数の前記復元結果をフーリエ逆変換して所定数の局所領域復元画像情報を生成する復元画像生成手段と、該復元画像生成手段で復元した所定数の前記局所領域復元画像情報と前記局所領域画像情報との平均二乗誤差が最小となる前記局所領域復元画像情報を選択する復元画像選択手段とを有することを特徴としている。 According to a sixth technical means of the present invention, in any one of the first to fifth technical means, the image restoration means includes image information cutout means for cutting out local area image information from the degraded image information, and the image. Wiener calculated on the basis of the point spread function estimated by the point spread function estimating means and a predetermined number of different approximation constants Γ to the spatial frequency domain information obtained by Fourier transforming the local area image information cut out by the information cutout means A restoration result calculation unit that calculates a predetermined number of restoration results by multiplying the frequency response of the filter, and a predetermined number of local region restoration image information by inverse Fourier transforming the predetermined number of restoration results calculated by the restoration result calculation unit. The restored image generating means to be generated, and the mean square error between the local area restored image information and the local area image information restored by the restored image generating means is minimized. It is characterized by having a restored image selection means for selecting the local area restored image information.
この第6の技術手段では、画像復元手段で、画像切り出し手段で切り出した局所領域画像情報をフーリエ変換した空間周波数領域情報に、推定した点広がり関数と所定数の異なる近似定数Γとに基づいて算出されたウィーナフィルタの周波数応答を掛けて所定数の復元結果を算出し、算出した所定数の復元結果をフーリエ逆変換して所定数の局所領域復元画像情報を生成し、復元した所定数の局所領域復元画像情報と前記局所領域画像情報との平均二乗誤差が最小となる復元画像情報を選択するので、局所領域画像情報毎に最適な近似定数で復元した局所領域復元画像情報を生成することができる。 In the sixth technical means, the image restoration means uses the Fourier transform of the local area image information cut out by the image cut-out means based on the estimated point spread function and a predetermined number of different approximation constants Γ. A predetermined number of restoration results are calculated by multiplying the calculated frequency response of the Wiener filter, and a predetermined number of local region restored image information is generated by performing Fourier inverse transform on the calculated predetermined number of restoration results. Since the restored image information that minimizes the mean square error between the local area restored image information and the local area image information is selected, generating the local area restored image information restored with the optimal approximation constant for each local area image information Can do.
さらに、本発明の第7の技術手段は、第6の技術手段において、前記画像情報切り出し手段は、前記局所画像領域を含む拡大局所画像情報を切り出すように構成され、前記復元画像生成手段は、フーリエ逆変換した前記復元結果算出手段で算出した復元結果から前記局所画像領域を切り出して前記局所領域復元画像情報を生成するように構成されていることを特徴としている。 Further, according to a seventh technical means of the present invention, in the sixth technical means, the image information cutout means is configured to cut out enlarged local image information including the local image region, and the restored image generation means includes: The local image area is cut out from the restoration result calculated by the restoration result calculation means obtained by inverse Fourier transform, and the local area restoration image information is generated.
この第7の技術手段では、画像切り出し手段で、局所画像領域を含むこれより大きい拡大局所画像情報を切り出し、復元画像生成手段で、フーリエ逆変換した復元結果算出手段で算出した復元結果から前記局所画像領域を切り出して前記局所領域復元画像情報を生成するようにしているので、振れ幅による折り返しの影響を受けることなく正確な局所領域の画像復元を行うことができる。 In the seventh technical means, the image cutout means cuts out the enlarged local image information including the local image area, and the restoration image generation means calculates the local image from the restoration result calculated by the restoration result calculation means obtained by inverse Fourier transform. Since the local area restoration image information is generated by cutting out the image area, it is possible to accurately restore the local area image without being affected by the aliasing due to the shake width.
さらにまた、第8の技術手段は、第6又は第7の技術手段の1つにおいて、前記復元結果算出手段は、前記点広がり関数推定手段で算出した点広がり関数のフーリエスペクトルと、当該フーリエスペクトルの共役複素数と、前記近似定数Γとから周波数応答を算出するように構成されていることを特徴としている。
この第8の技術手段では、点広がり関数のフーリエスペクトルと、その共役複素数と、近似定数Γからウィーナフィルタの周波数応答を算出するので、近似定数Γを異なる値とすることにより、近似定数Γの異なる種々の周波数応答を算出することができる。
Furthermore, the eighth technical means is one of the sixth and seventh technical means, wherein the restoration result calculating means is a Fourier spectrum of the point spread function calculated by the point spread function estimating means, and the Fourier spectrum. The frequency response is calculated from the conjugate complex number and the approximate constant Γ.
In the eighth technical means, the frequency response of the Wiener filter is calculated from the Fourier spectrum of the point spread function, its conjugate complex number, and the approximate constant Γ. Therefore, by setting the approximate constant Γ to a different value, Various different frequency responses can be calculated.
なおさらに、本発明の第9の技術手段は、撮像装置から得られる画像の振れを表す振れ検出情報を含む劣化画像情報を、ウィーナフィルタを使用して原画像情報を復元する画像復元方法であって、点広がり関数推定手段によって前記劣化画像情報に含まれる前記振れ検出情報に基づいて前記ウィーナフィルタの点広がり関数を推定する点広がり関数推定ステップと、画像復元手段によって前記劣化画像情報から切り出した局所領域画像情報毎に前記点広がり関数と最適な近似定数とに基づいて算出される前記ウィーナフィルタの周波数応答に基づいて局所領域復元画像情報を生成する画像復元ステップとを有することを特徴としている。 Still further, the ninth technical means of the present invention is an image restoration method for restoring deteriorated image information including shake detection information indicating shake of an image obtained from an imaging apparatus using a Wiener filter to restore original image information. A point spread function estimating step for estimating a point spread function of the Wiener filter based on the shake detection information included in the deteriorated image information by a point spread function estimating means, and a clipped from the deteriorated image information by an image restoring means. An image restoration step of generating local area restored image information based on the frequency response of the Wiener filter calculated based on the point spread function and an optimal approximation constant for each local area image information. .
この第9の技術手段では、前述した第1の技術手段と同様の効果を得ることができる。
さらにまた、本発明の第10の技術手段は、第9の技術手段において、前記画像復元ステップは、画像情報切り出し手段で前記劣化画像情報から局所領域画像情報を切り出す画像情報切り出しステップと、復元結果算出手段で前記画像情報切り出しステップによって切り出した前記局所領域画像情報をフーリエ変換した空間周波数領域情報に、前記点広がり関数推定手段で推定した前記点広がり関数と所定数の異なる近似定数Γとに基づいて算出されたウィーナフィルタの周波数応答を掛けて所定数の復元結果を算出する復元結果算出ステップと、復元画像生成手段で算出した所定数の前記復元結果をフーリエ逆変換して所定数の局所復元画像情報を生成する復元画像生成ステップと、復元画像選択手段で復元した所定数の前記局所領域復元画像情報と前記局所領域画像情報との平均二乗誤差が最小となる前記局所領域復元画像情報を選択する復元画像選択ステップとを備えていることを特徴としている。
In the ninth technical means, the same effect as the first technical means described above can be obtained.
Still further, a tenth technical means of the present invention is the ninth technical means, wherein the image restoration step comprises an image information cutout step of cutting out local area image information from the degraded image information by an image information cutout means, and a restoration result. Based on the spatial frequency domain information obtained by Fourier transforming the local area image information cut out by the image information cutout step by the calculation means, based on the point spread function estimated by the point spread function estimation means and a predetermined number of different approximation constants Γ. A restoration result calculation step for calculating a predetermined number of restoration results by multiplying the frequency response of the Wiener filter calculated in step (a), and a predetermined number of local restorations by inverse Fourier transform of the predetermined number of restoration results calculated by the restoration image generation means A restored image generating step for generating image information, and a predetermined number of the local regions restored by restored image selection means It is characterized by comprising a restored image selection step of selecting the local area restored image information mean square error between the image information and the local region image information is minimized.
この第10の技術手段では、前述した第6の技術手段と同様の効果を得ることができる。
なおさらに、本発明の第11の技術手段は、撮像装置から得られる画像の振れを表す振れ検出情報を含む劣化画像情報を、ウィーナフィルタを使用して原画像情報を復元する画像復元処理をコンピュータに実行させるための画像復元プログラムであって、点広がり関数推定手段によって前記劣化画像情報に含まれる前記振れ検出情報に基づいて前記ウィーナフィルタの点広がり関数を推定する点広がり関数推定ステップと、画像復元手段によって前記劣化画像情報から切り出した局所領域画像情報毎に前記点広がり関数と最適な近似定数とに基づいて算出される前記ウィーナフィルタの周波数応答に基づいて局所領域復元画像情報を生成する画像復元ステップとをコンピュータに実行させることを特徴としている。
この第11の技術手段では、前述した第1の技術手段及び第9の技術手段と同様の効果を得ることができる。
In the tenth technical means, the same effect as in the sixth technical means described above can be obtained.
Still further, according to an eleventh technical means of the present invention, a computer performs image restoration processing for restoring degraded image information including shake detection information representing shake of an image obtained from an imaging apparatus, and restoring original image information using a Wiener filter. A point spread function estimating step for estimating a point spread function of the Wiener filter based on the shake detection information included in the deteriorated image information by a point spread function estimating unit; An image for generating local region restored image information based on the frequency response of the Wiener filter calculated based on the point spread function and an optimal approximation constant for each local region image information cut out from the degraded image information by the restoration means The restoration step is executed by a computer.
In the eleventh technical means, the same effects as those of the first technical means and the ninth technical means described above can be obtained.
また、本発明の第12の技術手段は、第11の技術手段において、前記画像復元ステップは、画像情報切り出し手段で前記劣化画像情報から局所領域画像情報を切り出す画像情報切り出しステップと、復元結果算出手段で前記画像情報切り出しステップによって切り出した前記局所領域画像情報をフーリエ変換した空間周波数領域情報に、前記点広がり関数推定手段で推定した点広がり関数と所定数の異なる近似定数Γとに基づいて算出されたウィーナフィルタの周波数応答を掛けて所定数の復元結果を算出する復元結果算出ステップと、復元画像生成手段で算出した所定数の前記復元結果をフーリエ逆変換して所定数の局所領域復元画像情報を生成する復元画像生成ステップと、復元画像選択手段で復元した所定数の前記局所領域復元画像情報と前記局所領域画像情報との平均二乗誤差が最小となる前記局所領域復元画像情報を選択する復元画像選択ステップとを備えていることを特徴としている。 According to a twelfth technical means of the present invention, in the eleventh technical means, the image restoration step includes an image information cutout step of cutting out local area image information from the degraded image information by an image information cutout means, and a restoration result calculation. The spatial region information obtained by Fourier transforming the local region image information cut out by the image information cut-out step is calculated based on the point spread function estimated by the point spread function estimation unit and a predetermined number of different approximation constants Γ. A restoration result calculation step of calculating a predetermined number of restoration results by multiplying the frequency response of the Wiener filter, and a predetermined number of local region restoration images obtained by inverse Fourier transform of the predetermined number of restoration results calculated by the restoration image generation means A restored image generating step for generating information, and a predetermined number of the local region restored images restored by the restored image selection means; Distribution and the is characterized in that the mean square error between the local area image information and a restored image selecting step of selecting the local area restored image information is minimized.
この第12の技術手段では、前述した第6及び10の技術手段と同様の効果を得ることができる。 In the twelfth technical means, the same effects as in the sixth and tenth technical means described above can be obtained.
以下、本発明の実施の形態を図面に基づいて説明する。
図1は本発明の一実施形態を示す概略構成図であり、図中、1はプリンタであって、このプリンタ1にCD−R装置100、デジタルカメラ120及びホストコンピュータ140が例えばUSBの接続コードを介して接続される。なお、CD−R装置100、例えば被写体を静止画像として撮影する撮像装置としてのデジタルスチルカメラ120及びホストコンピュータ140とプリンタ1との接続は接続コードを使用する場合に限らず無線で画像情報の授受を行うようにしてもよい。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a schematic configuration diagram showing an embodiment of the present invention. In FIG. 1,
そして、プリンタ1は、ヘッドユニット20、用紙搬送機構30、キャリッジ移動機構40、検出器群50、プリンタ側コントローラ60、液晶表示器3、操作ボタン5、及びカードスロット6を有する。また、これらの他に、プリンタ1はホストコンピュータ140と接続するための第1インタフェース12と、デジタルスチルカメラ120やCD−R装置100と接続するための第2インタフェース14とを有している。
The
ヘッドユニット20は、インクを用紙に向けて吐出させるものであり、インクを吐出するヘッド22を有する。このヘッドユニット20は、キャリッジ(図示せず)に取付けられており、キャリッジをキャリッジ移動方向に移動させるキャリッジ移動機構40によって、キャリッジと共に移動する。
用紙搬送機構30は、キャリッジ移動方向と交差する方向に用紙を搬送する。検出器群50は、プリンタ1の状態を検出するためのものであり、例えば、キャリッジの位置を検出するリニア式エンコーダ、紙の搬送量を検出するロータリー式エンコーダ、及び用紙の有無を検出する紙検出器(何れも図示せず)等が含まれる。
The
The
プリンタ側コントローラ60は、プリンタ1の制御を行うものであり、CPU62と、メモリ64と、制御ユニット68とを有する。CPU62は、プリンタ1の全体的な制御を行うための演算処理装置である。メモリ64は、CPU62のプログラムを格納する領域や作業領域等を確保するためのものであり、RAM、EEPROM、ROM等の記憶素子によって構成されている。そして、画像情報の復元時において、メモリ64に復元画像情報が格納される。制御ユニット68は、制御対象となる各部とCPU62との間に配置され、CPU62からのコマンドに基づいてモータ用の駆動信号を生成したり、各部から送られてくる信号を、CPU62が解釈できる形態にして出力したりする。
The printer-
通常、プリンタ1は、ホストコンピュータ140又はデジタルスチルカメラ120から印刷データを受信すると、印刷データに基づいて印刷処理を行う。すなわち、印刷データの受信後、プリンタ側コントローラ60は、用紙搬送機構30に印刷開始位置まで用紙を搬送させ、キャリッジ移動機構40にキャリッジをキャリッジ移動方向に移動させ、キャリッジと共に移動するヘッドから印刷データに基づいてインクを吐出させる。そして、これらの動作が繰り返して行われると、用紙に画像が印刷される。
Normally, when the
さらに、プリンタ1は、ユーザーが操作ボタン5を操作することにより、画像情報のバックアップ処理を行う。このバックアップ処理では、プリンタ側コントローラ60は、カードスロット6に装着されたメモリカード110から画像情報を、CD−R装置100に送出し、CD−Rに記憶させる。
さらにまた、デジタルスチルカメラ120は、カメラレンズ121によって被写体像がその後段に配設された固体撮像素子122に結像される。この固体撮像素子122は、固体撮像素子駆動回路123からの駆動信号によって光電変換を行い、その光電変換出力がカメラ系信号処理部124に供給され、このカメラ系信号処理部124で、サンプリング処理、AGC処理を行った後にA/D変換処理によってデジタルデータに変換してからガンマ補正処理、エンコード処理等が行われて画像メモリ125に入力される。
Further, the
Furthermore, in the digital
画像メモリ125から読出された画像データが液晶ディスプレイ、有機ELディスプレイ等で構成される表示器135に供給されると共に、記録系信号処理部126に出力され、この記録系信号処理部126でJPEG変換等を行ってDRAM、SRAM、フラッシュメモリ等で構成されるメモリカード110に記憶される。
一方、手振れ補正を行うために、デジタルスチルカメラ120の筐体に垂直方向及び水平方向のコリオリ力が発生したときにこれを検出する振れ量検出手段としての例えばジャイロセンサ(ジャイロスコープ)で構成される垂直方向及び水平方向角速度センサ128及び129が設けられ、これら垂直方向及び水平方向角速度センサ128及び129から出力される検出信号が帯域制限フィルタ130及び131に供給されて帯域制限された後、増幅器132及び133で増幅されてからA/D変換器134によって所定サンプリング周期でデジタル信号に変換されてバッファメモリ136に一時格納される。そして、バッファメモリ136に格納された垂直方向及び水平方向の角速度データがデジタルスチルカメラ120の制御を統括するマイクロコンピュータ127に読出される。
The image data read from the image memory 125 is supplied to a
On the other hand, in order to perform camera shake correction, it is composed of, for example, a gyro sensor (gyroscope) as shake amount detection means for detecting when a Coriolis force in the vertical direction and the horizontal direction is generated in the casing of the digital
そして、マイクロコンピュータ127では、シャッタ開閉センサ137からのシャッタ開閉信号SSが入力されたときに、このシャッタ開閉信号がシャッタ開状態となっている間及びその前後の所定時間のバッファメモリ136に格納されている垂直方向及び水平方向の角速度データを読込み、読込んだ角速度データを記録系信号処理部126が画像メモリ125から画像データを読込むタイミングで記録系信号処理部126に出力して、この記録系信号処理部126で画像データと共に信号処理してメモリカード110に記憶する。
In the
すなわち、角速度センサ128及び129の各角速度データをサンプリング間隔Δt(例えば40〜400Hzの範囲の任意の周波数)でサンプリングし、それをバッファメモリ136に時系列的に格納しておく、シャッタ開閉センサ137でシャッタが開かれる前の所定数のサンプルデータ、シャッタが開いてから閉じられるまでのサンプルデータ、シャッタが閉じられた後での所定数のサンプルのデータを使用して、角速度の変化を求める。その際、画像データは画像メモリ125に蓄積する。
In other words, each of the angular velocity data of the
そして、バッファメモリ136に蓄積された各角速度データを画像メモリ125に記憶した画像データと共に記録系信号処理部126で信号処理してメモリカード110に記憶する。
この記録系信号処理部126では、画像情報をJPEG変換してJPEG画像ファイルに記憶すると共に、そのJPEG画像ファイルのExif IFD内の階層化されたユーザタグに各角速度データを記憶する。
Each angular velocity data accumulated in the
In this recording system
また、デジタルスチルカメラ120は、メモリカード110に記憶した画像情報をプリンタ1やホストコンピュータ140に出力する画像データ出力部138を有し、この画像データ出力部138からUSB等の接続コードを介して画像情報を出力する。
また、前述したプリンタ1では、デジタルスチルカメラ120からの振れがある劣化画像情報が接続コードを介して第2インタフェース14から直接入力されるか又はメモリカード110を介して入力されたときに、ユーザーが画像復元ボタン7を操作することにより、ウィーナフィルタを使用した画像復元処理を実行する。
The digital
Further, in the
ここで、画像復元の原理は、原画像から劣化画像が生じる画像劣化モデルを図3について説明すると、原画像f(x,y)とし、劣化画像をg(x,y)とし、さらに点広がり関数をh(x,y)、ノイズをn(x,y)としたとき、これらの関係は図3に示すようになり、式で表すと下記(1)式となる。
g(x,y)=f(x,y)*h(x,y)+n(x,y) …………(1)
但し、*は畳み込みを表す。
Here, the principle of image restoration is described with reference to FIG. 3, which is an image deterioration model in which a deteriorated image is generated from the original image. The original image is f (x, y), the deteriorated image is g (x, y), and the point spread is further increased. When the function is h (x, y) and the noise is n (x, y), these relationships are as shown in FIG. 3, and the following expression (1) is obtained.
g (x, y) = f (x, y) * h (x, y) + n (x, y) (1)
However, * represents convolution.
そして、劣化画像g(x,y)、原画像f(x,y)、点広がり関数h(x,y)及びノイズn(x,y)のフーリエ変換を夫々G(μ,ν)、F(μ,ν)、H(μ,ν)及びN(μ,ν)とすると、前記(1)式より
G(μ,ν)=F(μ,ν)H(μ,ν)+N(μ,ν) …………(2)
が得られる。
Then, Fourier transforms of the degraded image g (x, y), the original image f (x, y), the point spread function h (x, y) and the noise n (x, y) are respectively G (μ, ν) and F If (μ, ν), H (μ, ν) and N (μ, ν), then G (μ, ν) = F (μ, ν) H (μ, ν) + N (μ , Ν) ............ (2)
Is obtained.
そして、ウィーナフィルタによる画像復元の周波数応答B(μ,ν)は、
B(μ,ν)=H(μ,ν)*/{H(μ,ν)H(μ,ν)*+Γ ……(3)
と表すことができる。ここで、*は共役複素数、Γは近似定数を表す。
したがって、観測された画像のフーリエ変換G(μ,ν)に周波数応答B(μ,ν)を掛けた後、フーリエ逆変換すると復元画像を求めることができる。
The frequency response B (μ, ν) of image restoration by the Wiener filter is
B (μ, ν) = H (μ, ν) * / {H (μ, ν) H (μ, ν) * + Γ (3)
It can be expressed as. Here, * represents a conjugate complex number, and Γ represents an approximate constant.
Accordingly, a restored image can be obtained by multiplying the Fourier transform G (μ, ν) of the observed image by the frequency response B (μ, ν) and then performing the inverse Fourier transform.
そして、画像復元処理は、プリンタ側コントローラ60内のCPU62で実行され、図4に示すように、先ず、ステップS1で、振れが生じている劣化画像情報を読込み、次いでステップS2に移行して、劣化画像情報のExif IFD内の階層化されたユーザタグから各角速度データを取得する。
次いで、ステップS3に移行して、取得した各角速度データから振れ幅(ピクセル)を算出する。
Then, the image restoration process is executed by the
Next, the process proceeds to step S3, and a deflection width (pixel) is calculated from each acquired angular velocity data.
この振れ量の算出は、デジタルスチルカメラ120のカメラレンズ121における光軸方位の変動状況を検出する角速度センサ2成分(角速度センサ128,129)は、図5に示すように、固体撮像素子122の平面内の直交ベクトル成分に対応するものである。これら2つの角速度成分は、図5に示すように、θx及びθyの変数で表される。
この角度成分に補正係数λx及びλyを乗算することにより、画像のx軸方向或いはy軸方向の振れ量(ピクセル)を求めることができる。
The calculation of the shake amount is performed by using two components of the angular velocity sensor (
By multiplying the angle component by the correction coefficients λx and λy, a shake amount (pixel) of the image in the x-axis direction or the y-axis direction can be obtained.
ここで、画像のX方向の振れ量xnはθy×λx、画像のy方向の振れ量ynはθx×λyとなる。この場合の角速度センサ128,129より求めた振れ幅(xn,yn)(n=1,2,……N)の変化の様子は図6(a)に示すようになる。
次いで、ステップS4に移行して、算出した隣接する振れ幅(xn,yn)及び(xn+1,yn+1)間の最大変化量が大きいか否かを判定し、変化量が小さいときには直接ステップS6に移行するが、変化量が大きいときにはステップS5に移行して、振れ幅(xn,yn)を例えばキュービックスプライン処理を行うことによりスプライン補間して振れ幅(xm,ym)を算出してからステップS6に移行する。
Here, the shake amount x n in the X direction of the image is θy × λx, and the shake amount y n in the y direction of the image is θx × λy. FIG. 6A shows how the fluctuation widths (x n , y n ) (n = 1, 2,... N) obtained from the
Next, the process proceeds to step S4, where it is determined whether or not the maximum amount of change between the calculated adjacent shake widths (x n , y n ) and (x n + 1 , y n + 1 ) is large. If the change amount is small, the process proceeds directly to step S6. If the amount of change is large, the process proceeds to step S5, and the fluctuation width (x n , y n ) is spline interpolated by, for example, cubic spline processing to obtain the fluctuation width (x m , Y m ) is calculated, and then the process proceeds to step S6.
このステップS6では、変化量の小さい振れ幅(xn,yn)又はスプライン補間した振れ幅(xm,ym)に対してガウスフィルタ処理を行う。このガウスフィルタ処理は、下記(4)式で表される2次元のガウス関数f(x,y)を畳み込むことにより、振れ幅(xn,yn)又は(xm,ym)を平滑化する。
f(x,y)=e−(x2+y2)/2σ2 …………(4)
この場合のガウス分布は図7(a)に示すようになり、図7(a)の矢印で示した断面におけるガウス分布断面図は図7(b)で表される。
In this step S6, Gaussian filter processing is performed on the shake width (x n , y n ) with a small change amount or the shake width (x m , y m ) subjected to spline interpolation. In this Gaussian filter processing, a swing width (x n , y n ) or (x m , y m ) is smoothed by convolving a two-dimensional Gaussian function f (x, y) expressed by the following equation (4). Turn into.
f (x, y) = e− (x 2 + y 2 ) / 2σ 2 (4)
The Gaussian distribution in this case is as shown in FIG. 7A, and the Gaussian distribution cross-sectional view taken along the arrow in FIG. 7A is represented in FIG.
次いで、ステップS7に移行して、平滑化された振れ量からウィーナフィルタの点広がり関数を推定する点広がり関数推定処理を行う。
この点広がり関数推定処理は、振れ幅(x1,y1),(x2,y2),……(xN,yN)が与えられたとき、劣化画像g(x,y)は次式で示されるように、原画像f(x,y)を(xn,yn)(n=1,2,……N)画素だけ移動した画像の和により得られる。
Next, the process proceeds to step S7, and a point spread function estimation process for estimating the point spread function of the Wiener filter from the smoothed shake amount is performed.
In this point spread function estimation process, when the amplitudes (x 1 , y 1 ), (x 2 , y 2 ),... (X N , y N ) are given, the degraded image g (x, y) is As shown by the following equation, the original image f (x, y) is obtained by the sum of images moved by (x n , y n ) (n = 1, 2,... N) pixels.
次いで、ステップS8に移行して、点広がり関数のフーリエスペクトルH(μ,ν)とその共役複素数H(μ,ν)*と所定数の異なる近似定数Γ1〜ΓNとに基づいて所定数N個のウィーナフィルタの周波数応答BΓ(μ,ν)を算出する。 Next, the process proceeds to step S8, where the predetermined number is based on the Fourier spectrum H (μ, ν) of the point spread function, its conjugate complex number H (μ, ν) *, and a predetermined number of different approximation constants Γ 1 to Γ N. The frequency response BΓ (μ, ν) of N Wiener filters is calculated.
次いで、ステップS9に移行して、復元対象となる劣化画像情報(例えば2304×1728画素)から予め設定した幅w(例えば80画素),高さh(例えば60画素)のサイズの局所領域画像情報gs(x,y)((w×h)画素)を含みこれに幅p(例えば20画素)及び高さq(例えば20画素)を加算したサイズの拡大局所領域画像情報gl(x,y)((w+p)×(h+q)画素)を切り出す。ここで、拡大局所領域画像情報gl(x,y)((w+p)×(h+q)画素)の幅p及び高さqは、撮像装置となるデジタルスチルカメラ120の最大振れ幅によって設定され、最大振れ幅が10画素であるときに余裕をみて幅p及び高さqを夫々20画素に設定する。なお、幅p及び高さqは異なる値に設定するようにしてもよい。
Next, the process proceeds to step S9, and local area image information having a size of a width w (for example, 80 pixels) and a height h (for example, 60 pixels) set in advance from degraded image information (for example, 2304 × 1728 pixels) to be restored. g s (x, y) ((w × h) pixels), and a local area image information g l (x, x, x) having a size obtained by adding a width p (for example, 20 pixels) and a height q (for example, 20 pixels) to this. y) Cut out ((w + p) × (h + q) pixels). Here, the width p and the height q of the enlarged local region image information g l (x, y) ((w + p) × (h + q) pixels) are set by the maximum shake width of the digital
次いで、ステップS10に移行して、拡大局所領域画像情報gl(x,y)((w+p)×(h+q)画素)を離散フーリエ変換(Discrete Fourier Transform;DFT)して空間周波数領域情報Gl(x,y)に変換する。
次いで、ステップS11に移行して、算出した空間周波数領域情報Gl(x,y)に所定数のウィーナフィルタの周波数応答BΓ(x,y)を個別に掛けることにより、所定数の空間周波数領域復元情報F^Γl(μ,ν)を算出する。
Next, the process proceeds to step S10, and the enlarged local region image information g l (x, y) ((w + p) × (h + q) pixels) is subjected to discrete Fourier transform (DFT) to obtain spatial frequency region information G l. Convert to (x, y).
Next, the process proceeds to step S11, where the calculated spatial frequency domain information G l (x, y) is individually multiplied by a predetermined number of Wiener filter frequency responses BΓ (x, y) to obtain a predetermined number of spatial frequency domains. The restoration information F ^ Γ l (μ, ν) is calculated.
次いで、ステップS12に移行して、算出した所定数の周波数領域復元情報F^Γl(μ,ν)を逆離散フーリエ変換(IDFT)を行って所定数の拡大局所領域復元画像情報f^Γl(x,y)を算出する。
次いで、ステップS13に移行して、算出した各拡大局所領域復元画像情報f^Γl(x,y)の中央部から個別に前述した局所領域gs(x,y)と同一サイズの局所領域復元画像情報f^Γs(x,y)を切り出す。
Next, the process proceeds to step S12, and the predetermined number of calculated frequency domain restoration information F ^ Γ l (μ, ν) is subjected to inverse discrete Fourier transform (IDFT) to obtain a predetermined number of expanded local area restoration image information f ^ Γ. l Calculate (x, y).
Subsequently, the process proceeds to step S13, and the local area having the same size as the local area g s (x, y) described above is individually started from the center of the calculated enlarged local area restored image information f ^ Γ l (x, y). The restored image information f ^ Γ s (x, y) is cut out.
次いで、ステップS14に移行して、切り出した所定数の局所領域復元画像情報f^Γs(x,y)と劣化画像情報g(x,y)から切り出した局所領域復元画像情報fs(x,y)から下式によって所定数の平均二乗誤差DΓを算出する。 Then, the processing proceeds to step S14, a predetermined number of local areas cut restored image information f ^ Γ s (x, y ) and the degraded image information g (x, y) local area recovered cut out from the image information f s (x , Y), a predetermined number of mean square errors DΓ are calculated by the following equation.
次いで、ステップS15に移行して、算出した所定数の平均二乗誤差DΓのうちから最小の平均二乗誤差DΓを選択し、この最小の平均二乗誤差DΓの局所領域復元画像情報f^Γs(x,y)における輝度値を切り出した局所領域画像情報gs(x,y)における復元画像の輝度値の推定値とする。 Next, the process proceeds to step S15, where the minimum mean square error DΓ is selected from the calculated predetermined number of mean square errors DΓ, and the local area reconstructed image information f ^ Γ s (x , Y) is an estimated value of the luminance value of the restored image in the local area image information g s (x, y) obtained by cutting out the luminance value.
次いで、ステップS16に移行して、劣化画像情報g(x,y)の全ての局所領域について前述したステップS9〜S15の輝度値の推定が終了したか否かを判定し、全ての局所領域についての輝度値の推定が終了していないときには、ステップS17に移行して、次に切り出す拡大局所領域を指定してから前記ステップS9に戻り、全ての局所領域について輝度値の推定が終了したときにはステップS18に移行して、全ての局所領域で推定した輝度値の復元画像f^Γ(x,y)をメモリカード110に記憶すると共に、液晶表示器3に表示してから画像復元処理を終了する。
Next, the process proceeds to step S16, where it is determined whether or not the estimation of the luminance values in steps S9 to S15 described above has been completed for all the local regions of the degraded image information g (x, y), and for all the local regions. When the estimation of the luminance value is not completed, the process proceeds to step S17, the next expanded local area to be extracted is designated, and the process returns to step S9. The process proceeds to S18, and the restored image f ^ Γ (x, y) of the luminance values estimated in all the local areas is stored in the
この図4の処理において、ステップS1〜ステップS7の処理が点広がり関数推定手段に対応し、ステップS8〜ステップS18の処理が画像復元手段に対応し、ステップS9の処理が画像切り出し手段に対応し、ステップS10〜ステップS13の処理が復元画像生成手段に対応し、ステップS14及びS15の処理が復元画像選択手段に対応している。 In the processing of FIG. 4, the processing of step S1 to step S7 corresponds to the point spread function estimation means, the processing of step S8 to step S18 corresponds to the image restoration means, and the processing of step S9 corresponds to the image cutout means. The processes in steps S10 to S13 correspond to the restored image generation means, and the processes in steps S14 and S15 correspond to the restored image selection means.
次に、上記実施形態の動作を説明する。
先ず、デジタルスチルカメラ120のカメラレンズ121を被写体に向けて図示しないレリーズボタンを押圧することにより、露出計で測光された露出に基づいてシャッタ速度が算出され、算出されたシャッタ速度でシャッタが作動されることにより、カメラレンズ121を通った画像が固体撮像素子122上に投影される。
Next, the operation of the above embodiment will be described.
First, the shutter speed is calculated based on the exposure metered by the exposure meter by pressing a release button (not shown) with the
この固体撮像素子122上に投影された画像情報が固体撮像素子駆動回路123からの駆動信号によって順次読出され、カメラ系信号処理部124で所定の信号処理が行われて画像データとして画像メモリ125に記憶される。この画像メモリ125に記憶された画像データは表示器135に供給されて表示される。この表示器135に表示された画像データは振れ量を含んだ画像データであり、表示された画像データから振れ量の程度を判断することができる。
The image information projected on the solid-
このとき、シャッタが作動されることにより、シャッタ開閉センサ137からシャッタが開いてから閉じるときにオン状態からオフ状態に反転するシャッタ開閉信号SSがマイクロコンピュータ127に入力されると、この時点から所定時間即ちA/D変換器134で角速度センサ128及び129の角速度データを予め設定した所定数のサンプル分の角速度データがバッファメモリ136に格納される時間が経過した時点で、バッファメモリ136からシャッタが開状態となる前の所定数のサンプル分とシャッタが開状態を継続している間のサンプル分とシャッタが閉じてからの所定数のサンプル分とを合計した連続的な角速度データθx1〜θxN及びθy1〜θyNを読出す。
At this time, when a shutter opening / closing signal SS that reverses from an on state to an off state when the shutter is opened and closed from the shutter opening /
そして、読出した角速度データθx0〜θxN及びθy1〜θyNをバッファメモリ136に一時記憶し、その後記録系信号処理部126が画像メモリ125に記憶された画像データを読込むタイミングで角速度データθx0〜θxN及びθy1〜θyNを記録系信号処理部126に供給することにより、画像データJPEG変換してJPEGファイルに格納する共に、JPEGファイルのExifに角速度データθx0〜θxN及びθy1〜θyNを格納し、作成したJPEGファイルをメモリカード110に記憶する。
The read angular velocity data θx 0 to θx N and θy 1 to θy N are temporarily stored in the
このようにして順次デジタルスチルカメラ120で所望の被写体を撮影して画像データ及び角速度データθx0〜θxN及びθy1〜θyNをJPEGファイルに格納してメモリカード110に記憶する。
その後、所望のタイミングでデジタルスチルカメラ120を接続コードでプリンタ1の第2インタフェース14に接続するか又はデジタルスチルカメラ120からメモリカード110を引き出して、このメモリカード110をプリンタのカードスロット6に装着することにより、メモリカード110に記憶されている撮影した画像情報及び角速度データを含むJPEGファイルを、制御ユニット68を介してCPU62に読込む。
In this manner, a desired subject is sequentially photographed by the digital
Thereafter, the digital
そして、デジタルスチルカメラ120で同一被写体を撮影したときに、振れを生じると、図8に示すようにぼけとノイズが生じた劣化画像g(x,y)となる。この劣化画像では、ウィーナフィルタで復元画像を生成したときに、輝度変化の大きいエッジ部の近傍の平坦部でリンギングを生じ易くなる。
このため、劣化画像情報をプリンタ1に読込んだ状態で、ユーザーが画像復元ボタン7を操作すると、CPU62で、図4に示す画像復元処理が実行される。
Then, when the same subject is photographed by the digital
For this reason, when the user operates the
この画像復元処理では、先ず、デジタルスチルカメラ120又はメモリカード110から劣化画像情報及び角速度データθx1〜θxN及びθy1〜θyNを含むJPEGファイルを読込み(ステップS1)、次いでJPEGファイルのExifから角速度データθx1〜θxN及びθy1〜θyNを取得する(ステップS2)。
次いで、角速度データθx1〜θxN及びθy1〜θyNから振れ幅(xn,yn)を算出し(ステップS3)、次いで隣接する振れ幅(xn,yn)及び(xn+1,yn+1)間の最大変化量が大きいか否かを判定する(ステップS4)。
In this image restoration process, first, a JPEG file including degraded image information and angular velocity data θx 1 to θx N and θy 1 to θy N is read from the digital
Next, a swing width (x n , y n ) is calculated from the angular velocity data θx 1 to θx N and θy 1 to θy N (step S3), and then the adjacent swing widths (x n , y n ) and (x n + It is determined whether or not the maximum change amount between 1 , y n + 1 ) is large (step S4).
このとき、隣接する振れ幅(xn,yn)及び(xn+1,yn+1)間の最大変化量が小さいときには振れ幅(x1,y1)〜(xN,yN)の夫々についてガウスフィルタ処理を行って平滑化するが(ステップS6)、図6(a)に示すように、隣接する振れ幅(xn,yn)及び(xn+1,yn+1)間の最大変化量が大きいときには振れ幅(x1,y1)〜(xN,yN)に対してキュービックスプライン処理することにより(ステップS5)、図6(b)に示すように、スプライン補間してより多くの振れ幅を得、これをガウスフィルタ処理することにより平滑化する(ステップS6)。 At this time, the neighboring amplitude (x n, y n) and (x n + 1, y n + 1) is amplitude when the maximum amount of change between a small (x 1, y 1) ~ (x N, y N ) Is smoothed by performing Gaussian filter processing (step S6), but as shown in FIG. 6A, adjacent shake widths (x n , y n ) and (x n + 1 , y n + When the maximum change amount during 1 ) is large, the cubic spline processing is performed on the fluctuation widths (x 1 , y 1 ) to (x N , y N ) (step S5), as shown in FIG. Then, more fluctuations are obtained by spline interpolation, and this is smoothed by Gaussian filter processing (step S6).
そして、劣化画像情報g(x,y)は原画像f(x,y)を振れ幅(xn,yn)だけ移動した画像の和により得られることから、平滑化された振れ幅(x1,y1)〜(xN,yN)から前記(7)式の演算を行って点広がり関数のフーリエスペクトルH(μ,ν)を算出する。算出した点広がり関数のフーリエスペクトルH(μ,ν)はスプライン補間した図6(b)の振れ幅(x1,y1)〜(xN,yN)を使用した場合、図9に示すようになる。 The deteriorated image information g (x, y) is obtained by the sum of images obtained by moving the original image f (x, y) by the shake width (x n , y n ), so that the smoothed shake width (x 1 , y 1 ) to (x N , y N ) are used to calculate the Fourier spectrum H (μ, ν) of the point spread function by performing the calculation of the equation (7). The Fourier spectrum H (μ, ν) of the calculated point spread function is shown in FIG. 9 when the amplitudes (x 1 , y 1 ) to (x N , y N ) of FIG. It becomes like this.
そして、点広がり関数のフーリエスペクトルH(μ,ν)が算出されると、算出した点広がり関数のフーリエスペクトルH(μ,ν)とその共役複素数H(μ,ν)*と所定数の異なる値の所定数N(=10)の近似定数Γ(=0.25,0.5,……1.0)を使用して、前述した(3)式の演算を行うことにより、図10の処理2に示すように所定数のウィーナフィルタの周波数応答BΓ=0.25(μ,ν)、BΓ=0.5(μ,ν)、……BΓ=1.0(μ,ν)を算出する(ステップS8)。 When the Fourier spectrum H (μ, ν) of the point spread function is calculated, the Fourier spectrum H (μ, ν) of the calculated point spread function and its conjugate complex number H (μ, ν) * are different by a predetermined number. By using the approximate constant Γ (= 0.25, 0.5,... 1.0) of the predetermined number N (= 10) of values and performing the above-described calculation of the expression (3), FIG. As shown in process 2, frequency responses BΓ = 0.25 (μ, ν), BΓ = 0.5 (μ, ν),... BΓ = 1.0 (μ, ν) of a predetermined number of Wiener filters are calculated (step S8).
次いで、図8及び図10の処理1に示すように、劣化画像情報g(x,y)から局所領域画像情報gs(x,y)(w×h)画素)を中央部に含む最初の拡大局所領域画像情報gl(x,y)((w+p)×(h+q)画素)を切り出す(ステップS9)。
次いで、図11に示すように、切り出した拡大局所領域画像情報gl(x,y)((w+p)×(h+q)画素)を、離散フーリエ変換して空間周波数領域情報Gl(x,y)に変換し(ステップS10)、変換した空間周波数領域情報Gl(x,y)に前記ステップS8で算出した所定数のウィーナフィルタの周波数応答BΓ=0.25(μ,ν)、BΓ=0.5(μ,ν)、……BΓ=1.0(μ,ν)を個別に掛けることにより、図10の処理2に示すように、所定数の空間周波数領域復元画像F^lΓ=0.25〜F^lΓ=1.0を算出する(ステップS11)。
Next, as shown in
Next, as shown in FIG. 11, the extracted enlarged local region image information g l (x, y) ((w + p) × (h + q) pixels) is subjected to discrete Fourier transform to obtain spatial frequency region information G l (x, y). ) (Step S10), and the frequency response BΓ = 0.25 (μ, ν) and BΓ = 0.5 (BΓ = 0.5 (μ) of the predetermined number of Wiener filters calculated in step S8 to the converted spatial frequency domain information G l (x, y). μ, ν), ...... BΓ = 1.0 (μ, by multiplying the [nu) individually, as shown in process 2 of FIG. 10, the spatial frequency region of a predetermined number of restored image F ^ l Γ = 0.25 ~F ^ l Γ = 1.0 is calculated (step S11).
次いで、算出した各空間周波数領域復元画像F^lΓ=0.25〜F^lΓ=1.0を逆離散フーリエ変換することにより、図10の処理3に示すように拡大局所領域復元情報f^lΓ=0.25〜F^lΓ=1.0を算出する(ステップS12)。
次いで、図10に示すように、算出した拡大局所領域復元情報f^lΓ=0.25〜F^lΓ=1.0の中央部から個別に局所領域gs(x,y)と同一サイズの局所領域復元画像情報f^sΓ=0.25(x,y)〜f^sΓ=1.0(x,y)を切り出す(ステップS13)。
Then, the respective spatial frequency domain restored image F ^ l Γ = 0.25 ~F ^ l Γ = 1.0 calculated by inverse discrete Fourier transform, the
Then, as shown in FIG. 10, the calculated expanded local area restoration information f ^ l Γ = 0.25 ~F ^ l individually local region from the middle portion of the Γ = 1.0 g s (x, y) and the local area of the same size The restored image information f ^ s Γ = 0.25 (x, y) to f ^ s Γ = 1.0 (x, y) is cut out (step S13).
次いで、図10に示すように、切り出した局所領域復元画像情報f^sΓ=0.25(x,y)〜f^sΓ=1.0(x,y)とステップS9で切り出した局所領域画像情報g^s(x,y)との平均二乗誤差DΓ=0.25〜DΓ=1.0を算出し(ステップS14)、算出した平均二乗誤差DΓ=0.25〜DΓ=1.0のうちから最小の平均二乗誤差DΓを選択し、選択した最小の平均二乗誤差DΓの局所領域復元画像情報f^sΓ(x,y)における輝度値を切り出した局所領域画像情報gs(x,y)における復元画像の輝度値の推定値とする。 Next, as shown in FIG. 10, the extracted local region image information f ^ s Γ = 0.25 (x, y) to f ^ s Γ = 1.0 (x, y) and the local region image information g cut out in step S9. Calculate the mean square error DΓ = 0.25 to DΓ = 1.0 with ^ s (x, y) (step S14), and select the minimum mean square error DΓ from the calculated mean square errors DΓ = 0.25 to DΓ = 1.0 Then, estimation of the luminance value of the restored image in the local area image information g s (x, y) obtained by cutting out the luminance value in the local area restored image information f ^ s Γ (x, y) of the selected minimum mean square error DΓ Value.
このようにして、切り出した局所領域画像情報gs(x,y)における復元画像の輝度値の推定値が求まると、次いで劣化画像情報g(x,y)の全ての局所領域画像情報gs(x,y)における輝度値の推定が終了したか否かを判定し(ステップS16)、全ての局所領域画像情報gs(x,y)における輝度値の推定が終了していないときには、次に切り出す拡大局所領域を指定してから再度上記と同様の局所領域画像復元処理を行ない、全ての局所領域画像情報gs(x,y)における輝度値の推定が終了したときには、全ての局所領域で推定した輝度値の復元画像f^Γ(x,y)をメモリカード110に記憶すると共に、液晶表示器3に表示してから画像復元処理を終了する。
When the estimated value of the luminance value of the restored image in the extracted local area image information g s (x, y) is obtained in this way, then all the local area image information g s of the degraded image information g (x, y) is obtained. It is determined whether or not the estimation of the luminance value at (x, y) has been completed (step S16), and when the estimation of the luminance value at all the local area image information g s (x, y) has not been completed, When the local region image restoration processing similar to the above is performed again after specifying the enlarged local region to be cut out in the above, and when the estimation of the luminance values in all the local region image information g s (x, y) is completed, all the local regions The restored image f ^ Γ (x, y) of the luminance value estimated in step S1 is stored in the
このように上記実施形態によると、角速度データに基づいてウィーナフィルタの点広がり関数のフーリエスペクトラムH(μ,ν)を算出し、この点広がり関数のフーリエスペクトルとその共役複素数H(μ,ν)*と所定数の異なる近似定数Γ1〜ΓNとに基づいてウィーナフィルタの周波数応答B(μ,ν)を算出すると共に、劣化画像情報g(x,y)から拡大局所領域画像情報gl(x,y)を順次切り出し、これら拡大局所領域画像情報gl(x,y)を離散フーリエ変換した空間周波数領域画像情報Gl(x,y)に所定数のウィーナフィルタの周波数応答BΓ(μ,ν)を個別に掛けて所定数の空間周波数領域復元画像情報F^l(x,y)を算出し、これらを逆離散フーリエ変換して拡大局所領域復元画像情報とし、この拡大局所領域復元画像情報から中央部の局所領域復元画像情報を切り出し、これら局所領域復元画像情報と局所領域画像情報との最小二乗誤差DΓが最小となる局所領域復元画像情報を選択して、選択した局所領域復元画像情報の輝度値を局所領域画像情報の輝度値として推定し、この局所領域画像情報の推定処理を繰り返すことにより、劣化画像情報の復元画像情報を生成するので、劣化画像情報を局所領域毎にウィーナフィルタの近似定数Γを最適に設定することができ、リンギングを抑制しながらぼけの成分をそのまま残すことなく、鮮明な復元画像情報を得ることができる。 Thus, according to the above embodiment, the Fourier spectrum H (μ, ν) of the point spread function of the Wiener filter is calculated based on the angular velocity data, and the Fourier spectrum of this point spread function and its conjugate complex number H (μ, ν). The frequency response B (μ, ν) of the Wiener filter is calculated on the basis of * and a predetermined number of different approximation constants Γ 1 to Γ N, and the enlarged local region image information g l from the degraded image information g (x, y). (X, y) are sequentially cut out, and spatial frequency domain image information G l (x, y) obtained by discrete Fourier transform of these enlarged local area image information g l (x, y) is used as a frequency response BΓ () of a predetermined number of Wiener filters. mu, [nu) and multiplied separately calculates the spatial frequency domain of a predetermined number of restored image data F ^ l (x, y) , the enlarged local region restored image information of these inverse discrete Fourier transform to this extension station estate The local region restored image information in the central portion is cut out from the restored image information, the local region restored image information that minimizes the least square error DΓ between the local region restored image information and the local region image information is selected, and the selected local region is selected. By estimating the brightness value of the restored image information as the brightness value of the local area image information and repeating the estimation process of the local area image information, the restored image information of the degraded image information is generated. In addition, the Wiener filter approximation constant Γ can be set optimally, and clear restored image information can be obtained without leaving blur components while suppressing ringing.
ここで、角速度データから点広がり関数のフーリエスペクトルH(μ,ν)を算出する際に、角速度データの隣接する振れ幅の変化量が大きいときに、スプライン補間処理することにより、より多くの角速度データを得ることができ、正確な点広がり関数のフーリエスペクトルを算出することができる。しかも、そのままの振れ幅又はスプライン補間した振れ幅をガウスフィルタ処理して平滑化することにより、より正確な点広がり関数のフーリエスペクトルH(μ,ν)を算出することができる。 Here, when calculating the Fourier spectrum H (μ, ν) of the point spread function from the angular velocity data, when the variation amount of the adjacent fluctuation width of the angular velocity data is large, more angular velocities are obtained by performing spline interpolation processing. Data can be obtained, and an accurate Fourier spectrum of the point spread function can be calculated. In addition, a more accurate Fourier spectrum H (μ, ν) of the point spread function can be calculated by smoothing the fluctuation width obtained as it is or the fluctuation width obtained by spline interpolation by performing Gaussian filter processing.
また、劣化画像情報g(x,y)から局所領域画像情報gs(x,y)((w×h)画素)を抽出する際に、この局所領域画像情報gs(x,y)((w×h)画素)に対して撮像装置としてのデジタルスチルカメラ120の最大振れ幅を考慮した拡大局所領域画像情報gl(x,y)((w+p)×(h+q)画素)を切り出すようにしているので、デジタルスチルカメラ120の振れ幅による折り返しの影響を受けることなく、画像抽出を行うことができ、後に得られる復元画像を正確に復元することができる。
Further, when the local area image information g s (x, y) ((w × h) pixels) is extracted from the degraded image information g (x, y), the local area image information g s (x, y) ( The expanded local area image information g l (x, y) ((w + p) × (h + q) pixels) in consideration of the maximum shake width of the digital
なお、上記実施形態においては、本発明をプリンタに適用した場合について説明したが、これに限定されるものではなく、デジタルスチルカメラ120を含む撮像装置や画像情報を再生するプロジェクタやテレビ等の表示装置に本発明を適用して劣化画像情報を復元して表示したり、コンピュータに本発明を適用して劣化画像情報を復元して表示したりすることができる。
In the above-described embodiment, the case where the present invention is applied to a printer has been described. However, the present invention is not limited to this, and an imaging device including a digital
また、上記実施形態では、角速度データを直接JPEGファイルのExifに格納する場合について説明したが、これに限定されるものではなく、角速度データをn次の多項式に近似して、各次数の係数を記憶することにより、記憶容量を減少させるようにしてもよい。
さらに、上記実施形態においては、撮像装置としてデジタルスチルカメラ120を適用した場合について説明したが、これに限定されるものではなく、他の撮像装置を適用することもできる。また、劣化画像情報の入力もデジタルスチルカメラ120から入力される場合に限られるものではなく、ホストコンピュータから劣化画像を入力したり、CD−R、DVD等の記録媒体から劣化画像を入力したりするようにしてもよい。
In the above embodiment, the case where the angular velocity data is directly stored in the Exif of the JPEG file has been described. However, the present invention is not limited to this. By storing, the storage capacity may be reduced.
Furthermore, although the case where the digital
さらにまた、上記実施形態においては、振れ幅(xn,yn)に対してガウスフィルタ処理する場合について説明したが、これに限定されるものではなく、ガウスフィルタ処理を省略するようにしてもよい。 Furthermore, in the above-described embodiment, the case where the Gaussian filter processing is performed on the shake width (x n , y n ) has been described. However, the present invention is not limited to this, and the Gaussian filter processing may be omitted. Good.
1…プリンタ、5…操作ボタン、6…カードスロット、7…画像復元ボタン、20…ヘッドユニット、30…用紙搬送機構、40…キャリッジ移動機構、50…検出器群、60…プリンタ側コントローラ、62…CPU、100…CD−R装置、110…メモリカード、120…デジタルスチルカメラ、121…カメラレンズ、122…固体撮像素子、124…カメラ系信号処理部、125…画像メモリ、126…記録系信号処理部、127…マイクロコンピュータ、128,129…角速度センサ、134…A/D変換器、135…表示器、136…バッファメモリ、137…シャッタ開閉センサ、140…ホストコンピュータ
DESCRIPTION OF
Claims (12)
前記劣化画像情報に含まれる前記振れ検出情報に基づいて前記ウィーナフィルタの点広がり関数を推定する点広がり関数推定手段と、前記劣化画像情報から切り出した局所領域画像情報毎に前記点広がり関数と最適な近似定数とに基づいて算出される前記ウィーナフィルタの周波数応答に基づいて局所領域復元画像情報を生成する画像復元手段とを有することを特徴とする画像復元装置。 An image restoration device that restores original image information by using a Wiener filter for deteriorated image information including shake detection information representing shake of an image obtained from an imaging device,
Point spread function estimation means for estimating a point spread function of the Wiener filter based on the shake detection information included in the degraded image information, and the point spread function and the optimum for each local area image information cut out from the degraded image information An image restoration apparatus comprising: an image restoration unit that generates local area restoration image information based on a frequency response of the Wiener filter calculated based on an approximate constant.
点広がり関数推定手段によって前記劣化画像情報に含まれる前記振れ検出情報に基づいて前記ウィーナフィルタの点広がり関数を推定する点広がり関数推定ステップと、画像復元手段によって前記劣化画像情報から切り出した局所領域画像情報毎に前記点広がり関数と最適な近似定数とに基づいて算出される前記ウィーナフィルタの周波数応答に基づいて局所領域復元画像情報を生成する画像復元ステップとを有することを特徴とする画像復元方法。 An image restoration method for restoring deteriorated image information including shake detection information representing shake of an image obtained from an imaging device using a Wiener filter,
A point spread function estimating step for estimating a point spread function of the Wiener filter based on the shake detection information included in the degraded image information by a point spread function estimating unit; and a local region cut out from the degraded image information by an image restoring unit An image restoration step of generating local area restoration image information based on a frequency response of the Wiener filter calculated based on the point spread function and an optimum approximation constant for each image information Method.
点広がり関数推定手段によって前記劣化画像情報に含まれる前記振れ検出情報に基づいて前記ウィーナフィルタの点広がり関数を推定する点広がり関数推定ステップと、画像復元手段によって前記劣化画像情報から切り出した局所領域画像情報毎に前記点広がり関数と最適な近似定数とに基づいて算出される前記ウィーナフィルタの周波数応答に基づいて局所領域復元画像情報を生成する画像復元ステップとをコンピュータに実行させることを特徴とする画像復元プログラム。 An image restoration program for causing a computer to execute image restoration processing for restoring degraded image information including shake detection information representing shake of an image obtained from an imaging device using a Wiener filter,
A point spread function estimating step for estimating a point spread function of the Wiener filter based on the shake detection information included in the degraded image information by a point spread function estimating unit; and a local region cut out from the degraded image information by an image restoring unit An image restoration step of generating local area restoration image information based on a frequency response of the Wiener filter calculated based on the point spread function and an optimum approximation constant for each image information is performed by a computer. Image restoration program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006356778A JP2008165657A (en) | 2006-12-29 | 2006-12-29 | Image restoration device, image restoration method, and image restoration program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006356778A JP2008165657A (en) | 2006-12-29 | 2006-12-29 | Image restoration device, image restoration method, and image restoration program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008165657A true JP2008165657A (en) | 2008-07-17 |
Family
ID=39695027
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006356778A Pending JP2008165657A (en) | 2006-12-29 | 2006-12-29 | Image restoration device, image restoration method, and image restoration program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008165657A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101055853B1 (en) | 2011-01-04 | 2011-08-09 | (주)올라웍스 | Method, terminal and computer-readable recording medium for deblurring barcode image |
CN117115025A (en) * | 2023-08-25 | 2023-11-24 | 中国人民解放军国防科技大学 | Image rapid restoration method, device and medium based on multiframe blind deconvolution |
-
2006
- 2006-12-29 JP JP2006356778A patent/JP2008165657A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101055853B1 (en) | 2011-01-04 | 2011-08-09 | (주)올라웍스 | Method, terminal and computer-readable recording medium for deblurring barcode image |
WO2012093812A3 (en) * | 2011-01-04 | 2012-10-04 | (주)올라웍스 | Method for deblurring an input bar-code image, and a recording medium able to be read by terminal devices and computers |
US8320695B2 (en) | 2011-01-04 | 2012-11-27 | Intel Corporation | Method, terminal and computer-readable recording medium for deblurring barcode image |
CN103608838A (en) * | 2011-01-04 | 2014-02-26 | 英特尔公司 | Method for deblurring an input bar-code image, and a recording medium able to be read by terminal devices and computers |
CN117115025A (en) * | 2023-08-25 | 2023-11-24 | 中国人民解放军国防科技大学 | Image rapid restoration method, device and medium based on multiframe blind deconvolution |
CN117115025B (en) * | 2023-08-25 | 2024-04-05 | 中国人民解放军国防科技大学 | Image rapid restoration method, device and medium based on multiframe blind deconvolution |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11457149B2 (en) | Method and apparatus for capturing digital video | |
JP5414405B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
US8208017B2 (en) | Imaging device, product package, and semiconductor integrated circuit | |
JP2008167336A (en) | Apparatus, method, and program for restoring image | |
WO2006068299A1 (en) | Image processor and image processing program | |
JP2006333061A (en) | Camera shake compensating device | |
US20070098383A1 (en) | Motion blur reduction and compensation | |
JP2000020691A (en) | Image processing device and method, image-pickup device, control method, and storage medium therefor | |
JP2000298300A (en) | Hand shake image correcting method, recording medium, and image pickup device | |
JP4958806B2 (en) | Blur detection device, blur correction device, and imaging device | |
US20090079836A1 (en) | Image processing apparatus, method, and computer program product | |
JP2009088935A (en) | Image recording apparatus, image correcting apparatus, and image pickup apparatus | |
JP5211589B2 (en) | Image processing apparatus, electronic camera, and image processing program | |
JP2008165657A (en) | Image restoration device, image restoration method, and image restoration program | |
JP4529804B2 (en) | Electronic camera having pixel shifted image generation function and imaging method | |
US8073280B2 (en) | Image processing apparatus and image processing program for correcting image degradation | |
JP4926450B2 (en) | Image processing device | |
JP2008148049A (en) | Shake correction device, imaging apparatus using it, and driving method for shake correction device | |
JP2009182576A (en) | Image processing apparatus, imaging apparatus, printer and image processing method | |
JP5511403B2 (en) | Image processing apparatus and control method thereof | |
JP4087807B2 (en) | Image processing method, apparatus, and program | |
JP2007266771A (en) | Camera shake detector and digital camera | |
JP4119818B2 (en) | Signal processing apparatus, imaging apparatus, and signal processing method | |
JP2010011050A (en) | Moving picture processing unit, image recording device integrated with camera, moving picture reproducing device, remote control system, moving picture processing program, storage medium, and moving picture processing system | |
JP2008017109A (en) | Portable imaging device |