JP2015041200A - Image processor, image forming apparatus, and program - Google Patents

Image processor, image forming apparatus, and program Download PDF

Info

Publication number
JP2015041200A
JP2015041200A JP2013171293A JP2013171293A JP2015041200A JP 2015041200 A JP2015041200 A JP 2015041200A JP 2013171293 A JP2013171293 A JP 2013171293A JP 2013171293 A JP2013171293 A JP 2013171293A JP 2015041200 A JP2015041200 A JP 2015041200A
Authority
JP
Japan
Prior art keywords
image
function
image data
blur
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013171293A
Other languages
Japanese (ja)
Inventor
長尾 景則
Kagenori Nagao
景則 長尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2013171293A priority Critical patent/JP2015041200A/en
Publication of JP2015041200A publication Critical patent/JP2015041200A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To shorten the processing period required for correcting an image blur even when uneven blurs are generated on an image.SOLUTION: An image processor 1 comprises: an image acceptance section 11 for accepting input image data input from the outside; an image division section 12 for dividing the input image based on the input image data into a plurality of small areas; a small area selection section 13 for selecting one or more small areas from among the plurality of small areas of the input image, for allowing a parameter estimation section 14 to estimate a parameter value; the parameter estimation section 14 for estimating a parameter value which a function defined according to a blur generated in the image has; a blur correction section 15 for generating blur correction image data having the blur generated in the input image corrected on the basis of the parameter value estimated and the input image data; and an image output section 16 for outputting the blur correction image data to the outside.

Description

本発明は、画像処理装置、画像形成装置およびプログラムに関する。   The present invention relates to an image processing apparatus, an image forming apparatus, and a program.

画像のぼけを補正する技術として、PSF(Point Spread Function)を用いた技術が存在する。この技術は、ぼけた画像が、元の鮮鋭な画像にPSFを畳み込むことで表すことができることを利用し、ぼけた画像に対してPSFの逆畳み込み演算を施すことで元の鮮鋭な画像を復元する技術である。PSFを用いた画像復元技術として、例えば、PSFが既知である場合に、画像内で同一のぼけが生じていることを前提に元の画像を復元するWiener filterが存在する(非特許文献1参照)。また、PSFが既知である場合に元の画像を復元する技術として、Richardson−Lucy deconvolutionが存在する(非特許文献2参照)。   As a technique for correcting image blur, there is a technique using PSF (Point Spread Function). This technology utilizes the fact that a blurred image can be represented by convolving a PSF with the original sharp image, and restores the original sharp image by performing a PSF deconvolution operation on the blurred image. Technology. As an image restoration technique using PSF, for example, there is a Wiener filter that restores an original image on the assumption that the same blur is generated in the image when the PSF is known (see Non-Patent Document 1). ). Further, Richardson-Lucy devolution exists as a technique for restoring the original image when the PSF is known (see Non-Patent Document 2).

また、公報記載の従来技術として、入力画像に対して、シェーディング補正処理、ガンマ補正処理、階調処理、直行する2つの方向に対してフィルタ強度を選択する処理を行う画像処理装置であって、原稿の領域に応じてフィルタリング処理の内容を切り替えることにより、入力画像が絵柄、文字、線画、写真、網点画像などのいずれであっても、画像の鮮鋭化度合いを調整する画像処理装置が存在する(特許文献1参照)。   Further, as a conventional technique described in the publication, an image processing apparatus that performs a shading correction process, a gamma correction process, a gradation process, and a process of selecting filter strengths in two directions orthogonal to an input image, There is an image processing device that adjusts the degree of image sharpness by switching the contents of filtering processing according to the area of the original, regardless of whether the input image is a pattern, text, line drawing, photograph, halftone image, etc. (See Patent Document 1).

さらに、他の公報記載の従来技術として、入力画像を複数の小領域画像に分割し、小領域画像毎にPSFを推定し、推定されたPSFの形状を識別して、類似性の高いPSF形状の小領域画像を同一グループに分類し、同一グループに分類された隣接する小領域画像をグループ毎に統合することにより、似通ったぼけ方をしている被写体画像を分離する被写体分離装置が存在する。また、被写体分離装置により分離された似通ったぼけ方をしている被写体画像をもとに、さらにPSFを求め、復元画像を得る画像復元装置が存在する(特許文献2参照)。   Furthermore, as a conventional technique described in other publications, an input image is divided into a plurality of small region images, a PSF is estimated for each small region image, a shape of the estimated PSF is identified, and a highly similar PSF shape There exists a subject separation device that separates subject images having similar blurring methods by classifying the small region images into the same group and integrating adjacent small region images classified into the same group for each group. . There is also an image restoration device that obtains a restored image by further obtaining a PSF based on a subject image that is separated by the subject separation device and has a similar blur (see Patent Document 2).

また、ぼけのない自然画像では、画像内での画素値の変化の度合いを表すグラディエントのヒストグラムが、特定の値に集中するような分布(スパースな分布)を持つことが知られている(非特許文献3、4参照)。非特許文献4には、そのような画像の事前分布の一例が式(6)、式(7)として示されている。   Further, it is known that a natural image without blur has a distribution (sparse distribution) in which a gradient histogram indicating the degree of change in pixel value in an image is concentrated on a specific value (non-sparse distribution). (See Patent Documents 3 and 4). Non-Patent Document 4 shows an example of such a prior distribution of images as Equation (6) and Equation (7).

さらに、統計学において、尤もらしさを表す度合いである尤度を最大化するパラメータを反復計算により求める手法として、EMアルゴリズムが知られている(非特許文献4、5参照)。非特許文献5には、パラメータを求める手法として、サンプリング法、変分法、一般化EMアルゴリズム等の他の手法も記載されている。   Further, in statistics, an EM algorithm is known as a technique for obtaining a parameter that maximizes likelihood, which is a degree representing likelihood, by iterative calculation (see Non-Patent Documents 4 and 5). Non-Patent Document 5 also describes other methods such as a sampling method, a variational method, and a generalized EM algorithm as a method for obtaining parameters.

特開平9−247460号公報JP-A-9-247460 特開2012−155456号公報JP 2012-155456 A

手塚慶一、北橋忠弘、小川秀夫著、「ディジタル画像処理工学」、初版1刷、株式会社日刊工業新聞社、1985年6月15日、p.54-57Keiichi Tezuka, Tadahiro Kitahashi, Hideo Ogawa, "Digital Image Processing Engineering", 1st edition, Nikkan Kogyo Shimbun, June 15, 1985, p.54-57 W.Richardson, “Bayesian-based iterative method of image restoration”, Journal of the Optical Society of America, Vol.62, 1972, p.55-59W. Richardson, “Bayesian-based iterative method of image restoration”, Journal of the Optical Society of America, Vol.62, 1972, p.55-59 R.Fergus, et.al, 「Removing camera shake from a single photograph」, SIGGRAPH 2006 Papers, ACM, 2006, p.787-794R. Fergus, et.al, `` Removing camera shake from a single photograph '', SIGGRAPH 2006 Papers, ACM, 2006, p.787-794 A.Levin, et.al, 「Efficient marginal likelihood optimization in blind deconvolution」, Proceeding of CVPR 2011, 2011, p.2657-2664A.Levin, et.al, `` Efficient marginal likelihood optimization in blind deconvolution '', Proceeding of CVPR 2011, 2011, p.2657-2664 C.M.ビショップ(C.M.Bishop)著、「パターン認識と機械学習 下 ベイズ理論による統計的予測」、初版3刷、シュプリンガー・ジャパン株式会社、2009年6月21日、p.139-171C.M.Bishop, "Pattern Recognition and Machine Learning, Statistical Prediction Based on Bayesian Theory", First Edition, 3rd edition, Springer Japan, June 21, 2009, p.139-171

本発明は、画像内で不均一なぼけが生じている場合であっても、画像のぼけを補正するのに要する処理時間を短縮することを目的とする。   An object of the present invention is to reduce the processing time required to correct image blur even when nonuniform blur occurs in the image.

請求項1に記載の発明は、入力された画像データを受け付ける受け付け手段と、前記受け付け手段により受け付けられた前記画像データを複数の領域に分割する分割手段と、画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数の変数を有する当該関数を取得する取得手段と、前記分割手段により分割された前記複数の領域から、前記取得手段により取得された前記関数が有する変数の値を算出するための1または複数の領域を選択する選択手段と、前記選択手段により選択された前記1または複数の領域を用いて、前記取得手段により取得された前記関数が有する変数の値を算出する算出手段と、前記算出手段により算出された前記変数の値と前記受け付け手段により受け付けられた前記画像データとに基づいて、当該画像データにおける画像のぼけを補正する補正手段とを備えた画像処理装置である。
請求項2に記載の発明は、前記関数はガウス分布を表す関数で定義されることを特徴とする請求項1に記載の画像処理装置である。
請求項3に記載の発明は、前記選択手段は、前記分割手段により分割された前記複数の領域のうち、当該領域内の画素値の分布が不均一な当該領域を選択することを特徴とする請求項1または2に記載の画像処理装置である。
請求項4に記載の発明は、入力された画像データである入力画像データを受け付ける受け付け手段と、前記受け付け手段により受け付けられた前記入力画像データを複数の領域に分割する分割手段と、画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数の変数を有する当該関数を取得する取得手段と、前記分割手段により分割された前記複数の領域から、前記取得手段により取得された前記関数が有する変数の値を算出するための1または複数の領域を選択する選択手段と、前記選択手段により選択された前記1または複数の領域を用いて、前記取得手段により取得された前記関数が有する変数の値を算出する算出手段と、前記算出手段により算出された前記変数の値と前記受け付け手段により受け付けられた前記入力画像データとに基づいて、当該入力画像データにおける画像のぼけを補正したぼけ補正画像データを生成する生成手段と、前記生成手段により生成された前記ぼけ補正画像データに基づいて記録材に画像を形成する画像形成手段とを備えた画像形成装置である。
請求項5に記載の発明は、コンピュータに、入力された画像データを受け付ける機能と、受け付けられた前記画像データを複数の領域に分割する機能と、画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数の変数を有する当該関数を取得する機能と、分割された前記複数の領域から、取得された前記関数が有する変数の値を算出するための1または複数の領域を選択する機能と、選択された前記1または複数の領域を用いて、取得された前記関数が有する変数の値を算出する機能と、算出された前記変数の値と受け付けられた前記画像データとに基づいて、当該画像データにおける画像のぼけを補正する機能とを実現させるためのプログラムである。
According to the first aspect of the present invention, there is provided a receiving unit that receives input image data, a dividing unit that divides the image data received by the receiving unit into a plurality of regions, and a blur that occurs in an image. A function defined to be expressed in accordance with the position of the acquisition unit, the acquisition unit that acquires the function having a plurality of variables, and the acquisition unit acquired from the plurality of regions divided by the division unit The selection unit that selects one or a plurality of regions for calculating the value of the variable included in the function, and the one or more regions selected by the selection unit, and the acquisition unit acquires the A calculation unit that calculates a value of a variable included in the function; a value of the variable calculated by the calculation unit; and the image data received by the reception unit; Based on an image processing apparatus and a correcting means for correcting the blur of the image in the image data.
The invention according to claim 2 is the image processing apparatus according to claim 1, wherein the function is defined by a function representing a Gaussian distribution.
The invention according to claim 3 is characterized in that the selecting means selects the area in which the distribution of pixel values in the area is non-uniform among the plurality of areas divided by the dividing means. An image processing apparatus according to claim 1.
According to a fourth aspect of the present invention, there is provided a receiving unit that receives input image data that is input image data, a dividing unit that divides the input image data received by the receiving unit into a plurality of regions, and an image. It is a function defined so that blur is represented according to the position in the image, from the plurality of regions divided by the dividing unit, an acquisition unit that acquires the function having a plurality of variables, Using the selection means for selecting one or a plurality of areas for calculating the value of the variable possessed by the function acquired by the acquisition means, and the one or more areas selected by the selection means, the acquisition A calculation means for calculating a value of a variable included in the function acquired by the means; a value of the variable calculated by the calculation means; Generating means for generating blur-corrected image data obtained by correcting image blur in the input image data based on the input image data, and a recording material based on the blur-corrected image data generated by the generating means The image forming apparatus includes an image forming unit that forms an image.
According to a fifth aspect of the present invention, there is provided a computer having a function of receiving input image data, a function of dividing the received image data into a plurality of areas, and a blur occurring in the image at a position in the image. A function defined to be expressed in accordance with the function to obtain the function having a plurality of variables, and to calculate the value of the variable that the obtained function has from the plurality of divided areas A function for selecting one or a plurality of areas, a function for calculating a variable value of the acquired function using the selected one or a plurality of areas, and accepting the calculated value of the variable And a function for correcting image blur in the image data based on the image data.

請求項1記載の発明によれば、本構成を有していない場合と比較して、画像内で不均一なぼけが生じている場合であっても、画像のぼけを補正するのに要する処理時間が短縮される。
請求項2記載の発明によれば、本構成を有していない場合と比較して、中心部から周辺部に向かうにつれてぼけの度合いが大きくなる場合に、画像のぼけを補正するのが容易になる。
請求項3記載の発明によれば、本構成を有していない場合と比較して、画像のぼけを補正する精度を向上させることができる。
請求項4記載の発明によれば、本構成を有していない場合と比較して、画像内で不均一なぼけが生じている場合であっても、画像のぼけを補正するのに要する処理時間を短縮して画像形成を行うことができる。
請求項5記載の発明によれば、本構成を有していない場合と比較して、画像内で不均一なぼけが生じている場合であっても、画像のぼけを補正するのに要する処理時間を短縮する機能をコンピュータにより実現できる。
According to the first aspect of the present invention, compared with the case where the present configuration is not provided, even if non-uniform blur occurs in the image, the processing required to correct the blur of the image Time is shortened.
According to the second aspect of the present invention, when the degree of blur increases from the central part toward the peripheral part as compared with the case where the present configuration is not provided, it is easy to correct the blur of the image. Become.
According to the third aspect of the present invention, it is possible to improve the accuracy of correcting image blur as compared with the case where the present configuration is not provided.
According to the invention described in claim 4, the processing required for correcting the blur of the image even when the blur is uneven in the image as compared with the case where the present configuration is not provided. It is possible to shorten the time and form an image.
According to the fifth aspect of the present invention, even when non-uniform blur occurs in the image as compared with the case where the present configuration is not provided, the processing required for correcting the blur of the image A function for shortening the time can be realized by a computer.

本実施の形態に係る画像処理装置の機能構成例を示したブロック図である。It is the block diagram which showed the function structural example of the image processing apparatus which concerns on this Embodiment. 本実施の形態に係る入力画像内の小領域の一例を示した図である。It is the figure which showed an example of the small area | region in the input image which concerns on this Embodiment. 本実施の形態に係るぼけた入力画像の生成モデルの一例を示した図である。It is the figure which showed an example of the production | generation model of the blurred input image which concerns on this Embodiment. (a)(b)(c)は、ガウシアンフィルタによるぼけの一例を示した図である。(A) (b) (c) is a figure showing an example of blur by a Gaussian filter. 本実施の形態に係る画像処理装置が元画像を推定する手順の一例を示したフローチャートである。It is the flowchart which showed an example of the procedure which the image processing apparatus which concerns on this Embodiment estimates an original image. 本実施の形態に係る画像処理装置の機能を実現する画像形成装置の一例を示した図である。1 is a diagram illustrating an example of an image forming apparatus that realizes functions of an image processing apparatus according to an exemplary embodiment. 本実施の形態に係る画像処理装置のハードウェア構成の一例を示した図である。It is the figure which showed an example of the hardware constitutions of the image processing apparatus which concerns on this Embodiment.

以下、添付図面を参照して、本発明の実施の形態について詳細に説明する。
<画像処理装置の構成の説明>
図1は、本実施の形態に係る画像処理装置1の機能構成例を示したブロック図である。
本実施の形態に係る画像処理装置1は、外部から入力された画像データ(以下、入力画像データと称する)を受け付ける画像受け付け部11と、入力画像データに基づく画像(以下、入力画像と称する)を複数の領域(以下、この領域を小領域と称する)に分割する画像分割部12と、入力画像の複数の小領域のうち、後述するパラメータ推定部14がパラメータの値を推定するための1または複数の小領域を選択する小領域選択部13とを備える。また、画像処理装置1は、画像で生じているぼけについて定義された関数が有するパラメータの値を推定するパラメータ推定部14と、推定されたパラメータの値と入力画像データとに基づいて、入力画像で生じているぼけを補正した画像データ(以下、ぼけ補正画像データと称する)を生成するぼけ補正部15と、ぼけ補正画像データを外部に出力する画像出力部16とを備える。
Embodiments of the present invention will be described below in detail with reference to the accompanying drawings.
<Description of Configuration of Image Processing Device>
FIG. 1 is a block diagram illustrating a functional configuration example of an image processing apparatus 1 according to the present embodiment.
The image processing apparatus 1 according to the present embodiment includes an image receiving unit 11 that receives image data (hereinafter referred to as input image data) input from the outside, and an image based on the input image data (hereinafter referred to as an input image). Is divided into a plurality of regions (hereinafter, this region is referred to as a small region), and a parameter estimation unit 14 (to be described later) among the plurality of small regions of the input image is used for estimating the parameter value. Or the small area selection part 13 which selects a some small area is provided. The image processing apparatus 1 also uses the parameter estimation unit 14 that estimates the parameter value of the function defined for the blur occurring in the image, and the input image data based on the estimated parameter value and the input image data. Are provided with a blur correction unit 15 that generates image data (hereinafter referred to as blur correction image data) obtained by correcting the blur generated in step 1 and an image output unit 16 that outputs the blur correction image data to the outside.

受け付け手段の一例としての画像受け付け部11は、外部から入力画像データを受け付ける。本実施の形態において、入力画像データに基づく入力画像は、画像のぼけを補正する対象となるものである。そして、画像受け付け部11は、受け付けた入力画像データを画像分割部12およびぼけ補正部15に送信する。   An image receiving unit 11 as an example of a receiving unit receives input image data from the outside. In the present embodiment, the input image based on the input image data is a target for correcting image blur. Then, the image reception unit 11 transmits the received input image data to the image division unit 12 and the blur correction unit 15.

分割手段の一例としての画像分割部12は、画像受け付け部11から送信された入力画像データに基づく入力画像を複数の小領域に分割する。ここで、画像分割部12は、入力画像を縦横にm×n個の小領域に分割する。そして、画像分割部12は、入力画像を複数の小領域に分割した後、その入力画像データを小領域選択部13に送信する。   An image dividing unit 12 as an example of a dividing unit divides an input image based on input image data transmitted from the image receiving unit 11 into a plurality of small regions. Here, the image dividing unit 12 divides the input image into m × n small regions vertically and horizontally. Then, the image dividing unit 12 divides the input image into a plurality of small areas, and then transmits the input image data to the small area selecting unit 13.

選択手段の一例としての小領域選択部13は、画像分割部12により分割された入力画像の複数の小領域のうち、パラメータ推定部14によるパラメータの推定に適した1または複数の小領域を選択する。パラメータの推定に適した小領域としては、例えば、小領域内の画素値の分布が不均一なものが該当する。画素値の分布が均一な画像については、画像内でぼけが発生したとしても、画像値の分布が均一であるためにぼけの発生の有無が判断できない場合がある。そのため、小領域選択部13は、画像内でのぼけの有無が判断し易い画像として、画素値の分布が不均一な画像を選択する。そして、小領域選択部13は、選択した1または複数の小領域をパラメータ推定部14に送信する。   The small region selection unit 13 as an example of a selection unit selects one or a plurality of small regions suitable for parameter estimation by the parameter estimation unit 14 from the plurality of small regions of the input image divided by the image dividing unit 12. To do. As a small region suitable for parameter estimation, for example, a region in which the distribution of pixel values in the small region is not uniform corresponds. For an image with a uniform distribution of pixel values, even if blurring occurs in the image, it may not be possible to determine whether blurring has occurred because the distribution of image values is uniform. For this reason, the small region selection unit 13 selects an image with a nonuniform pixel value distribution as an image for which it is easy to determine the presence or absence of blur in the image. Then, the small region selection unit 13 transmits the selected one or more small regions to the parameter estimation unit 14.

図2は、本実施の形態に係る入力画像内の小領域の一例を示した図である。図2に示す入力画像は、画像分割部12により縦横にm×n個(図2に示す入力画像では、m=9、n=8)の小領域に分割されている。この小領域は、小領域選択部13に選択された後にパラメータ推定部によるパラメータの推定に用いられるものであり、小領域の大きさは、例えば、小領域内でのぼけの変化の度合いに応じて定めれば良い。例えば、小領域内でのぼけの変化が大きければ小領域を小さくし、小領域内でのぼけの変化が小さければ小領域を大きくすることが考えられる。   FIG. 2 is a diagram showing an example of a small area in the input image according to the present embodiment. The input image shown in FIG. 2 is divided into m × n small areas vertically and horizontally by the image dividing unit 12 (m = 9, n = 8 in the input image shown in FIG. 2). This small region is used for parameter estimation by the parameter estimation unit after being selected by the small region selection unit 13, and the size of the small region depends on, for example, the degree of change in blur in the small region. It can be determined. For example, it is conceivable to reduce the small area if the blur change in the small area is large, and to increase the small area if the blur change in the small area is small.

また、小領域選択部13は、例えば、画素値の分布が不均一な小領域を選択するために、各小領域について画素値の分布の度合いを示すエントロピーを計算し、エントロピーの大きい小領域から順番に選択する。図2に示す例では、小領域選択部13は、エントロピーの大きい上位3個の小領域(斜線で示したr1〜r3)を選択している。また、例えば、小領域選択部13は、エントロピーが予め定められた閾値よりも大きい小領域を選択することとしても良い。さらに、例えば、小領域選択部13は、各小領域における最大画素値と最小画素値との差や、各小領域におけるグラディエントの絶対値の平均等をもとに、小領域を選択しても良い。   In addition, the small region selection unit 13 calculates entropy indicating the degree of distribution of pixel values for each small region, for example, in order to select a small region with a nonuniform pixel value distribution. Select in order. In the example illustrated in FIG. 2, the small region selection unit 13 selects the top three small regions (r1 to r3 indicated by diagonal lines) having the largest entropy. In addition, for example, the small area selection unit 13 may select a small area whose entropy is larger than a predetermined threshold. Further, for example, the small region selection unit 13 may select a small region based on the difference between the maximum pixel value and the minimum pixel value in each small region, the average of the absolute value of the gradient in each small region, or the like. good.

取得手段、算出手段の一例としてのパラメータ推定部14は、画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数のパラメータを有する関数について、小領域選択部13により選択された1または複数の小領域を用いて、関数が有するパラメータの値を推定する。関数の詳細については後述する。   The parameter estimation unit 14 as an example of an acquisition unit and a calculation unit is a function that is defined so that blur occurring in an image is represented according to a position in the image. The parameter value of the function is estimated using one or a plurality of small regions selected by the region selection unit 13. Details of the function will be described later.

補正手段の一例としてのぼけ補正部15は、パラメータ推定部14により推定されたパラメータの値と、画像受け付け部11から送信された入力画像データとに基づいて、ぼけ補正画像データを生成する。このぼけ補正画像データに基づく画像は、入力画像のぼけを補正したものであり、ぼけが生じる前の元の画像(以下、元画像と称する)として推定されるものである。そして、ぼけ補正部15は、生成したぼけ補正画像データを画像出力部16に送信する。   The blur correction unit 15 as an example of a correction unit generates blur correction image data based on the parameter value estimated by the parameter estimation unit 14 and the input image data transmitted from the image reception unit 11. The image based on the blur-corrected image data is obtained by correcting the blur of the input image, and is estimated as an original image (hereinafter referred to as an original image) before the blur occurs. Then, the blur correction unit 15 transmits the generated blur correction image data to the image output unit 16.

画像出力部16は、ぼけ補正部15から送信されたぼけ補正画像データを外部に出力する。   The image output unit 16 outputs the blur correction image data transmitted from the blur correction unit 15 to the outside.

<ぼけた画像の生成モデルの説明>
次に、ぼけた入力画像が生成されるモデルについて説明する。図3は、本実施の形態に係るぼけた入力画像の生成モデルの一例を示した図である。図3に図示するように、ぼけが生じる前の元画像を元画像x、ぼけが生じた後の入力画像をyで表す。また、一般に、ぼけの特性はPSFで表すことができ、PSFをkとして表すと、ぼけの生成は、PSFの離散的表現であるフィルタカーネルkと元画像xとの畳み込み演算として定式化される。また、ぼけた画像が生成されるモデルとしては、ノイズnも考慮するのが現実的である。そのため、入力画像yは数1式のように表される。
<Description of blurred image generation model>
Next, a model for generating a blurred input image will be described. FIG. 3 is a diagram showing an example of a blurred input image generation model according to the present embodiment. As shown in FIG. 3, an original image before blur is represented as an original image x, and an input image after blur is represented as y. In general, the blur characteristic can be expressed by PSF. If PSF is expressed as k, generation of blur is formulated as a convolution operation between the filter kernel k, which is a discrete expression of PSF, and the original image x. . As a model for generating a blurred image, it is realistic to consider noise n. For this reason, the input image y is expressed as shown in Equation 1.

Figure 2015041200

ただし、k*xは、kとxとの畳み込み演算を表す。
Figure 2015041200

However, k * x represents a convolution operation between k and x.

本実施の形態においては、図3に示す生成モデルに対して、PSF(k)、ノイズnを定義し、ぼけた入力画像がこの生成モデルにより生じたものと仮定し、ぼけた入力画像yから元画像xが推定される。   In the present embodiment, PSF (k) and noise n are defined for the generation model shown in FIG. 3, and it is assumed that a blurred input image is generated by this generation model. The original image x is estimated.

まず、ノイズnとしては、例えば、平均を0、分散をγとしたガウス分布に従うノイズが、各画素に独立に加えられているものとする。   First, as the noise n, for example, noise according to a Gaussian distribution with an average of 0 and a variance of γ is added to each pixel independently.

また、例えば、携帯情報端末のカメラのような高品質ではない機器で撮影した場合、光軸付近のピントは合っているが、周辺部に向かうにつれてぼけの度合いが大きくなることが多い。そこで、PSFとしては、画像上で生じるぼけを固定のPSFで表すのではなく、画像上の位置に応じて特性が変化するPSFで表すこととする。そして、画像のぼけを局所的にほぼ均一のぼけと捉え、例えば、画像上の位置pに生じるぼけを、数2式、数3式のようなガウス分布を表す関数であるガウシアンフィルタのPSFにより求められるものとして定義する。ここで、位置pはガウシアンフィルタにおける中心位置であるものとする。   Also, for example, when shooting with a device that is not of high quality such as a camera of a portable information terminal, the vicinity of the optical axis is in focus, but the degree of blur often increases toward the periphery. Therefore, as the PSF, the blur occurring on the image is not represented by a fixed PSF, but is represented by a PSF whose characteristics change according to the position on the image. Then, the blur of the image is regarded as a substantially uniform blur locally. For example, the blur generated at the position p on the image is determined by the PSF of the Gaussian filter which is a function representing a Gaussian distribution as shown in Equations 2 and 3. Define as required. Here, the position p is assumed to be the center position in the Gaussian filter.

Figure 2015041200
Figure 2015041200

Figure 2015041200
Figure 2015041200

ただし、数2式および数3式において、kはPSFのフィルタカーネル、λはフィルタカーネルの総和を1とするための正規化係数、zはカーネル中心(即ち、中心である位置p)からフィルタカーネルの各要素までの距離、vはぼけの分散、即ちぼけの度合いの大きさを表す。分散vは固定値ではなく画像上の位置pに応じて変化するため、ぼけの度合いは画像上の位置に応じて変化することとなる。   However, in Equations 2 and 3, k is a PSF filter kernel, λ is a normalization coefficient for setting the sum of the filter kernels to 1, and z is a filter kernel from the kernel center (ie, position p which is the center). The distance to each element, v, represents the dispersion of blur, that is, the degree of blur. Since the variance v is not a fixed value but changes according to the position p on the image, the degree of blur changes according to the position on the image.

また、分散vは、画像上の位置pと光軸位置cとの関数として表され、光軸位置cからの距離が遠くなるほど分散が大きい、即ち、画像のぼけが大きくなるように表される。また、||p−c||はpとcとのユークリッド距離であり、aはぼけの大きさの勾配を制御するための係数である。さらに、δは、光軸位置上の分散vが0になると数2式が計算できないために設けられた値であり、0よりは大きいが非常に小さい値として適当に設定する。例えば、画像上の位置pが光軸位置cの場合には、分散はδのみとなり、kはほとんどぼけがない場合のフィルタとして表される。   Further, the variance v is expressed as a function of the position p on the image and the optical axis position c, and the variance increases as the distance from the optical axis position c increases, that is, the blur of the image increases. . || p−c || is the Euclidean distance between p and c, and a is a coefficient for controlling the gradient of the blur. Furthermore, δ is a value provided because Equation 2 cannot be calculated when the dispersion v on the optical axis position becomes 0, and is set appropriately as a value that is larger than 0 but very small. For example, when the position p on the image is the optical axis position c, the variance is only δ, and k is expressed as a filter when there is almost no blur.

数2式、数3式で示したガウシアンフィルタによるぼけの定義により、様々なぼけが統一的に記述される。図4(a)〜(c)は、ガウシアンフィルタによるぼけの一例を示した図である。   Various blurs are uniformly described by the definition of the blur by the Gaussian filter shown in Formula 2 and Formula 3. 4A to 4C are diagrams illustrating an example of blur caused by a Gaussian filter.

図4(a)に示す画像は、ぼけが生じた一般的な画像であり、光軸位置cが画像の中心にあり、光軸位置cからの距離が遠くなる程ぼけが大きくなる画像の例である。係数aは、ぼけの度合いに応じた値が設定される。図4(b)に示す画像は、フラットベッドスキャナ等で読み込まれた画像の例である。この場合、光軸位置cは画像の中心にあり、ほとんどぼけが生じないため係数aは0に近い値が設定される。図4(c)に示す画像は、ぼけのある画像の一部を切り取った画像の例である。光軸位置は画像の左下にあり、係数aは、ぼけの度合いに応じた値が設定される。以上の図4(a)〜(c)に示す画像のぼけについては、数2式、数3式のガウシアンフィルタによるぼけとして表される。   The image shown in FIG. 4A is a general image in which blur has occurred, and an example of an image in which the optical axis position c is at the center of the image and the blur increases as the distance from the optical axis position c increases. It is. The coefficient a is set to a value corresponding to the degree of blur. The image shown in FIG. 4B is an example of an image read by a flat bed scanner or the like. In this case, since the optical axis position c is at the center of the image and hardly blurs, the coefficient a is set to a value close to zero. The image shown in FIG. 4C is an example of an image obtained by cutting out a part of the blurred image. The optical axis position is at the lower left of the image, and the coefficient a is set to a value corresponding to the degree of blur. The blurring of the image shown in FIGS. 4A to 4C is represented as blurring by the Gaussian filters of Formula 2 and Formula 3.

また、元画像xについては、元画像xが持つ性質として画像の事前分布p(x)を定め、元画像xは事前分布p(x)に従うものとする。例えば、ぼけのない自然画像では、グラディエントのヒストグラムが、特定の値に集中するような分布(スパースな分布)を持つとされる。このような性質を利用して、事前分布p(x)が定められる。   Further, for the original image x, an image prior distribution p (x) is defined as a property of the original image x, and the original image x follows the prior distribution p (x). For example, in a natural image without blur, it is assumed that the gradient histogram has a distribution (sparse distribution) that concentrates on a specific value. Using this property, the prior distribution p (x) is determined.

以上のように、PSF(k)、ノイズnを定義し、元画像xの事前分布を定めることで、数1式のパラメータのうち、係数aおよび光軸位置c、ノイズnにおける分散γが未知のパラメータとなる。これらの未知パラメータは、入力画像yから確率的に推定されるものであり、公知の手順を用いることにより推定される。そして、推定された未知パラメータをもとに、公知の手順を用いることで、入力画像のぼけが補正され、元画像の推定が行なわれる。   As described above, by defining PSF (k) and noise n and determining the prior distribution of the original image x, among the parameters of Equation 1, the coefficient a, the optical axis position c, and the variance γ in the noise n are unknown. Parameter. These unknown parameters are probabilistically estimated from the input image y, and are estimated by using a known procedure. Then, using a known procedure based on the estimated unknown parameter, the blur of the input image is corrected and the original image is estimated.

<未知パラメータの推定手順の説明>
次に、パラメータ推定部14が未知パラメータである係数a、光軸位置c、ノイズnの分散γを推定する手順について説明する。この推定手順は公知のものを用いれば良く、ここではその概要を説明する。
<Explanation of unknown parameter estimation procedure>
Next, a procedure for the parameter estimation unit 14 to estimate the coefficient a, the optical axis position c, and the variance γ of the noise n as unknown parameters will be described. As this estimation procedure, a known one may be used, and an outline thereof will be described here.

まず、パラメータ推定部14は、図2に示すような小領域選択部13が選択した小領域について、i番目の小領域riの中心座標をpiとし、小領域riの元画像をxiとする。この場合、入力画像yを表す数1式、およびノイズnが平均を0、分散をγとしたガウス分布に従うことに基づき、小領域riにおける入力画像yiの分布は、数4式のような条件付き分布で表される。   First, the parameter estimation unit 14 sets the center coordinates of the i-th small region ri as pi and the original image of the small region ri as xi for the small region selected by the small region selection unit 13 as shown in FIG. In this case, the distribution of the input image yi in the small region ri is based on the following equation (4) based on the equation 1 representing the input image y and the Gaussian distribution in which the noise n is 0 on average and the variance is γ Expressed with a distribution.

Figure 2015041200

ただし、記号∝は比例関係を表す記号であり、θは数5式のように、未知パラメータa、c、γを表すものである。
Figure 2015041200

However, the symbol 記号 is a symbol representing a proportional relationship, and θ represents the unknown parameters a, c, and γ as shown in Equation 5.

Figure 2015041200
Figure 2015041200

ここで、元画像xの事前分布は、画像上の位置によらずp(x)で一定であるものとする。このとき、公知であるベイズの定理から、xiとyiとの同時分布が数6式のように表される。   Here, it is assumed that the prior distribution of the original image x is constant at p (x) regardless of the position on the image. At this time, from the well-known Bayes' theorem, the simultaneous distribution of xi and yi is expressed as in Equation 6.

Figure 2015041200
Figure 2015041200

なお、p(x)として、上記のように、グラディエントのヒストグラムが特定の値に集中するような分布を持つという性質を利用する場合には、xiおよびyiは画像そのものではなく、そのグラディエントで表した方が、計算処理が軽減される。ただし、式の表現自体は数4式や数5式と同一になるため、ここではxiおよびyiをグラディエントで表す場合も含めて、同一の式表現を用いるものとする。   In addition, when using the property that the gradient histogram has a distribution that concentrates on a specific value as p (x) as described above, xi and yi are not represented by the image itself but represented by the gradient. This will reduce the calculation process. However, since the expression itself is the same as Expression 4 and Expression 5, the same expression is used here, including the case where xi and yi are expressed as gradients.

次に、小領域選択部13により選択された小領域が全部でR個(図2の例では3個)あるものとして、それぞれの小領域が独立していると仮定し、数4式および数6式を用いると、y={yi、y2、・・、yR}、x={x1、x2、・・、xR}の同時分布は数7式のように表される。ただし、p={p1、p2、・・、pR}とする。   Next, assuming that there are a total of R small regions selected by the small region selection unit 13 (three in the example of FIG. 2), each of the small regions is assumed to be independent. Using Equation 6, the simultaneous distribution of y = {yi, y2,..., YR} and x = {x1, x2,..., XR} is expressed as Equation 7. However, p = {p1, p2,..., PR}.

Figure 2015041200
Figure 2015041200

次に、パラメータ推定部14は、未知パラメータθを求める。本実施の形態では、一例として、公知の手順であるEMアルゴリズムを用いる手順について説明する。EMアルゴリズムは尤度を最大化する未知パラメータを反復計算により求める手法である。本実施の形態において、尤度は図3のぼけた入力画像の生成モデルにより観測された入力画像yが生成される確率のθに関する関数であり、条件付き分布P(y|θ)で表される。即ち、図3の生成モデルによって、実際に観測された入力画像yが生成される確率が最も高くなるような未知パラメータθを求めることとなる。   Next, the parameter estimation unit 14 obtains an unknown parameter θ. In this embodiment, as an example, a procedure using an EM algorithm, which is a known procedure, will be described. The EM algorithm is a technique for obtaining an unknown parameter that maximizes the likelihood by iterative calculation. In the present embodiment, the likelihood is a function related to θ of the probability that the input image y observed by the blurred input image generation model of FIG. 3 is generated, and is expressed by a conditional distribution P (y | θ). The That is, the unknown parameter θ that gives the highest probability that the actually observed input image y is generated is obtained by the generation model shown in FIG.

以下、EMアルゴリズムの各ステップについて説明する。まず、EMアルゴリズムにおける初期化が行われる。ここでは、パラメータ推定部14は、未知パラメータを予想される値で初期化し、これを数8式のようにθOLDとする。EMアルゴリズムでは、最終的に求められる値(本実施の形態では未知パラメータθ)が、初期化で定めた値に依存する場合がある。そのため、初期化で定める値は予想される値とした方が良いが、予想できない場合にはどのような値を定めても良いものとする。 Hereinafter, each step of the EM algorithm will be described. First, initialization in the EM algorithm is performed. Here, the parameter estimation unit 14 initializes an unknown parameter with an expected value, and sets this as θ OLD as shown in Equation 8. In the EM algorithm, the finally obtained value (unknown parameter θ in the present embodiment) may depend on the value determined by initialization. For this reason, the value determined by initialization should be an expected value, but any value may be determined if it cannot be predicted.

Figure 2015041200
Figure 2015041200

次に、EMアルゴリズムにおけるEステップが行われる。ここでは、パラメータ推定部14は、元画像xを未知の潜在変数として、現在の未知パラメータθOLDに対するxの事後分布q(x)を求める。事後分布q(x)は数9式のように表される。 Next, the E step in the EM algorithm is performed. Here, the parameter estimation unit 14 obtains the posterior distribution q (x) of x with respect to the current unknown parameter θ OLD using the original image x as an unknown latent variable. The posterior distribution q (x) is expressed as Equation 9.

Figure 2015041200
Figure 2015041200

次に、パラメータ推定部14は、完全データ対数尤度log p(x, y | p, θ)の、qに関する期待値を求め、これを数10式のようにQ(θ、θOLD)とする。完全データ対数尤度内のθは現在値θOLD(固定値)ではなく、変数である。 Next, the parameter estimation unit 14 obtains an expected value for q of the complete data log likelihood log p (x, y | p, θ), and this is expressed as Q (θ, θ OLD ) as shown in Equation 10. To do. Θ in the complete data log likelihood is a variable, not the current value θ OLD (fixed value).

Figure 2015041200
Figure 2015041200

次に、EMアルゴリズムにおけるMステップが行われる。ここでは、パラメータ推定部14は、Eステップで求めた数10式のQ(θ、θOLD)が最大となるθを求め、これを更新後の未知パラメータθnewとする。θnewは数11式のように表される。 Next, the M step in the EM algorithm is performed. Here, the parameter estimation unit 14 obtains θ that maximizes Q (θ, θ OLD ) of Formula 10 obtained in E step, and sets this as the updated unknown parameter θ new . θ new is expressed as in Expression 11.

Figure 2015041200
Figure 2015041200

パラメータ推定部14は、数11式で表されるθnewを求めると、求めたθnewが収束した値であるか否かを判定する。θnewが収束した値ではない場合、パラメータ推定部14は、θnewを数9式のθOLDに代入して、再びEステップから繰り返す。θの収束の判定手法としては、例えば、θの各要素の変化率が予め定められた値を下回るか否かを確認するという手法がある。収束後のθnewをθとすると、θは数12式のように表される。 When the parameter estimation unit 14 obtains θ new represented by Equation 11, it determines whether the obtained θ new is a converged value. If θ new is not a converged value, the parameter estimation unit 14 substitutes θ new for θ OLD in Equation 9, and repeats from step E again. As a method for determining the convergence of θ, for example, there is a method of confirming whether or not the rate of change of each element of θ is below a predetermined value. Assuming that θ new after convergence is θ * , θ * is expressed as shown in Equation 12.

Figure 2015041200
Figure 2015041200

以上のようにして、パラメータ推定部14は、未知パラメータθ、即ち、係数a、光軸位置c、ノイズnの分散γを推定する。また、EステップおよびMステップにおいて、例えば、元画像xの事前分布p(x)がガウス分布の場合には、未知パラメータθは算出されるが、q(x)やQ(θ、θOLD)が複雑な式になるとθが算出されない場合もある。このような場合には、パラメータ推定部14は、例えば、公知のサンプリング法、変分法、一般化EMアルゴリズム等を利用して、未知パラメータθを求めても良い。 As described above, the parameter estimation unit 14 estimates the unknown parameter θ, that is, the coefficient a, the optical axis position c, and the variance γ of the noise n. In the E step and the M step, for example, when the prior distribution p (x) of the original image x is a Gaussian distribution, the unknown parameter θ is calculated, but q (x) and Q (θ, θ OLD ) In some cases, θ may not be calculated. In such a case, the parameter estimation unit 14 may obtain the unknown parameter θ using, for example, a known sampling method, variation method, generalized EM algorithm, or the like.

<元画像の推定手順の説明>
次に、ぼけ補正部15が元画像xを推定する手順について説明する。この推定手順は公知のものを用いれば良く、ここではその概要を説明する。
まず、数9式に示されるxの事後分布に関するxの期待値が求まる場合や、事後分布を最大化するxが求まる場合には、ぼけ補正部15は、それぞれ数13式、数14式のように、これらの値をもって元画像の推定値xとしても良い。
<Description of estimation procedure of original image>
Next, a procedure for the blur correction unit 15 to estimate the original image x will be described. As this estimation procedure, a known one may be used, and an outline thereof will be described here.
First, when the expected value of x related to the posterior distribution of x shown in Equation 9 is obtained, or when x that maximizes the posterior distribution is obtained, the blur correction unit 15 performs Equation 13 and Equation 14 respectively. Thus, these values may be used as the estimated value x * of the original image.

Figure 2015041200
Figure 2015041200

Figure 2015041200
Figure 2015041200

また、本実施の形態では、上記のEMアルゴリズムによって、ぼけのPSFのパラメータ(a、c)も、ノイズnの分散γも推定される。そのため、ぼけ補正部15は、公知のWiener filterにより元画像を推定しても良い。 In this embodiment, the above-described EM algorithm estimates the blur PSF parameters (a * , c * ) and the variance γ * of noise n. Therefore, the blur correction unit 15 may estimate the original image using a known Wiener filter.

同様に、EMアルゴリズムによってぼけのPSFのパラメータ(a、c)は推定されるため、ぼけ補正部15は、PSFが既知の場合の一般的なdeconvolution(逆畳み込み)アルゴリズムである、Richardson−Lucy deconvolutionを用いて、元画像を推定しても良い。 Similarly, since the parameters (a * , c * ) of the blur PSF are estimated by the EM algorithm, the blur correction unit 15 is a Richardson-, which is a general devolution algorithm when the PSF is known. The original image may be estimated using Lucy decomposition.

<元画像を推定するフローチャートの説明>
次に、画像処理装置1が元画像を推定するフローについて説明する。図5は、本実施の形態に係る画像処理装置1が元画像を推定する手順の一例を示したフローチャートである。
<Description of Flowchart for Estimating Original Image>
Next, a flow in which the image processing apparatus 1 estimates an original image will be described. FIG. 5 is a flowchart illustrating an example of a procedure by which the image processing apparatus 1 according to the present embodiment estimates an original image.

まず、画像受け付け部11は、外部から入力画像データを受け付ける(ステップ101)。そして、画像受け付け部11は、入力画像データを画像分割部12およびぼけ補正部15に送信する。画像分割部12は、画像受け付け部11から送信された入力画像データに基づく入力画像を縦横にm×n個の小領域に分割する(ステップ102)。そして、画像分割部12は、入力画像を複数の小領域に分割した後、その入力画像データを小領域選択部13に送信する。   First, the image receiving unit 11 receives input image data from the outside (step 101). Then, the image receiving unit 11 transmits the input image data to the image dividing unit 12 and the blur correction unit 15. The image dividing unit 12 divides the input image based on the input image data transmitted from the image receiving unit 11 vertically and horizontally into m × n small regions (step 102). Then, the image dividing unit 12 divides the input image into a plurality of small areas, and then transmits the input image data to the small area selecting unit 13.

小領域選択部13は、画像分割部12により分割された入力画像の各小領域について、画素値の分布の度合いを示すエントロピーを計算する(ステップ103)。次に、小領域選択部13は、計算したエントロピーをもとに、エントロピーの大きい上位K個の小領域を選択する(ステップ104)。そして、小領域選択部13は、選択したK個の小領域をパラメータ推定部14に送信する。   The small region selection unit 13 calculates entropy indicating the degree of distribution of pixel values for each small region of the input image divided by the image dividing unit 12 (step 103). Next, the small region selection unit 13 selects the top K small regions having the largest entropy based on the calculated entropy (step 104). Then, the small region selection unit 13 transmits the selected K small regions to the parameter estimation unit 14.

パラメータ推定部14は、ぼけた入力画像の生成モデルにおけるPSF(k)、ノイズnに関して定義された関数、元画像xの事前分布に対して、小領域選択部13から送信されたK個の小領域を用いて、未知パラメータ(a、c、γ)を推定する(ステップ105)。ここで、パラメータ推定部14は、i番目の小領域riの中心座標をpi、小領域riの元画像をxiとし、入力画像yiの分布を条件付き分布で表す。また、パラメータ推定部14は、ベイズの定理を用いて、xiとyiとの同時分布を求める。さらに、パラメータ推定部14は、EMアルゴリズムを用いて、尤度を最大化する未知パラメータ(a、c、γ)を推定する。 The parameter estimation unit 14 performs K small transmissions transmitted from the small region selection unit 13 on the PSF (k) in the generation model of the blurred input image, the function defined for the noise n, and the prior distribution of the original image x. Using the region, unknown parameters (a * , c * , γ * ) are estimated (step 105). Here, the parameter estimation unit 14 represents the distribution of the input image yi as a conditional distribution, where pi is the center coordinate of the i-th small region ri, xi is the original image of the small region ri. Further, the parameter estimation unit 14 obtains a simultaneous distribution of xi and yi using Bayes' theorem. Furthermore, the parameter estimation unit 14 estimates an unknown parameter (a * , c * , γ * ) that maximizes the likelihood using the EM algorithm.

ぼけ補正部15は、パラメータ推定部14により推定された未知パラメータ(a、c、γ)を用いて、画像受け付け部11から送信された入力画像データからぼけ補正画像データを生成し、元画像を推定する(ステップ106)。ここで、ぼけ補正部15は、元画像の推定において、小領域選択部13から送信されたK個の小領域を用いても良い。その後、画像出力部16はぼけ補正画像データを外部に出力し、本処理フローは終了する。 The blur correction unit 15 generates blur correction image data from the input image data transmitted from the image reception unit 11 using the unknown parameters (a * , c * , γ * ) estimated by the parameter estimation unit 14, An original image is estimated (step 106). Here, the blur correction unit 15 may use the K small regions transmitted from the small region selection unit 13 in the estimation of the original image. Thereafter, the image output unit 16 outputs the blur-corrected image data to the outside, and this processing flow ends.

以上のように、本実施の形態に係る画像処理装置1は、画像で生じているぼけについて定義された関数のパラメータを推定することにより、ぼけた入力画像の情報からPSFや元画像の推定を行う。画像処理装置1は、PSFや元画像の推定に際し、入力画像を分割した小領域のうち選択した小領域を用いて、係数a、光軸位置cのように数少ないパラメータを推定すれば良い。また、画像処理装置1が選択する小領域については、パラメータを推定するのに足りる数であれば良い。そのため、例えば、入力画像の全ての小領域に対してPSFを推定する構成と比較して、入力画像のぼけを補正して元画像を推定するための処理時間が短縮される。また、画像処理装置1は、入力画像で生じているぼけに対して、固定のPSFを用いるのではなく、画像上の位置に応じて変化するPSFを表した関数を用いる。そのため、画像内で不均一なぼけが生じている場合であっても、元画像を推定する処理時間が短縮される。   As described above, the image processing apparatus 1 according to the present embodiment estimates the PSF and the original image from the information of the blurred input image by estimating the parameters of the function defined for the blur occurring in the image. Do. When estimating the PSF or the original image, the image processing apparatus 1 may estimate few parameters such as the coefficient a and the optical axis position c by using the selected small area among the small areas obtained by dividing the input image. Further, the small area selected by the image processing apparatus 1 may be any number that is sufficient to estimate the parameters. Therefore, for example, the processing time for correcting the blur of the input image and estimating the original image is shortened as compared with the configuration in which the PSF is estimated for all the small regions of the input image. In addition, the image processing apparatus 1 uses a function representing a PSF that changes according to a position on the image, instead of using a fixed PSF for blurring that occurs in the input image. For this reason, even when non-uniform blur occurs in the image, the processing time for estimating the original image is shortened.

また、画像処理装置1は、PSFが既知でなくても、入力画像の情報から元画像の推定を行う。そのため、画像処理装置1は、例えば、画像処理装置へ画像を入力する機器が特定できない画像共有サービス等に対しても適用される。さらに、画像処理装置1は、関数によりPSFをモデル化することで、例えば、PSFの形状を任意として元画像を推定する構成と比較して、PSFや元画像の推定を精度良く高速に行う。また、画像処理装置1は、例えば、原稿の領域に応じてエッジ強調のような画像強調処理を行う構成と比較して、PSFを用いた高精度なぼけの補正を行う。   Further, the image processing apparatus 1 estimates the original image from the information of the input image even if the PSF is not known. Therefore, the image processing apparatus 1 is also applied to, for example, an image sharing service in which a device that inputs an image to the image processing apparatus cannot be specified. Furthermore, the image processing apparatus 1 models the PSF by a function, and thus, the PSF and the original image are estimated with high accuracy and high speed as compared with, for example, a configuration in which the shape of the PSF is arbitrarily set and the original image is estimated. In addition, the image processing apparatus 1 performs high-precision blur correction using PSF, for example, as compared with a configuration in which image enhancement processing such as edge enhancement is performed according to a document area.

また、本実施の形態において、ぼけを定義するガウシアンフィルタを大きくすれば、ぼけ補正の精度が向上する。ただし、ガウシアンフィルタを大きくする程、未知パラメータや元画像を推定するための処理時間が増加する。そのため、ガウシアンフィルタの大きさは、必要とする補正の精度や処理時間に基づいて決定されるものとする。   In the present embodiment, if the Gaussian filter that defines the blur is increased, the accuracy of blur correction is improved. However, the larger the Gaussian filter, the longer the processing time for estimating unknown parameters and original images. For this reason, the size of the Gaussian filter is determined based on the required correction accuracy and processing time.

また、本実施の形態において、画像のぼけを定義するガウシアンフィルタの分散を数3式のように表したが、これに限られるものではない。分散を数3式のように表せば、画像のぼけは、例えば、レンズにより生じるぼけのように、光軸位置cからの距離が等しい箇所では同じぼけが発生するような等方性のぼけとして表される。一方、例えば、ガウシアンフィルタの分散を数15式のように表せば、画像のぼけは、光軸位置cからの距離が等しい箇所であっても異なるぼけが発生するような非等方性のぼけとして表される。   Further, in the present embodiment, the variance of the Gaussian filter that defines the blurring of the image is expressed as in Equation 3, but the present invention is not limited to this. If the dispersion is expressed by the equation (3), the blur of the image is an isotropic blur in which the same blur occurs at a position where the distance from the optical axis position c is equal, such as a blur caused by a lens. expressed. On the other hand, for example, if the variance of the Gaussian filter is expressed as in Expression 15, the blur of the image is an anisotropic blur in which different blurs occur even at a location where the distance from the optical axis position c is equal. Represented as:

Figure 2015041200

ただし、数15式において、pは画像上の位置、cは光軸位置、bはぼけの大きさの勾配を制御するための係数である。また、δは数3式と同様に0よりは大きいが非常に小さい値が設定される。さらに、Σは分散共分散行列であり、tは転置、Σ-1はΣの逆行列であることを表す。
Figure 2015041200

In Equation 15, p is a position on the image, c is an optical axis position, and b is a coefficient for controlling the gradient of blur. Also, δ is set to a very small value that is larger than 0 as in Equation 3. Furthermore, Σ is a variance-covariance matrix, t is transposed, and Σ −1 is an inverse matrix of Σ.

また、本実施の形態において、画像のぼけのPSFをガウシアンフィルタで定義したが、これに限られるものではなく、例えば、平均化フィルタ等の別の関数によりぼけのPSFを定義しても良い。   In the present embodiment, the blurred PSF of the image is defined by the Gaussian filter. However, the present invention is not limited to this. For example, the blurred PSF may be defined by another function such as an averaging filter.

<適用可能な画像形成装置の説明>
本発明の実施の形態に係る画像処理装置1の機能は、画像処理装置1を備えた画像形成装置において実現してもよい。そこで、画像処理装置1の処理を画像形成装置20で実現するものとして、画像形成装置20の構成例について説明する。図6は、本実施の形態に係る画像処理装置1の機能を実現する画像形成装置20の一例を示した図である。
<Description of Applicable Image Forming Apparatus>
The functions of the image processing apparatus 1 according to the embodiment of the present invention may be realized in an image forming apparatus including the image processing apparatus 1. Therefore, a configuration example of the image forming apparatus 20 will be described on the assumption that the processing of the image processing apparatus 1 is realized by the image forming apparatus 20. FIG. 6 is a diagram illustrating an example of the image forming apparatus 20 that implements the functions of the image processing apparatus 1 according to the present embodiment.

図6に示す画像形成装置20は、例えば複写機能やスキャナ機能、プリント機能、ファクシミリ機能等を複合的に備えた多機能機であって、各色の画像データに基づき用紙に画像を形成する画像形成手段の一例としての画像形成部21と、画像形成装置20全体の動作を制御する制御部22と、パーソナルコンピュータ(PC)やスキャナ等と通信を行い、画像データを受信する通信部23と、公衆回線を通じて画像の送受信を行うファクシミリ(FAX)部24とを備える。また、画像形成装置20は、通信部23やFAX部24から転送された画像データに対して、画像処理装置1におけるぼけ補正の処理を施してぼけ補正画像データを生成する生成手段の一例としての画像処理部25を備えている。   An image forming apparatus 20 shown in FIG. 6 is a multi-function machine that is provided with, for example, a copying function, a scanner function, a printing function, a facsimile function, and the like, and forms an image on a sheet based on image data of each color. An image forming unit 21 as an example of a unit, a control unit 22 that controls the operation of the entire image forming apparatus 20, a communication unit 23 that communicates with a personal computer (PC), a scanner, and the like and receives image data, and a public And a facsimile (FAX) unit 24 that transmits and receives images through a line. Further, the image forming apparatus 20 is an example of a generation unit that generates blur correction image data by performing blur correction processing in the image processing apparatus 1 on the image data transferred from the communication unit 23 or the FAX unit 24. An image processing unit 25 is provided.

画像形成装置20では、制御部22による動作制御の下で、次のようなプロセスによる画像形成処理が行われる。まず、転送された画像データに対して画像処理部25によりぼけ補正画像データが生成された後、生成されたぼけ補正画像データは画像形成部21に送られる。画像形成部21では、ぼけ補正画像データに基づいて、電子写真方式やインクジェット方式により用紙上に画像を形成して出力する。   In the image forming apparatus 20, under the operation control by the control unit 22, image forming processing by the following process is performed. First, the image processing unit 25 generates blur correction image data for the transferred image data, and then the generated blur correction image data is sent to the image forming unit 21. The image forming unit 21 forms and outputs an image on a sheet by an electrophotographic method or an ink jet method based on the blur correction image data.

<適用可能なコンピュータの説明>
ところで、本発明の実施の形態における画像処理装置1の処理は、汎用のコンピュータにおいて実現してもよい。そこで、この処理をコンピュータで実現するものとして、そのハードウェア構成について説明する。
<Description of applicable computers>
By the way, the processing of the image processing apparatus 1 in the embodiment of the present invention may be realized by a general-purpose computer. Therefore, the hardware configuration will be described assuming that this processing is realized by a computer.

図7は、本実施の形態に係る画像処理装置1のハードウェア構成の一例を示した図である。図示するように、画像処理装置1は、演算手段であるCPU(Central Processing Unit)31と、記憶手段であるメインメモリ32及び磁気ディスク装置(HDD:Hard Disk Drive)33とを備える。ここで、CPU31は、OS(Operating System)やアプリケーション等の各種ソフトウェアを実行し、画像処理装置1の各機能を実現する。また、メインメモリ32は、各種ソフトウェアやその実行に用いるデータ等を記憶する記憶領域であり、磁気ディスク装置33は、本実施の形態に係る画像処理装置1の各機能を実現するためのプログラムを格納している。そして、このプログラムがメインメモリ32にロードされ、このプログラムに基づく処理がCPU31により実行されることで、各機能が実現される。さらに、画像処理装置1は、外部との通信を行うための通信I/F34を備える。   FIG. 7 is a diagram illustrating an example of a hardware configuration of the image processing apparatus 1 according to the present embodiment. As shown in the figure, the image processing apparatus 1 includes a CPU (Central Processing Unit) 31 that is a calculation means, a main memory 32 that is a storage means, and a magnetic disk device (HDD: Hard Disk Drive) 33. Here, the CPU 31 executes various software such as an OS (Operating System) and an application, and realizes each function of the image processing apparatus 1. The main memory 32 is a storage area for storing various types of software and data used for executing the software, and the magnetic disk device 33 stores programs for realizing the functions of the image processing apparatus 1 according to the present embodiment. Storing. Each function is realized by loading this program into the main memory 32 and executing processing based on this program by the CPU 31. Further, the image processing apparatus 1 includes a communication I / F 34 for performing communication with the outside.

具体的には、画像処理装置1において、CPU31が行う指示により、入力画像の分割や、小領域の選択、未知パラメータの推定、元画像の推定等が行われる。また、入力画像データの受け付けやぼけ補正画像データの出力は、通信I/F34を介して行われる。   Specifically, in the image processing apparatus 1, an input image is divided, a small area is selected, an unknown parameter is estimated, an original image is estimated, and the like according to an instruction given by the CPU 31. In addition, reception of input image data and output of blur correction image data are performed via the communication I / F 34.

<プログラムの説明>
以上説明を行った本実施の形態における画像処理装置1が行う処理は、例えば、アプリケーションソフトウェア等のプログラムとして用意される。
<Description of the program>
The processing performed by the image processing apparatus 1 according to the present embodiment described above is prepared as a program such as application software, for example.

よって、画像処理装置1が行う処理は、コンピュータに、入力された画像データを受け付ける機能と、受け付けられた画像データを複数の領域に分割する機能と、画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数の変数を有する関数を取得する機能と、分割された複数の領域から、取得された関数が有する変数の値を算出するための1または複数の領域を選択する機能と、選択された1または複数の領域を用いて、取得された関数が有する変数の値を算出する機能と、算出された変数の値と受け付けられた画像データとに基づいて、画像データにおける画像のぼけを補正する機能とを実現させるためのプログラムとして捉えることもできる。   Therefore, the processing performed by the image processing apparatus 1 includes a function for receiving input image data, a function for dividing the received image data into a plurality of areas, and a position in the image where blur is generated in the image. 1 for calculating a value of a variable possessed by the acquired function from a plurality of divided areas and a function for obtaining a function having a plurality of variables. Or a function for selecting a plurality of areas, a function for calculating a value of a variable of the acquired function using the selected one or a plurality of areas, a value of the calculated variable, and received image data, Based on the above, it can also be understood as a program for realizing a function of correcting image blur in image data.

なお、本発明の実施の形態を実現するプログラムは、通信手段により提供することはもちろん、CD−ROM等の記録媒体に格納して提供することも可能である。   The program for realizing the embodiment of the present invention can be provided not only by a communication means but also by storing it in a recording medium such as a CD-ROM.

1…画像処理装置、11…画像受け付け部、12…画像分割部、13…小領域選択部、14…パラメータ推定部、15…ぼけ補正部、16…画像出力部 DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus, 11 ... Image reception part, 12 ... Image division part, 13 ... Small area | region selection part, 14 ... Parameter estimation part, 15 ... Blur correction part, 16 ... Image output part

Claims (5)

入力された画像データを受け付ける受け付け手段と、
前記受け付け手段により受け付けられた前記画像データを複数の領域に分割する分割手段と、
画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数の変数を有する当該関数を取得する取得手段と、
前記分割手段により分割された前記複数の領域から、前記取得手段により取得された前記関数が有する変数の値を算出するための1または複数の領域を選択する選択手段と、
前記選択手段により選択された前記1または複数の領域を用いて、前記取得手段により取得された前記関数が有する変数の値を算出する算出手段と、
前記算出手段により算出された前記変数の値と前記受け付け手段により受け付けられた前記画像データとに基づいて、当該画像データにおける画像のぼけを補正する補正手段と
を備えた画像処理装置。
Receiving means for receiving input image data;
Dividing means for dividing the image data received by the receiving means into a plurality of regions;
An acquisition means for acquiring the function having a plurality of variables, the function being defined so that blur occurring in the image is represented according to a position in the image;
Selecting means for selecting one or a plurality of areas for calculating a value of a variable included in the function acquired by the acquiring means from the plurality of areas divided by the dividing means;
A calculating unit that calculates a value of a variable included in the function acquired by the acquiring unit, using the one or more regions selected by the selecting unit;
An image processing apparatus comprising: a correction unit that corrects image blur in the image data based on the value of the variable calculated by the calculation unit and the image data received by the reception unit.
前記関数はガウス分布を表す関数で定義されることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the function is defined by a function representing a Gaussian distribution. 前記選択手段は、前記分割手段により分割された前記複数の領域のうち、当該領域内の画素値の分布が不均一な当該領域を選択することを特徴とする請求項1または2に記載の画像処理装置。   3. The image according to claim 1, wherein the selection unit selects, from among the plurality of regions divided by the division unit, the region having a non-uniform distribution of pixel values in the region. Processing equipment. 入力された画像データである入力画像データを受け付ける受け付け手段と、
前記受け付け手段により受け付けられた前記入力画像データを複数の領域に分割する分割手段と、
画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数の変数を有する当該関数を取得する取得手段と、
前記分割手段により分割された前記複数の領域から、前記取得手段により取得された前記関数が有する変数の値を算出するための1または複数の領域を選択する選択手段と、
前記選択手段により選択された前記1または複数の領域を用いて、前記取得手段により取得された前記関数が有する変数の値を算出する算出手段と、
前記算出手段により算出された前記変数の値と前記受け付け手段により受け付けられた前記入力画像データとに基づいて、当該入力画像データにおける画像のぼけを補正したぼけ補正画像データを生成する生成手段と、
前記生成手段により生成された前記ぼけ補正画像データに基づいて記録材に画像を形成する画像形成手段と
を備えた画像形成装置。
Receiving means for receiving input image data, which is input image data;
Dividing means for dividing the input image data received by the receiving means into a plurality of regions;
An acquisition means for acquiring the function having a plurality of variables, the function being defined so that blur occurring in the image is represented according to a position in the image;
Selecting means for selecting one or a plurality of areas for calculating a value of a variable included in the function acquired by the acquiring means from the plurality of areas divided by the dividing means;
A calculating unit that calculates a value of a variable included in the function acquired by the acquiring unit, using the one or more regions selected by the selecting unit;
Generating means for generating blur-corrected image data obtained by correcting image blur in the input image data based on the value of the variable calculated by the calculating means and the input image data received by the receiving means;
An image forming apparatus comprising: an image forming unit that forms an image on a recording material based on the blur correction image data generated by the generating unit.
コンピュータに、
入力された画像データを受け付ける機能と、
受け付けられた前記画像データを複数の領域に分割する機能と、
画像に生じているぼけが画像内の位置に応じて表されるように定義された関数であり、複数の変数を有する当該関数を取得する機能と、
分割された前記複数の領域から、取得された前記関数が有する変数の値を算出するための1または複数の領域を選択する機能と、
選択された前記1または複数の領域を用いて、取得された前記関数が有する変数の値を算出する機能と、
算出された前記変数の値と受け付けられた前記画像データとに基づいて、当該画像データにおける画像のぼけを補正する機能と
を実現させるためのプログラム。
On the computer,
A function to accept input image data;
A function of dividing the received image data into a plurality of regions;
A function defined so that blur occurring in the image is represented according to the position in the image, and a function of acquiring the function having a plurality of variables;
A function of selecting one or a plurality of regions for calculating a value of a variable included in the acquired function from the plurality of divided regions;
A function of calculating a value of a variable included in the acquired function using the selected one or more regions;
A program for realizing a function of correcting blurring of an image in the image data based on the calculated value of the variable and the received image data.
JP2013171293A 2013-08-21 2013-08-21 Image processor, image forming apparatus, and program Pending JP2015041200A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013171293A JP2015041200A (en) 2013-08-21 2013-08-21 Image processor, image forming apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013171293A JP2015041200A (en) 2013-08-21 2013-08-21 Image processor, image forming apparatus, and program

Publications (1)

Publication Number Publication Date
JP2015041200A true JP2015041200A (en) 2015-03-02

Family

ID=52695337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013171293A Pending JP2015041200A (en) 2013-08-21 2013-08-21 Image processor, image forming apparatus, and program

Country Status (1)

Country Link
JP (1) JP2015041200A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9996908B2 (en) 2015-06-17 2018-06-12 Canon Kabushiki Kaisha Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for estimating blur
US10002411B2 (en) 2015-06-17 2018-06-19 Canon Kabushiki Kaisha Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for estimating blur

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9996908B2 (en) 2015-06-17 2018-06-12 Canon Kabushiki Kaisha Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for estimating blur
US10002411B2 (en) 2015-06-17 2018-06-19 Canon Kabushiki Kaisha Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for estimating blur

Similar Documents

Publication Publication Date Title
JP4799428B2 (en) Image processing apparatus and method
US11188777B2 (en) Image processing method, image processing apparatus, learnt model manufacturing method, and image processing system
EP2574038B1 (en) Image capturing apparatus, image processing apparatus, image processing method, and image processing program
JP6218402B2 (en) Method and apparatus for removing non-uniform motion blur in large input images based on tile units
JP2011248479A (en) Image processing device, image processing method and program
JP2013192224A (en) Method and apparatus for deblurring non-uniform motion blur using multi-frame including blurred image and noise image
KR101839617B1 (en) Method and apparatus for removing non-uniform motion blur using multiframe
JP2005332383A (en) Image processing method, device and program
JP2011039675A (en) Apparatus and method for processing image, and computer program
JP2011128978A (en) Information processor, information processing method and program
KR101181161B1 (en) An apparatus and a method for deblurring image blur caused by camera ego motion
JP5751254B2 (en) Image processing system, image processing method, and image processing program
JP6355315B2 (en) Image processing apparatus, image processing method, and program
JP5426953B2 (en) Image processing apparatus and method
JP2015041200A (en) Image processor, image forming apparatus, and program
JP2005063097A (en) Image signal processing device and method, program, and recording media
JP2007299068A (en) Image processing device and image restoration method
JP6624061B2 (en) Image processing method, image processing device, and recording medium for storing image processing program
Son et al. Iterative inverse halftoning based on texture-enhancing deconvolution and error-compensating feedback
CN115496673A (en) Image processing method, image processing apparatus, image processing system, and storage medium
JP6652052B2 (en) Image processing apparatus and image processing method
JP2014048714A (en) Image processing apparatus and image processing method
McCrackin et al. Strategic image denoising using a support vector machine with seam energy and saliency features
JP2015076676A (en) Image processing apparatus, image processing method, and program
JP4779449B2 (en) Image processing apparatus and method, recording medium, and program