JP6562650B2 - Image processing apparatus, imaging apparatus, image processing method, and image processing program - Google Patents

Image processing apparatus, imaging apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP6562650B2
JP6562650B2 JP2015028511A JP2015028511A JP6562650B2 JP 6562650 B2 JP6562650 B2 JP 6562650B2 JP 2015028511 A JP2015028511 A JP 2015028511A JP 2015028511 A JP2015028511 A JP 2015028511A JP 6562650 B2 JP6562650 B2 JP 6562650B2
Authority
JP
Japan
Prior art keywords
image
data
generated
filters
imaging
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.)
Active
Application number
JP2015028511A
Other languages
Japanese (ja)
Other versions
JP2016152481A5 (en
JP2016152481A (en
Inventor
崇 鬼木
崇 鬼木
弘至 畠山
弘至 畠山
貴嘉 横山
貴嘉 横山
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2015028511A priority Critical patent/JP6562650B2/en
Publication of JP2016152481A publication Critical patent/JP2016152481A/en
Publication of JP2016152481A5 publication Critical patent/JP2016152481A5/ja
Application granted granted Critical
Publication of JP6562650B2 publication Critical patent/JP6562650B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)

Description

本発明は、デジタルカメラ等の撮像装置により生成された画像に対して鮮鋭化のための処理を行う画像処理技術に関する。   The present invention relates to an image processing technique for performing a sharpening process on an image generated by an imaging apparatus such as a digital camera.

デジタルカメラ等の撮像装置による撮像により生成された画像(入力画像)の鮮鋭度を向上させるための処理として、アンシャープマスク処理(鮮鋭化処理)が知られている。アンシャープマスク処理は、入力画像に対してアンシャープマスクを適用することでぼかした画像と元の入力画像との差分をとり、この差分のデータを入力画像に対して加算することで鮮鋭化を実現する。アンシャープマスクには平滑化フィルタ等の画像をぼかすためのフィルタが使用され、ぼかされた画像と入力画像との差分が大きい画像領域ほどより鮮鋭化される。   An unsharp mask process (sharpening process) is known as a process for improving the sharpness of an image (input image) generated by imaging with an imaging device such as a digital camera. Unsharp mask processing takes the difference between the blurred image and the original input image by applying an unsharp mask to the input image, and sharpens it by adding the difference data to the input image. Realize. A filter for blurring an image such as a smoothing filter is used for the unsharp mask, and an image region having a larger difference between the blurred image and the input image is sharpened.

また、特許文献1には、像高方向(メリジオナル方向)に並んだ画素信号列に対して非対称な1次元フィルタを適用することで、光学系の点像強度分布関数(point spread function:PSF)の影響による偽色や不要な色付きを補正する方法が開示されている。   Further, in Patent Document 1, a point spread function (PSF) of an optical system is applied by applying an asymmetric one-dimensional filter to pixel signal sequences arranged in the image height direction (meridional direction). A method for correcting false colors and unnecessary coloring due to the influence of the above is disclosed.

特開2010−81263号公報JP 2010-81263 A

しかしながら、従来のアンシャープマスク処理では、アンシャープマスクとして回転対称なフィルタを用いている。このため、非対称収差やサジタルハロのような複雑な形状のPSFの影響を受けて劣化した入力画像に対しては正しく鮮鋭化することができない。正しく鮮鋭化することができないとは、収差が大きく発生しているアジムス方向の収差を補正しようとすると収差が小さいアジムス方向ではアンダーシュートが発生し、逆にアンダーシュートを抑制すると収差を十分に補正できないという意味である。   However, in the conventional unsharp mask processing, a rotationally symmetric filter is used as the unsharp mask. For this reason, the input image deteriorated due to the influence of the PSF having a complicated shape such as asymmetric aberration or sagittal halo cannot be sharpened correctly. Correct sharpening means that if you try to correct aberrations in the azimuth direction where the aberration is large, undershoot occurs in the azimuth direction where the aberration is small. It means you can't.

また、特許文献1にて開示された方法では、PSFの非対称性や像高に対する変化については考慮されているものの、PSFの像高方向での非対称性しか考慮されていない。このため、該方法にて用いられる補正フィルタも1次元フィルタである。しかし、これでは像高方向以外の方向での非対称性については改善することができない。さらに、特許文献1にて開示された方法では、フィルタに関してもマイナスタップ係数の個数で該フィルタの非対称性を調整している。しかし、これでは像高方向についても、実際の非対称性が光学系のPSFによるぼけ方とは異なる場合には、十分に鮮鋭化することができない。   Further, in the method disclosed in Patent Document 1, although the PSF asymmetry and changes to the image height are taken into consideration, only the PSF asymmetry in the image height direction is considered. For this reason, the correction filter used in the method is also a one-dimensional filter. However, this cannot improve asymmetry in directions other than the image height direction. Furthermore, in the method disclosed in Patent Document 1, the asymmetry of the filter is adjusted by the number of minus tap coefficients. However, even in the image height direction, if the actual asymmetry is different from the blurring caused by the PSF of the optical system, it cannot be sharpened sufficiently.

また、PSFの像高による変化に対応するためには、入力画像を複数の領域に分割し、各領域に対応したPSFや光学情報を予め保持しておく必要がある。特に、精度良くアンシャープマスク処理を行うためには、入力画像を多数の領域に細かく分割し、領域ごとにPSFや光学情報を保持しておく必要がある。しかしながら、これでは保持すべきデータ量が増大する。   Further, in order to cope with a change due to the image height of the PSF, it is necessary to divide the input image into a plurality of areas and to store in advance the PSF and optical information corresponding to each area. In particular, in order to perform unsharp mask processing with high accuracy, it is necessary to finely divide the input image into a large number of regions and hold PSF and optical information for each region. However, this increases the amount of data to be held.

本発明は、保持すべきデータ量の増加を抑制しつつ高精度な鮮鋭化処理を行えるようにした画像処理装置および画像処理方法等を提供する。   The present invention provides an image processing apparatus, an image processing method, and the like that enable high-precision sharpening processing while suppressing an increase in the amount of data to be held.

本発明の一側面としての画像処理装置は、光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行って鮮鋭化画像を生成する。該装置は、撮像の撮像条件に応じた光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得するPSF取得手段と、点像強度分布関数に関する情報を用いて複数の特定像高それぞれ対応する複数のフィルタを生成するフィルタ生成手段と、入力画像に対して複数のフィルタをそれぞれ適用して複数の第1のデータを生成するデータ生成手段と、像高に応じた重み情報を取得する重み取得手段と、重み情報を用いて複数の第1のデータの重み付け合成を行って補正処理に用いられるデータまたは鮮鋭化画像である第2のデータを生成する合成手段とを有し、フィルタ生成手段は、複数の特定像高での点像強度分布関数のそれぞれと理想点像との差分を用いて複数のフィルタを生成し、データ生成手段は、入力画像に対して複数のフィルタをそれぞれ畳み込み積分して複数の第1のデータを生成し、鮮鋭化画像は、補正処理において第2のデータを用いて生成された補正データを入力画像に対して加算することで生成されることを特徴とする。 An image processing apparatus according to one aspect of the present invention generates a sharpened image by performing correction processing for sharpening on an input image generated by imaging through an optical system. The apparatus relates to a PSF acquisition means for acquiring information related to a point image intensity distribution function at a plurality of specific image heights, which is a point image intensity distribution function of an optical system according to an imaging condition, and a point image intensity distribution function data generating filter generating means for generating a plurality of filters which respond respectively are paired, a plurality of first data by applying a plurality of filters respectively to the input image into a plurality of specific image height with information Generation means, weight acquisition means for acquiring weight information according to the image height, and second data that is a weighted composition of a plurality of first data using the weight information and is used for correction processing or a second sharpened image have a synthesizing means for generating a data filter generation unit generates a plurality of filters using the difference between the respectively ideal point image of a point image intensity distribution function of a plurality of specific image height, data generation Means A plurality of filters are convolved and integrated with the force image to generate a plurality of first data, and the sharpened image is obtained by correcting the correction data generated using the second data in the correction process with respect to the input image. It is generated by adding .

なお、上記画像処理装置を含む撮像装置も、本発明の他の一側面を構成する。   Note that an imaging apparatus including the image processing apparatus also constitutes another aspect of the present invention.

また、本発明の他の一側面としての画像処理方法は、光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行って鮮鋭化画像を生成する方法である。該方法は、撮像の撮像条件に応じた光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得し、点像強度分布関数に関する情報を用いて複数の特定像高それぞれ対応する複数のフィルタを生成し、入力画像に対して複数のフィルタをそれぞれ適用して複数の第1のデータを生成し、像高に応じた重み情報を取得し、重み情報を用いて複数の第1のデータの重み付け合成を行って補正処理に用いられるデータまたは鮮鋭化画像である第2のデータを生成し、複数のフィルタは、複数の特定像高での点像強度分布関数のそれぞれと理想点像との差分を用いて生成され、複数の第1のデータは、入力画像に対して複数のフィルタをそれぞれ畳み込み積分することで生成され、鮮鋭化画像は、補正処理において第2のデータを用いて生成された補正データを入力画像に対して加算することで生成されることを特徴とする。
An image processing method according to another aspect of the present invention is a method of generating a sharpened image by performing a correction process for sharpening an input image generated by imaging through an optical system. . The method obtains information on a point image intensity distribution function of an optical system according to an imaging condition of an image, and the information on the point image intensity distribution function at a plurality of specific image heights, and uses the information on the point image intensity distribution function generating a plurality of filters which respond respectively are paired to a plurality of specific image height, by applying a plurality of filters each generate a plurality of first data to the input image, the weight information corresponding to the image height Obtaining and performing weighted synthesis of a plurality of first data using weight information to generate data used for correction processing or second data that is a sharpened image, and the plurality of filters have a plurality of specific image heights. Is generated by using the difference between each of the point image intensity distribution functions and the ideal point image, and a plurality of first data are generated by convolution integration of a plurality of filters with respect to the input image, respectively, and are sharpened. Image is corrected Characterized in that it is produced by adding the correction data generated for the input image using the second data.

なお、上記画像処理方法をコンピュータに行わせる画像処理プログラムも、本発明の他の一側面を構成する。   An image processing program that causes a computer to perform the image processing method also constitutes another aspect of the present invention.

本発明によれば、用意(保持)すべき点像強度分布関数のデータ量を低減しつつ、高精度な鮮鋭化のための補正処理を行うことができる。   According to the present invention, it is possible to perform correction processing for sharpening with high accuracy while reducing the amount of data of the point image intensity distribution function to be prepared (held).

本発明の実施例1である撮像装置の構成を示すブロック図。1 is a block diagram illustrating a configuration of an imaging apparatus that is Embodiment 1 of the present invention. 実施例1にて行われる画像処理を示すフローチャート。3 is a flowchart illustrating image processing performed in the first embodiment. 実施例1にて行われるアンシャープマスク処理(鮮鋭化処理)を示す図。FIG. 3 is a diagram illustrating unsharp mask processing (sharpening processing) performed in the first embodiment. 実施例1の撮像装置における撮像光学系のPSFを示す図。FIG. 3 is a diagram illustrating a PSF of an imaging optical system in the imaging apparatus according to the first embodiment. 回転対称なアンシャープマスクを用いたアンシャープマスク処理を示す図。The figure which shows the unsharp mask process using a rotationally symmetrical unsharp mask. 非回転対称なアンシャープマスクを用いたアンシャープマスク処理を示す図。The figure which shows the unsharp mask process using a non-rotationally symmetrical unsharp mask. 実施例1で用いられるアンシャープマスクを示す図。FIG. 3 is a diagram illustrating an unsharp mask used in the first embodiment. 上記アンシャープマスクの断面図。Sectional drawing of the said unsharp mask. 実施例1にて行われる画像処理の詳細を示すフローチャート。5 is a flowchart illustrating details of image processing performed in the first embodiment. ベイヤー配列を示す図。The figure which shows a Bayer arrangement | sequence. 実施例1における入力画像の分割方法を説明する図。FIG. 6 is a diagram illustrating an input image dividing method according to the first embodiment. 実施例1における像高方向の補間方法を示す図。FIG. 3 is a diagram illustrating an interpolation method in the image height direction in Embodiment 1. 実施例1において行われる画像処理の詳細を示す別のフローチャート。6 is another flowchart showing details of image processing performed in the first embodiment. 実施例1において行われる画像処理の詳細を示す他のフローチャート。9 is another flowchart showing details of image processing performed in the first embodiment. 本発明の実施例2において行われる画像処理の詳細を示すフローチャート。9 is a flowchart showing details of image processing performed in Embodiment 2 of the present invention. 本発明の実施例3において行われる画像処理の詳細を示すフローチャート。10 is a flowchart showing details of image processing performed in Embodiment 3 of the present invention. PSFを保持する像高位置の決定方法を説明する図。The figure explaining the determination method of the image height position holding PSF. PSFを保持する像高位置の決定処理を示すフローチャート。6 is a flowchart showing processing for determining an image height position that holds a PSF. 点像強度分布関数の非対称性の変化を示す図。The figure which shows the change of the asymmetry of a point image intensity distribution function.

以下、本発明の実施例について図面を参照しながら説明する。   Embodiments of the present invention will be described below with reference to the drawings.

はじめに、後述する具体的な実施例において行う鮮鋭化処理としてのアンシャープマスク処理について図3を用いて説明する。図3(A)中の実線は、撮像光学系(以下、単に光学系という)を通した撮像により生成された撮影画像を示し、破線は撮影画像をアンシャープマスクによりぼかした画像(アンシャープ画像)を示す。また、点線は鮮鋭化後の画像(鮮鋭化画像)を示す。また、図3(B)中の実線は、撮影画像とアンシャープ画像との差分である補正成分(補正信号ともいう)を示している。   First, an unsharp mask process as a sharpening process performed in a specific example described later will be described with reference to FIG. A solid line in FIG. 3A indicates a captured image generated by imaging through an imaging optical system (hereinafter simply referred to as an optical system), and a broken line indicates an image obtained by blurring the captured image with an unsharp mask (unsharp image). ). Moreover, a dotted line shows the image (sharpening image) after sharpening. A solid line in FIG. 3B indicates a correction component (also referred to as a correction signal) that is a difference between the captured image and the unsharp image.

ここで、撮影画像をf(x,y)とし、補正成分をh(x,y)とすると、鮮鋭化画像g(x,y)は次式(1)で表すことができる。
g(x,y)=f(x,y)+m×h(x,y) ・・・(1)
式(1)において、mは補正の強さを変化させるための調整係数であり、調整係数mの値を変化させることにより補正量を調整することができる。mは入力画像の位置によらずに一定の定数であってもよいし、入力画像の位置に応じて異ならせることにより入力画像の位置に応じて補正量を調整するようにしてもよい。また、調整係数mは撮影光学系の焦点距離や絞り値および被写体距離といった撮像条件に応じて異ならせることもできる。
また、補正成分h(x,y)は、アンシャープマスクをUSMとすると、
h(x,y)=f(x,y)−f(x,y)*USM(x,y) ・・・(2)
または、式(2)の右辺を変形して、
h(x,y)=f(x,y)*(δ(x,y)−USM(x,y)) ・・・(3)
と表せる。*は畳み込み積分(コンボリューション)を表し、δはデルタ関数(理想点像)を表す。デルタ関数とは、USM(x,y)とタップ数が等しく、中心タップの値が1で、それ以外のタップの値がすべて0であるデータである。
Here, when the captured image is f (x, y) and the correction component is h (x, y), the sharpened image g (x, y) can be expressed by the following equation (1).
g (x, y) = f (x, y) + m × h (x, y) (1)
In Expression (1), m is an adjustment coefficient for changing the strength of correction, and the correction amount can be adjusted by changing the value of the adjustment coefficient m. m may be a fixed constant regardless of the position of the input image, or may be adjusted according to the position of the input image by varying it according to the position of the input image. Further, the adjustment coefficient m can be varied according to imaging conditions such as the focal length, aperture value, and subject distance of the photographing optical system.
The correction component h (x, y) is assumed to be USM as an unsharp mask.
h (x, y) = f (x, y) -f (x, y) * USM (x, y) (2)
Or, transform the right side of Equation (2),
h (x, y) = f (x, y) * (δ (x, y) −USM (x, y)) (3)
It can be expressed. * Represents a convolution integral (convolution), and δ represents a delta function (ideal point image). The delta function is data in which the number of taps is equal to USM (x, y), the value of the center tap is 1, and the values of all other taps are 0.

式(3)は、式(2)とは処理としての演算方法が異なるが、式(2)を変形することで式(3)を表現できるため、式(2)と式(3)は等価な処理といえる。ここでは、式(2)を用いて補正成分の生成について説明する。   Expression (3) differs from Expression (2) in the calculation method as a process, but Expression (3) can be expressed by modifying Expression (2), so Expression (2) and Expression (3) are equivalent. It can be said that it is a processing. Here, generation of a correction component will be described using Expression (2).

式(2)では、撮影画像f(x,y)と撮影画像f(x,y)をアンシャープマスクUSMでぼかしたアンシャープ画像との差分をとることで補正成分h(x,y)を生成している。   In Expression (2), the correction component h (x, y) is obtained by taking the difference between the captured image f (x, y) and the unsharp image obtained by blurring the captured image f (x, y) with the unsharp mask USM. Is generated.

一般的なアンシャープマスク処理では、アンシャープマスクUSMにガウシアンフィルタ、メディアンフィルタおよび移動平均フィルタ等の平滑化フィルタが使用される。例えば、図3(A)中の実線で表せるような撮影画像f(x,y)に対して、アンシャープマスクUSMとしてガウシアンフィルタを使用した場合には、撮影画像f(x,y)をぼかしたアンシャープ画像は図3(A)中の点線で示すようになる。このとき、補正成分h(x,y)は、式(2)に示すように、撮影画像f(x,y)とアンシャープ画像との差分となるため、図3(A)中の実線から同図中の破線を減算することで図3(B)中の実線で表される補正成分を得ることができる。このように算出された補正成分を用いて式(1)の演算を行うことで、図3(A)中に実線で示す撮影画像f(x,y)を図3(A)中に点線で示すように鮮鋭化することができる。   In general unsharp mask processing, smoothing filters such as a Gaussian filter, a median filter, and a moving average filter are used for the unsharp mask USM. For example, when a Gaussian filter is used as an unsharp mask USM for a captured image f (x, y) that can be represented by a solid line in FIG. 3A, the captured image f (x, y) is blurred. The unsharp image is shown by a dotted line in FIG. At this time, the correction component h (x, y) is the difference between the captured image f (x, y) and the unsharp image as shown in the equation (2), and therefore, from the solid line in FIG. By subtracting the broken line in the figure, the correction component represented by the solid line in FIG. 3B can be obtained. By performing the calculation of Expression (1) using the correction component calculated in this way, the captured image f (x, y) indicated by a solid line in FIG. 3A is indicated by a dotted line in FIG. It can be sharpened as shown.

次に、光学系を通した撮像により劣化した撮影画像に対して、アンシャープマスクUSMとして該光学系の点像強度分布関数(以下、PSFという)を用いるアンシャープマスク処理(補正処理)を行うことにより鮮鋭化画像を得る方法について説明する。   Next, an unsharp mask process (correction process) using a point image intensity distribution function (hereinafter referred to as PSF) of the optical system as an unsharp mask USM is performed on a captured image deteriorated by imaging through the optical system. A method for obtaining a sharpened image will be described.

光学系を介して得られた撮影画像f(x,y)は、撮像前の画像(被写体の像)をI(x,y)とし、光学系のPSFをpsf(x,y)とするとき、
f(x,y)=I(x,y)*psf(x,y) ・・・(4)
と表すことができる。
The photographed image f (x, y) obtained through the optical system has a pre-imaging image (subject image) as I (x, y) and the PSF of the optical system as psf (x, y). ,
f (x, y) = I (x, y) * psf (x, y) (4)
It can be expressed as.

ここで、光学系が回転対称な共軸光学系であれば、撮影画像の中心部に対応するPSFは回転対称となる。このため、撮影画像の中心部については回転対称なアンシャープマスクUSMを適用することで撮影画像f(x,y)を元の画像I(x,y)に近づけるような鮮鋭化処理を実現することができる。このときの補正量は、撮影画像とアンシャープ画像との差分値となるため、より精度良く補正するためには、アンシャープマスクUSMとして単純な平滑化フィルタを使用するのではなく、よりpsf(x,y)に近い形状のマスクを使用した方がよい。例えば球面収差により画像が劣化した場合は、球面収差をマスクとして用いると、回転対称に影響を与えるが、ガウシアンフィルタ等の平滑化フィルタのように球面収差によるPSFとは分布形状が異なるマスクを用いる場合に比べて精度良く補正を行えるためである。このように、回転対称な劣化(ぼけ)を低減する場合であっても、光学系のPSFをアンシャープマスクUSMとして使用する方が精度良く補正を行うことができる。   Here, if the optical system is a rotationally symmetric coaxial optical system, the PSF corresponding to the central portion of the captured image is rotationally symmetric. For this reason, a sharpening process that brings the captured image f (x, y) closer to the original image I (x, y) is realized by applying a rotationally symmetric unsharp mask USM to the center of the captured image. be able to. Since the correction amount at this time is a difference value between the captured image and the unsharp image, in order to correct with higher accuracy, a simple smoothing filter is not used as the unsharp mask USM, but more psf ( It is better to use a mask having a shape close to x, y). For example, when an image deteriorates due to spherical aberration, the use of the spherical aberration as a mask affects the rotational symmetry, but a mask having a different distribution shape from the PSF due to spherical aberration, such as a smoothing filter such as a Gaussian filter, is used. This is because correction can be performed with higher accuracy than in the case. As described above, even when rotationally symmetric degradation (blur) is reduced, correction can be performed with higher accuracy by using the PSF of the optical system as the unsharp mask USM.

このため、後述する実施例1では、アンシャープマスクUSMとしてPSFを用いる。なお、アンシャープマスク処理の説明の際に用いた図3(A)では、撮影画像f(x,y)は対称な形状を有するが、必ずしも対称形状を有さなくてもよい。元の画像I(x,y)の形状が回転非対称であっても、psf(x,y)に相当する劣化関数が回転対称であれば、回転対称なアンシャープマスクUSMを用いた鮮鋭化を行うことができる。   For this reason, in Example 1 described later, PSF is used as the unsharp mask USM. In FIG. 3A used in the description of the unsharp mask process, the captured image f (x, y) has a symmetric shape, but it does not necessarily have a symmetric shape. Even if the shape of the original image I (x, y) is rotationally asymmetric, if the deterioration function corresponding to psf (x, y) is rotationally symmetric, sharpening using a rotationally symmetric unsharp mask USM is performed. It can be carried out.

一方、画像の中心部以外の位置については光学系が回転対称な共軸光学系であっても、PSFは通常は回転非対称な形状となる。図4には、xy面における光学系のPSFを示しており、図4(A)は軸上のPSFを、図4(B)は軸外のPSFをそれぞれ示している。例えば、元の画像(被写体)が理想点像であったとすると、上記式(4)から撮影画像f(x,y)は、光学系のPSFになる。図4(B)に対応する画角に理想点像があり、光学系のPSFの影響を受けて元の画像(被写体)が劣化したとすれば、撮影画像として得られる画像は図4(B)の形状のようにぼけた画像となる。このように回転非対称にぼけた画像に対してアンシャープマスク処理による鮮鋭化を行う場合について、以下に説明する。   On the other hand, even if the optical system is a rotationally symmetric coaxial optical system at positions other than the center of the image, the PSF usually has a rotationally asymmetric shape. 4 shows the PSF of the optical system in the xy plane, FIG. 4A shows the on-axis PSF, and FIG. 4B shows the off-axis PSF. For example, if the original image (subject) is an ideal point image, the photographed image f (x, y) is the PSF of the optical system from the above equation (4). If there is an ideal point image at the angle of view corresponding to FIG. 4B, and the original image (subject) has deteriorated due to the influence of the PSF of the optical system, the image obtained as the photographed image is as shown in FIG. ) Is a blurred image. A case where sharpening by unsharp mask processing is performed on an image that is thus rotationally asymmetric will be described below.

図5および図6には回転非対称に劣化した画像に対するアンシャープマスク処理を示しており、図5は回転対称なアンシャープマスクを用いた場合を、図6は回転非対称なアンシャープマスクを用いた場合をそれぞれ示している。図5(A)および図6(A)中の実線は図4(B)に示したようにぼけた撮影画像のy軸方向の断面を表しており、点線はその撮影画像をアンシャープマスクによりぼかしたアンシャープ画像を表している。図5における回転対称なアンシャープマスクとしてはガウシアンフィルタを用いており、図6の非回転対称なアンシャープマスクとしては光学系のPSFを用いている。また、図5(B)および図6(B)はそれぞれ、y軸方向におけるアンシャープ画像と元の撮影画像との差分、すなわち補正成分を示している。ここでは、図5(A)および図6(A)に示す撮影画像のうちPSFによってより大きくぼけて裾が広くなっている方をy軸方向におけるプラス側とする。   FIGS. 5 and 6 show unsharp mask processing for a rotationally asymmetrically deteriorated image. FIG. 5 shows a case where a rotationally symmetric unsharp mask is used, and FIG. 6 shows a case where a rotationally asymmetric unsharp mask is used. Each case is shown. A solid line in FIGS. 5A and 6A represents a cross section in the y-axis direction of a blurred photographed image as shown in FIG. 4B, and a dotted line represents the photographed image using an unsharp mask. Represents a blurred unsharp image. A Gaussian filter is used as the rotationally symmetric unsharp mask in FIG. 5, and an optical PSF is used as the non-rotationally symmetric unsharp mask in FIG. FIGS. 5B and 6B show the difference between the unsharp image in the y-axis direction and the original captured image, that is, the correction component. Here, of the captured images shown in FIGS. 5A and 6A, the one that is more blurred by PSF and has a wider skirt is defined as the plus side in the y-axis direction.

まず、図5に示す回転対称なアンシャープマスクを用いた場合は、図5(A)中の実線のピーク位置に対してプラス側においてはぼけた画像と元の画像との差分が小さく、マイナス側においてはぼけた画像と元の画像の差分値が大きくなっている。このため、図5(B)に示す補正成分も、中心のピーク位置に対してプラス側よりマイナス側において極値が小さくなっている。図5(A)と図5(B)に示した曲線の比較から分かるように、撮影画像のプラス側は補正成分の補正量が小さく、裾が狭いマイナス側は補正量が大きい。このため、図5(B)に示す補正成分では、式(4)による鮮鋭化を行っても回転非対称なぼけを補正することはできない。例えば、アンシャープマスクを変えずに補正量を調整する方法として、式(4)の調整係数mを変更する方法が考えられる。   First, when the rotationally symmetric unsharp mask shown in FIG. 5 is used, the difference between the blurred image and the original image on the plus side with respect to the peak position of the solid line in FIG. On the side, the difference value between the blurred image and the original image is large. For this reason, the extreme value of the correction component shown in FIG. 5B is also smaller on the minus side than on the plus side with respect to the central peak position. As can be seen from the comparison of the curves shown in FIG. 5A and FIG. 5B, the correction amount of the correction component is small on the plus side of the photographed image, and the correction amount is large on the minus side with a narrow skirt. For this reason, with the correction component shown in FIG. 5B, rotationally asymmetric blur cannot be corrected even if sharpening is performed according to equation (4). For example, as a method of adjusting the correction amount without changing the unsharp mask, a method of changing the adjustment coefficient m in Expression (4) is conceivable.

しかし、撮影画像のプラス側を十分に補正するために調整係数mの値を大きくとろうとすると、撮影画像のマイナス側が補正過剰(アンダーシュート)となってしまう。逆に撮影画像のマイナス側の補正量が適切になるように調整係数mの値を設定すると、撮影画像のプラス側では十分な補正が行われずに補正不足となる。   However, if the adjustment coefficient m is increased in order to sufficiently correct the plus side of the photographed image, the minus side of the photographed image becomes overcorrected (undershoot). Conversely, when the value of the adjustment coefficient m is set so that the negative correction amount of the captured image is appropriate, sufficient correction is not performed on the positive side of the captured image, resulting in insufficient correction.

このように、回転非対称にぼけた撮影画像に対して回転対称なアンシャープマスクを用いてアンシャープマスク処理を行っても、非対称性を改善して鮮鋭化することは困難である。また、ここでは回転対称なアンシャープマスクとしてガウシアンフィルタを用いた場合について説明したが、他の種類の回転対称なフィルタを用いた場合でも同様な傾向となり、回転非対称にぼけた撮影画像を十分に鮮鋭化することはできない。   Thus, even if unsharp mask processing is performed using a rotationally symmetric unsharp mask on a rotationally asymmetric blurred image, it is difficult to improve and sharpen the asymmetry. In addition, although the case where the Gaussian filter is used as the rotationally symmetric unsharp mask has been described here, the same tendency is observed even when other types of rotationally symmetric filters are used, and the photographed image that is rotationally asymmetrically blurred can be sufficiently obtained. It cannot be sharpened.

一方、図6に示す回転非対称なアンシャープマスクを用いた場合について説明する。この場合は、図6(A)中の実線のピーク位置に対してプラス側においてぼけた画像と元画像との差分が大きく、マイナス側においてぼけた画像と元の画像との差分が大きい。これは、図5(A)とは逆である。このため、図6(B)に示す補正成分も、中心のピーク位置対してマイナス側よりプラス側において極値が小さくなっている。図6(A)中の実線で示す撮影画像に対して図6(B)に示す補正成分を適用すれば、ピーク位置に対してプラス側のぼけが大きい方に対する補正量が大きくなり、マイナス側のぼけが小さい方に対する補正量が小さくなる。   On the other hand, the case where the rotationally asymmetric unsharp mask shown in FIG. 6 is used will be described. In this case, the difference between the image blurred on the plus side and the original image with respect to the peak position of the solid line in FIG. 6A is large, and the difference between the image blurred on the minus side and the original image is large. This is the reverse of FIG. Therefore, the extreme value of the correction component shown in FIG. 6B is also smaller on the plus side than on the minus side with respect to the center peak position. If the correction component shown in FIG. 6B is applied to the photographed image indicated by the solid line in FIG. 6A, the correction amount for the larger plus side blur with respect to the peak position increases, and the minus side. The correction amount for the smaller blur is smaller.

したがって、このような回転非対称なアンシャープマスクを用いると、プラス側とマイナス側における撮影画像のぼけの大小と補正成分(補正量)の大小とが一致するため、回転対称なアンシャープマスクを用いる場合に問題となる補正の過不足も起きにくくなる。しかも、回転対称なアンシャープマスクを用いる場合と比べて、補正過剰になりにくくなるため、式(4)の調整係数mの値も比較的大きく設定することができる。このため、非対称性を低減しつつ、より鮮鋭化した画像を得ることができる。以上のことから、実施例においても、フィルタとして、そのフィルタ面内で回転非対称な係数を有するものを用いる。   Accordingly, when such a rotationally asymmetric unsharp mask is used, the magnitude of the blur of the photographed image on the plus side and the minus side coincides with the magnitude of the correction component (correction amount), and thus a rotationally symmetric unsharp mask is used. In this case, too much or insufficient correction, which is a problem, is less likely to occur. In addition, since it is less likely to be overcorrected as compared to the case of using a rotationally symmetric unsharp mask, the value of the adjustment coefficient m in equation (4) can be set relatively large. For this reason, it is possible to obtain a sharper image while reducing asymmetry. From the above, also in the embodiment, a filter having a rotationally asymmetric coefficient in the filter plane is used.

また、より精度良く補正を行うためには、補正成分(補正量)の大小はぼけた画像と元の画像との差分により決まるため、光学系のPSFによってより大きくぼけた部分がアンシャープマスクによって他の部分に比べてもよりぼかされる必要がある。このように、さらに精度に良く補正を行うには、アンシャープマスクとして光学系のPSFを用いることが望ましい。   Further, in order to perform correction with higher accuracy, the magnitude of the correction component (correction amount) is determined by the difference between the blurred image and the original image, and therefore the portion that is greatly blurred by the PSF of the optical system is determined by the unsharp mask. It needs to be more blurred than the other parts. Thus, in order to perform correction with higher accuracy, it is desirable to use the PSF of the optical system as an unsharp mask.

次に、PSFをアンシャープマスクに用いる像高の位置の求め方について説明する。先に説明したようにPSFは像高の位置によって変化するため、像高に応じてアンシャープマスクや補正成分も変化させなければならない。より精度良く補正を行えるようにするために、像高を細かく分割し、各像高におけるPSFのデータを保持すると、保持すべきデータ量が増加する。このため、実施例では、PSFのデータを保持する像高(特定像高)を光学系の光学情報(PSFや収差等の情報)に基づいて選定することで、少ない保持データ量で高精度なアンシャープマスク処理を行えるようにする。   Next, how to obtain the position of the image height using PSF as an unsharp mask will be described. As described above, since the PSF changes depending on the position of the image height, the unsharp mask and the correction component must be changed according to the image height. In order to perform correction with higher accuracy, if the image height is divided finely and PSF data at each image height is held, the amount of data to be held increases. For this reason, in this embodiment, the image height (specific image height) holding the PSF data is selected based on the optical information (information such as PSF and aberration) of the optical system. Enable unsharp mask processing.

図17(A)には、PSFの像高に対する変化を示している。横軸は像高を、縦軸は軸上でのPSFと軸上以外の各像高でのPSFとの平均二乗誤差(MSE:Mean Square Error)を示している。この図では、像高を10分割し、各像高でのMSEを白丸で示している。光学系の性能は基本的には周辺側の方が軸上より劣ることが多いが、必ずしもそうなるとは限らず、中間像高で性能が低下したり逆に中間像高で性能が良くなったりすることもある。   FIG. 17A shows the change of the PSF with respect to the image height. The horizontal axis represents the image height, and the vertical axis represents the mean square error (MSE) between the PSF on the axis and the PSF at each image height other than on the axis. In this figure, the image height is divided into 10, and the MSE at each image height is indicated by white circles. The performance of the optical system is basically inferior to the axis on the peripheral side, but this is not necessarily the case, and the performance deteriorates at the intermediate image height, or conversely, the performance improves at the intermediate image height. Sometimes.

軸上のPSFをP(x,y)、像高iにおけるPSFをPi(x,y)としたとき、軸上と像高iにおけるPSFの平均二乗誤差MSEは以下の式(11)ように表すことができる。 When the PSF on the axis is P 0 (x, y) and the PSF at the image height i is Pi (x, y), the mean square error MSE of the PSF on the axis and the image height i is expressed by the following equation (11). Can be expressed as

ただし、NはPSFの総分割数を示す。 N represents the total number of divisions of PSF.

また、軸上と10割像高のPSFを用いて線形近似することにより生成したPSFをPLi(x,y)とすると、軸上のPSFとPLi(x,y)の平均二乗誤差MSEは次式(12)のようになる。   If the PSF generated by linear approximation using a PSF on the axis and a 100% image height is PLi (x, y), the mean square error MSE of the PSF and PLi (x, y) on the axis is Equation (12) is obtained.

図17(A)には、式(12)で示される軸上のPSFとPLi(x,y)の平均二乗誤差MSEを黒丸で表している。例えば、10割像高PSFをP10(x,y)、5割像高に対応するP0(x,y)とP10(x,y)の線形近似により生成したPSFをPL5(x,y)とすると、PL5(x,y)は以下の式(13)のようになる。   In FIG. 17A, the mean square error MSE of PSF and PLi (x, y) on the axis shown in Expression (12) is represented by a black circle. For example, a PSF generated by linear approximation of P10 (x, y) and P10 (x, y) corresponding to 50% image height is P5 (x, y) as PL5 (x, y). Then, PL5 (x, y) is expressed by the following equation (13).

さらに、式(12)に式(13)を代入することで、 Furthermore, by substituting equation (13) into equation (12),

となる。この式(14)から、P0(x,y)とPL5(x,y)の平均二乗誤差MSEはP0(x,y)とP10(x,y)の平均二乗誤差MSEの半分となることがわかる。つまり、像高iに対応するP0(x,y)とPLi(x,y)の平均二乗誤差MSEは、図17(A)に示すように軸上と10割像高の白丸を結ぶ点線上にプロットされる。 It becomes. From this equation (14), the mean square error MSE of P0 (x, y) and PL5 (x, y) may be half of the mean square error MSE of P0 (x, y) and P10 (x, y). Recognize. That is, the mean square error MSE of P0 (x, y) and PLi (x, y) corresponding to the image height i is on the dotted line connecting the on-axis and the white circle of 100% image height as shown in FIG. Is plotted in

また、軸上から3割像高までの像高領域A、3割像高から5割像高までの像高領域Bおよび5割像高から10割像高までの像高領域Cの3つの領域に分割し、4つのPSFから各像高のPSFを線形近似する場合について説明する。図17(A)より、像高領域Aでは各像高の白丸と黒丸の間隔(乖離量)が大きく、白丸に対応する実際のPSFは黒丸に対応する軸上と10割像高のPSFの線形近似により生成したPSFに比べて、より軸上のPSFに近いことが分かる。   Further, there are three image height areas A from the on-axis to 30% image height, image height area B from 30% image height to 50% image height, and image height area C from 50% image height to 100% image height. A case where the image is divided into regions and the PSF of each image height is linearly approximated from four PSFs will be described. As shown in FIG. 17A, in the image height region A, the distance (deviation amount) between the white circle and the black circle of each image height is large, and the actual PSF corresponding to the white circle is the axis corresponding to the black circle and the PSF of 100% image height. It can be seen that it is closer to the on-axis PSF than the PSF generated by linear approximation.

一方、実線で示した軸上、3割、5割および10割像高の4つの像高間の像高領域ごとに線形近似による補間を行う場合は、点線で示した場合に比べて実際のPSFと乖離が少なく、上記4つの特定像高以外の他の像高でのPSFを精度良く補間することが可能となる。このように特定像高の数(像高領域の数)を増やすことで補間精度を向上させることができるが、保持すべきPSFのデータ量をできるだけ少なくするためには特定像高の数をできるだけ少なく選定する必要がある。特定像高の選定方法としては、例えば図17(A)に示すように、軸上のPSFと像高iでの実際のPSFとのMSEと軸上のPSFと線形近似によって生成したPSFとのMSEの差を乖離量diとする。そして、軸上から10割像高までのdiの和が最小となるような像高iを計算し、その最小となる像高iを保持するという手法が考えられる。なお、ここでは実際のPSFと近似のPSFについて軸上のPSFに対する相対値としてMSEを求めその差分を乖離量としたが、実際のPSFと近似のPSFのMSEを乖離量として同様の計算を行ってもよい。   On the other hand, when interpolation by linear approximation is performed for each image height region between four image heights of 30%, 50%, and 100% on the axis indicated by the solid line, the actual value is higher than that indicated by the dotted line. There is little deviation from the PSF, and it becomes possible to accurately interpolate PSFs at other image heights other than the above four specific image heights. In this way, the interpolation accuracy can be improved by increasing the number of specific image heights (number of image height regions), but in order to reduce the amount of PSF data to be retained as much as possible, the number of specific image heights should be as small as possible. It is necessary to select a small number. As a method for selecting a specific image height, for example, as shown in FIG. 17A, an MSE of an on-axis PSF and an actual PSF at an image height i, an on-axis PSF, and a PSF generated by linear approximation are used. The difference in MSE is defined as the divergence amount di. A method of calculating the image height i that minimizes the sum of di from the on-axis to the 100% image height and holding the minimum image height i is conceivable. In this example, the MSE is calculated as a relative value to the PSF on the axis for the actual PSF and the approximate PSF, and the difference is used as the divergence amount. May be.

図18のフローチャートには、特定像高の選定処理の具体的な流れを示している。ここでは、特定像高の選定処理をコンピュータ(像高選定手段)がコンピュータプログラムに従って行うものとして説明する。   The flowchart in FIG. 18 shows a specific flow of the specific image height selection process. Here, description will be made assuming that the selection process of the specific image height is performed by the computer (image height selection means) according to the computer program.

まずステップS011では、コンピュータは、PSFを保持する特定像高の数(以下、特定像高数という)を取得する。特定像高数として最大値のみを設定して、処理の中でその最大値以下の特定像高数を決めるという処理を行ってもよい。ここでは、例として、特定像高数Nを4とする。   First, in step S011, the computer acquires the number of specific image heights holding the PSF (hereinafter referred to as specific image height number). A process may be performed in which only the maximum value is set as the specific image height number, and a specific image height number equal to or less than the maximum value is determined in the process. Here, as an example, the specific image height number N is four.

次にステップS012では、コンピュータは、特定像高を仮決めする。ステップS011でN=4と設定したので、ここでは、例えば軸上、3割像高、5割像高および10割像高を特定像高として仮決めする。ここで仮決めした特定像高は、最適な特定像高を探索するための繰り返し演算を行う際の初期値(初期の選定パターン)として用いられ、繰り返し演算の中で特定像高を変えながら評価することで最適な特定像高を探索する。ここでは、軸上と10割像高を固定し、3割像高と5割像高を変数として最適な特定像高を探索する。   In step S012, the computer provisionally determines a specific image height. Since N = 4 is set in step S011, here, for example, on-axis, 30% image height, 50% image height, and 100% image height are provisionally determined as specific image heights. The specific image height temporarily determined here is used as an initial value (initial selection pattern) when performing an iterative operation to search for the optimum specific image height, and is evaluated while changing the specific image height in the iterative operation. To search for the optimum specific image height. Here, the optimal specific image height is searched with the on-axis and 100% image height fixed, and the 30% image height and 50% image height as variables.

続いてステップS013では、コンピュータは、ステップS012で仮決めした特定像高に基づいて評価関数を計算する。ここでは、図17(A)に示すように仮決めした特定像高以外の像高については線形近似によって実線を求め、実線と白丸との間隔(乖離量)diの和をとり、これを評価値とする。なお、図17(A)では乖離量diが点線と白丸との間隔を示しているが、本処理では実線と白丸との間隔となる。   Subsequently, in step S013, the computer calculates an evaluation function based on the specific image height provisionally determined in step S012. Here, as shown in FIG. 17A, for image heights other than the temporarily determined specific image height, a solid line is obtained by linear approximation, and the sum (distance) di between the solid line and the white circle is taken and evaluated. Value. Note that, in FIG. 17A, the divergence amount di indicates the interval between the dotted line and the white circle, but in this process, it is the interval between the solid line and the white circle.

次にステップS014では、コンピュータは、ステップS013で求めた評価値が最小か否かを判定する。最初の処理では評価関数から得られる評価値は1つしかないため、これが最小値となる。2回目以降の処理で算出された評価値が、すでに算出された評価値よりも小さければステップS015に移行し、大きければステップS015をスキップしてステップS016に移行する。   Next, in step S014, the computer determines whether or not the evaluation value obtained in step S013 is the minimum. Since there is only one evaluation value obtained from the evaluation function in the first process, this is the minimum value. If the evaluation value calculated in the second and subsequent processes is smaller than the already calculated evaluation value, the process proceeds to step S015, and if larger, the process skips step S015 and proceeds to step S016.

ステップS015では、コンピュータは、ステップS014で評価値が最小値と判定されたため、変数としている特定像高を更新する。複数の特定像高を変数としている場合はそれらを設定し直す。そして、ステップS016に移行する。   In step S015, since the evaluation value is determined to be the minimum value in step S014, the computer updates the specific image height as a variable. If multiple specific image heights are used as variables, reset them. Then, control goes to a step S016.

ステップS016では、コンピュータは、変数としての特定像高の全ての選定パターンにおいて評価値が計算されたか否かを判定する。全ての選定パターンに対して計算が終了していれば、最後のステップS015にて更新した特定像高を、正式な特定像高として設定し、本処理を終了する。まだ全選定パターンに対して計算が終了していない場合は、コンピュータは、ステップS012に戻って別の選定パターンで特定像高を選定して再度、ステップS013〜ステップS016の処理を繰り返す。   In step S016, the computer determines whether evaluation values have been calculated for all selected patterns having a specific image height as a variable. If the calculation has been completed for all the selected patterns, the specific image height updated in the last step S015 is set as the official specific image height, and this processing ends. If the calculation has not been completed for all the selected patterns, the computer returns to step S012, selects a specific image height with another selected pattern, and repeats the processes of steps S013 to S016 again.

図17(A)に示す場合は、軸上と10割像高を固定し、残りの9つの像高の中から2つの像高を選定することになるため、ステップS012で設定される36の選定パターンに対してステップS013〜ステップS016の処理を繰り返し演算する。なお、図17(A)に示した例では、軸上から10割像高までを1割像高間隔で10分割しているが、これよりも像高分割数を多くしてもよいし減らしてもよいし、軸上から10割像高までを不等間隔で分割してもよい。   In the case shown in FIG. 17A, the on-axis and 100% image heights are fixed, and two image heights are selected from the remaining nine image heights. The processes in steps S013 to S016 are repeatedly performed on the selected pattern. In the example shown in FIG. 17A, the image height from the axis to 10% image height is divided into 10 at 10% image height intervals. However, the number of image height divisions may be increased or decreased. Alternatively, the image height from the axis up to 100% may be divided at unequal intervals.

また、評価関数としては、MSEに限定されず、ピーク信号対雑音比(Peak signal-to-noise ratio:PSNR)等、他の評価関数を用いてもよい。また、PSFで評価するのではなく、光学系の波面収差や幾何学的な収差で評価を行ってもよい。   In addition, the evaluation function is not limited to the MSE, and other evaluation functions such as a peak signal-to-noise ratio (PSNR) may be used. Further, instead of evaluating with PSF, evaluation may be performed with wavefront aberration or geometric aberration of the optical system.

このようにして、図18に示した選定処理を行うことにより、少ない保持データ量で高精度なアンシャープマスク処理を行うために適切(最適)な特定像高を選定することができる。   In this way, by performing the selection process shown in FIG. 18, an appropriate (optimum) specific image height can be selected in order to perform highly accurate unsharp mask processing with a small amount of retained data.

なお、評価値として、軸上に対する各像高でのPSF(MSE)の乖離量diの和を用いたが、この評価値のみ用いるだけでは不都合が生じる場合もある。例えば、図19には、ある光学系における軸上、5割像高および10割像高でのPSFを示している。この光学系は、コマ収差等の回転非対称な収差を有し、かつコマ収差の向きが像高によって反転する光学系である。図に示すように5割像高と10割像高でのPSFがちょうど180度回転した関係になっている。この場合、図18で説明した評価値は、軸上のMSEとの差分(乖離量di)を用いているために、5割像高と10割像高とで評価値が等しくなる。また、5割像高と10割像高とでPSFが等しい場合も評価値が等しくなるので、これらの区別ができない。   As the evaluation value, the sum of the divergence amounts di of PSF (MSE) at each image height with respect to the axis is used. For example, FIG. 19 shows PSFs at 50% image height and 10% image height on the axis in a certain optical system. This optical system is an optical system that has rotationally asymmetric aberrations such as coma aberration, and in which the direction of coma aberration is reversed depending on the image height. As shown in the figure, the PSFs at the 50% image height and the 100% image height are just 180 degrees rotated. In this case, since the evaluation value described in FIG. 18 uses a difference (deviation amount di) from the on-axis MSE, the evaluation value is equal between the 50% image height and the 100% image height. Also, when the PSF is the same at the 50% image height and the 100% image height, the evaluation values are the same, so it is impossible to distinguish them.

このような問題に対する対策としては、軸上と各像高のPSFのMSEだけでなく、例えば1割像高毎にPSFを計算し、n番目の像高とn+1番目の像高のPSFのMSEを計算してプロットしておくとよい。これにより、図19に示したようにPSFが回転したり反転したりする場合でも、対処することができる。つまり、図19に示す例であれば、5割像高と10割像高とで評価値の変化が大きくなり、PSFの分布の変化を検出することができる。このように、n番目の像高とn+1番目の像高のPSFのMSEと元の軸上と各像高のPSFのMSEという2つの評価関数(指標)を用いることで、より適切な特定像高を導くことができる。   As a countermeasure against such a problem, not only the PSF MSE on the axis and each image height, but also, for example, the PSF is calculated for every 10% image height, and the MSE of the nth image height and the (n + 1) th image height PSF. It is good to calculate and plot. Thus, even when the PSF rotates or reverses as shown in FIG. 19, it is possible to cope with it. That is, in the example shown in FIG. 19, the change in the evaluation value becomes large between the 50% image height and the 100% image height, and the change in the PSF distribution can be detected. Thus, by using the two evaluation functions (indexes) of the PSF MSE of the nth image height and the n + 1th image height and the PSE MSE on the original axis and each image height, a more appropriate specific image is obtained. Can lead to high.

また、こうした評価関数を用いる方法以外の特定像高を選定する方法として、各像高領域のPSFを関数でフィッティングし、該関数の変局点を求め、該変局点に位置する像高を特定像高として保持するようにしてもよい。このような方法を、図18にて説明した方法と組み合わせて用いてもよい。   Further, as a method of selecting a specific image height other than the method using such an evaluation function, the PSF of each image height region is fitted with a function, the inflection point of the function is obtained, and the image height located at the inflection point is calculated. You may make it hold | maintain as specific image height. Such a method may be used in combination with the method described in FIG.

次に、実施例におけるデータ補間処理(重み付け合成)について説明する。図17(A)では、選定した特定像高間(像高領域)のデータについては線形近似による補間(線形補間)を行う場合について説明した。しかし、補間方法は必ずしも線形補間である必要はなく、光学系の性能に合わせて非線形な補間を行うことで、よりデータ量の削減や補正の高精度化を実現することができる。補間するデータの対象としては、上述したPSFだけでなく、フィルタ、アンシャープ画像、補正成分(補正信号)または鮮鋭化画像でもよく、ここでは鮮鋭化画像を補間する場合について説明する。   Next, data interpolation processing (weighting synthesis) in the embodiment will be described. In FIG. 17A, the case where interpolation (linear interpolation) by linear approximation is performed on the data between the selected specific image heights (image height regions) has been described. However, the interpolation method does not necessarily need to be linear interpolation, and by performing nonlinear interpolation according to the performance of the optical system, it is possible to further reduce the data amount and increase the accuracy of correction. The target of data to be interpolated is not limited to the PSF described above, but may be a filter, an unsharp image, a correction component (correction signal), or a sharpened image. Here, the case of interpolating a sharpened image will be described.

図17(B)では、特定像高として、軸上、5割像高および10割像高を選定し、軸上から5割像高までの像高領域Aと5割像高から10割像高までの像高領域Bとを設けている。像高領域Aは図17(A)に示した像高領域A,Bに相当し、像高領域Bは図17(A)に示した像高領域Cに相当する。そして、図17(B)では、像高領域Aでは非線形補間を行い、像高領域Bでは図17(A)と同様に線形補間を行う。   In FIG. 17B, the 50% image height and the 100% image height on the axis are selected as the specific image height, the image height region A from the axis to the 50% image height, and the 100% image height from the 50% image height. An image height region B up to high is provided. The image height area A corresponds to the image height areas A and B shown in FIG. 17A, and the image height area B corresponds to the image height area C shown in FIG. In FIG. 17B, nonlinear interpolation is performed in the image height region A, and linear interpolation is performed in the image height region B as in FIG.

軸上から5割像高までの像高領域Aにおいて、軸上でのPSFをアンシャープマスクとして用いてアンシャープマスク処理を行うことで生成された鮮鋭化画像をXaとする。また、5割像高でのPSFをアンシャープマスクとして用いてアンシャープマスク処理を行うことで生成された鮮鋭化画像をXbとする。このとき、像高領域Aにおける鮮鋭化画像Xwは、次式(101)により、
Xw=w×Xb+(1−w)×Xa ・・・(101)
と表すことができる。ここで、像高に対応する変数h(0≦h≦1)用いて、重みw=hとすると線形補間になる。h=0のときは軸上の鮮鋭化画像が得られ、h=0.5のときは2.5割像高に相当する鮮鋭化画像が得られ、h=1のときは5割像高の鮮鋭化画像が得られる。
In the image height region A from the on-axis to the 50% image height, a sharpened image generated by performing the unsharp mask process using the on-axis PSF as the unsharp mask is assumed to be Xa. A sharpened image generated by performing unsharp mask processing using a PSF at 50% image height as an unsharp mask is denoted by Xb. At this time, the sharpened image Xw in the image height region A is expressed by the following equation (101):
Xw = w × Xb + (1−w) × Xa (101)
It can be expressed as. Here, when the variable h corresponding to the image height (0 ≦ h ≦ 1) is used and the weight w = h, linear interpolation is performed. A sharp image on the axis is obtained when h = 0, a sharp image corresponding to 2.5% image height is obtained when h = 0.5, and a 50% image height when h = 1. A sharpened image can be obtained.

一方、図17(B)中の像高領域Aに示すようにXwを非線形に変化させる(つまりは補間処理を像高に対して非線形に行う)ためには、次式(102)のように、重みwを、   On the other hand, in order to change Xw nonlinearly (that is, to perform interpolation processing nonlinearly with respect to the image height) as shown in the image height region A in FIG. , Weight w

と冪級数の形で表現するとよい。これにより、あらゆる非線形な補間処理を実現することができる。式(102)において、cは定数項、Nは最大の次数であり、これらc,Nをh=1のときw=1になるよう規格化しておく必要がある。例えば、N=2、C=0、C>0とすればwは2次関数となり、線形補間する場合と比較して、式(101)による中間像高に対応する鮮鋭化画像は全体的に軸上の鮮鋭化画像側にシフトする。特に光学系の性能は基本的に軸上付近性能が良好で、かつ変化が少ないことが多く、SPFも同様に軸上付近の変化が少なくなる傾向がある。このことから、式(101)および式(102)による非線形な処理を行うことでより効率的に中間像高に対応する鮮鋭化画像を生成することができる。なお、wの表現方法は式(102)に示したような冪級数の形に限らず、別の形(多項式)で表現してもよい。 And in the form of a power series. As a result, any non-linear interpolation processing can be realized. In the formula (102), c n is a constant term, N is the largest degree, it is necessary to normalized so that they c n, N to w = 1 when h = 1. For example, if N = 2, C 1 = 0, and C 2 > 0, w becomes a quadratic function, and the sharpened image corresponding to the intermediate image height according to the equation (101) is the whole as compared with the case of linear interpolation. Shift to the sharpened image side on the axis. In particular, the performance of the optical system is basically good in the vicinity of the axis and often changes little, and the SPF tends to decrease in the vicinity of the axis similarly. From this, it is possible to generate a sharpened image corresponding to the intermediate image height more efficiently by performing non-linear processing according to equations (101) and (102). Note that the method of expressing w is not limited to the power series as shown in Equation (102), but may be expressed in another form (polynomial).

次に、上述した補間処理以外の補間処理であって、光学系の光学特性(特にPSF)を考慮した補間処理について説明する。図17(C)には、10割像高よりも7割像高付近で光学系の性能が低下し、7割像高から10割像高にかけて性能が良くなる場合の軸上のPSFに対する各像高のPSFのMSEの変化を示している。ここでは、特定像高は、軸上、7割像高および10割像高の3つである。   Next, interpolation processing other than the above-described interpolation processing, which considers the optical characteristics (particularly PSF) of the optical system, will be described. In FIG. 17C, the performance of the optical system deteriorates in the vicinity of 70% image height than the 100% image height, and each performance for the PSF on the axis when the performance improves from 70% image height to 100% image height. The change of MSE of PSF of image height is shown. Here, the specific image height is three on the axis, that is, 70% image height and 100% image height.

点線で示すように軸上と10割像高でのPSFからの線形補間により得られたPSFを用いたアンシャープマスク処理により中間の像高に対応する鮮鋭化画像を生成すると、本来のPSFよりも性能が良い光学系のPSFでアンシャープマスク処理を行う結果になる。このため、このアンシャープマスク処理では補正不足となる。   When a sharpened image corresponding to an intermediate image height is generated by unsharp mask processing using PSF obtained by linear interpolation from the PSF on the axis and at a 100% image height as indicated by the dotted line, the original PSF is used. As a result, unsharp mask processing is performed with the PSF of an optical system with good performance. For this reason, this unsharp mask process is insufficiently corrected.

一方、実線は、特定像高は軸上、7割像高および10割像高の3つの像高で同じであるが、補間方法を工夫することでより実際の光学特性に近い補間処理を実現している。図17(C)に実線で示す補間処理では、軸上から10割像高までを7割像高を境に像高領域Aと像高領域Bに2分割している。そして、像高領域Aについては、式(101)のXaを軸上の鮮鋭化画像とし、Xbを7割像高の鮮鋭化画像として処理することで、中間像高に対応する鮮鋭化画像を取得できる。   On the other hand, the solid line has the same specific image height at the three image heights, 70% image height and 100% image height on the axis, but by implementing an interpolation method, interpolation processing closer to actual optical characteristics is realized. doing. In the interpolation processing indicated by a solid line in FIG. 17C, the image height region A and the image height region B are divided into the image height region A and the image height region B with the 70% image height as a boundary. For the image height region A, the sharpened image corresponding to the intermediate image height is obtained by processing Xa in the formula (101) as a sharpened image on the axis and Xb as a sharpened image having a 70% image height. You can get it.

これに対して像高領域Bについては、XaとXbを入れ替えて、Xaを7割像高の鮮鋭化画像とし、Xbを軸上の鮮鋭化画像とすることで、特定像高が2つ(軸上と7割像高)であっても図に実線で示すような近似関数を得ることができる。像高領域Bにおいて、変数w=1にすると軸上の鮮鋭化画像が得られる。また、図17(C)に示すように、10割像高に対応する鮮鋭化画像を7割像高と軸上の鮮鋭化画像との間に収めるには、例えば0≦w≦0.5というように、変数の最大値を1よりも小さい値に設定すればよい。   On the other hand, with respect to the image height region B, Xa and Xb are interchanged, and Xa is a sharpened image with a 70% image height, and Xb is a sharpened image on the axis. An approximate function as indicated by a solid line in the figure can be obtained even on the axis and 70% image height. In the image height region B, when the variable w = 1, an on-axis sharpened image is obtained. Further, as shown in FIG. 17C, in order to fit a sharpened image corresponding to the 100% image height between the 70% image height and the on-axis sharpened image, for example, 0 ≦ w ≦ 0.5 In this way, the maximum value of the variable may be set to a value smaller than 1.

以上、光学特性を考慮した特定像高の算出方法とデータの補間処理方法について説明したが、特定像高の算出方法とデータの補間処理方法は相互依存の関係にあり、互いに独立してどの方法を採用するかを決めるのではなく、前提を統一して決めることが望ましい。例えば、ある像高領域での補間処理を非線形に行うのであれば、特定像高を算出する際の評価関数も非線形関数であることを前提として図18に示した処理を行うことで、評価の精度がより向上し、より適切な特定像高を選定することができる。   As described above, the specific image height calculation method and the data interpolation processing method considering the optical characteristics have been described. However, the specific image height calculation method and the data interpolation processing method are interdependent, and which method is independent of each other. Rather than deciding whether to adopt, it is desirable to decide on the same premise. For example, if the interpolation process in a certain image height region is performed non-linearly, the evaluation function for calculating the specific image height is assumed to be a non-linear function. The accuracy is further improved, and a more appropriate specific image height can be selected.

また、補間処理に関して、図17(A)〜(C)についての説明では2つの特定像高に対応するデータを用いた補間処理について説明したが、より多くの数の特定像高に対応するデータを用いて補間処理を行ってもよい。3つの特定像高でのデータを用いて補間処理を行う場合には、式(101)を次式(103)のように変形して補間処理を行えばよい。
Xw=w1×Xc+w2×Xb+(1−w1−w2)×Xa ・・・(103)
ここで、式(103)中の重みw1,w2はそれぞれ式(102)のように表され、N≧2として非線形にしたり、N=1として線形に変化させたりすることができる。式(103)を用いて補間処理を行うことで、3つの特定像高のデータを用いた補間処理を行うことができる。また、4つの特定像高のデータを用いる場合も同様に項数を増やすことで実現できる。これらによれば、2つの特定像高でのデータを用いる場合に比べて自由度が増えるため、補間精度を向上させることができる。
Moreover, regarding the interpolation processing, the description of FIGS. 17A to 17C has described the interpolation processing using data corresponding to two specific image heights, but data corresponding to a larger number of specific image heights. Interpolation processing may be performed using. When interpolation processing is performed using data at three specific image heights, the interpolation processing may be performed by transforming the equation (101) into the following equation (103).
Xw = w1 * Xc + w2 * Xb + (1-w1-w2) * Xa (103)
Here, the weights w1 and w2 in the equation (103) are expressed as the equation (102), respectively, and can be made non-linear when N ≧ 2 or can be changed linearly when N = 1. By performing the interpolation process using the equation (103), the interpolation process using the data of three specific image heights can be performed. Similarly, when data of four specific image heights are used, it can be realized by increasing the number of terms. According to these, since the degree of freedom increases as compared with the case of using data at two specific image heights, the interpolation accuracy can be improved.

次に、後述する実施例1〜3において用いるフィルタ、補正信号(補正データ)および実施例1〜3でのアンシャープマスク処理について説明する。   Next, a filter, a correction signal (correction data), and unsharp mask processing in the first to third embodiments used in the first to third embodiments will be described.

実施例1では、前述した式(1),(2)により導かれる以下の式(5)を用いてアンシャープマスク処理を行う。
g(x,y)=f(x,y)+m×{f(x,y)−f(x,y)*USM(x,y)}
・・・(5)
実施例2では、前述した式(1),(3)により導かれる以下の式(6)を用いてアンシャープマスク処理を行う。
g(x,y)=f(x,y)+m×f(x,y)*{δ(x,y)−USM(x,y)}
・・・(6)
実施例3では、式(6)をさらに変形した以下の式(7)を用いてアンシャープマスク処理を行う。
g(x,y)=f(x,y)*{δ(x,y)+m×(δ(x,y)−USM(x,y))}・・・(7)
式(5)から式(7)中のUSM(x,y)はアンシャープマスクである。
In the first embodiment, unsharp mask processing is performed using the following equation (5) derived from the equations (1) and (2) described above.
g (x, y) = f (x, y) + m × {f (x, y) −f (x, y) * USM (x, y)}
... (5)
In the second embodiment, unsharp mask processing is performed using the following equation (6) derived from the equations (1) and (3) described above.
g (x, y) = f (x, y) + m × f (x, y) * {δ (x, y) −USM (x, y)}
... (6)
In the third embodiment, unsharp mask processing is performed using the following equation (7) obtained by further modifying equation (6).
g (x, y) = f (x, y) * {δ (x, y) + m × (δ (x, y) −USM (x, y))} (7)
USM (x, y) in equations (5) to (7) is an unsharp mask.

実施例1ではUSM(x,y)をフィルタとして用い、実施例2ではアンシャープマスク(PSF)と理想点像との差分(δ(x,y)−USM(x,y))をフィルタとして用いる。   In the first embodiment, USM (x, y) is used as a filter, and in the second embodiment, the difference (δ (x, y) −USM (x, y)) between the unsharp mask (PSF) and the ideal point image is used as a filter. Use.

また、実施例3では、アンシャープマスク(PSF)と理想点像との差分に調整係数mを乗算して、その結果を理想点像に加算したもの{δ(x,y)+m×(δ(x,y)−USM(x,y))}、つまりは補正信号をフィルタとして用いる。   In the third embodiment, the difference between the unsharp mask (PSF) and the ideal point image is multiplied by the adjustment coefficient m, and the result is added to the ideal point image {δ (x, y) + m × (δ (X, y) -USM (x, y))}, that is, a correction signal is used as a filter.

図1には、実施例1の撮像装置の構成を示している。撮像装置100には、その内部に画像処理部(画像処理装置)104が設けられている。画像処理部104は、コンピュータプログラムとして画像処理プログラムに従って、撮影画像(入力画像)に対して鮮鋭化処理としてのアンシャープマスク処理(画像処理方法)を実行する。   FIG. 1 illustrates the configuration of the imaging apparatus according to the first embodiment. The imaging apparatus 100 is provided with an image processing unit (image processing apparatus) 104 therein. The image processing unit 104 executes unsharp mask processing (image processing method) as sharpening processing on a captured image (input image) according to an image processing program as a computer program.

撮像装置100は、撮像光学系(以下、撮像レンズという)101と撮像装置本体(以下、カメラ本体という)とを備えている。撮像レンズ101は、絞り101aとフォーカスレンズ101bとを含む。本実施例では、撮像レンズ101がカメラ本体に一体に設けられたレンズ一体型撮像装置について説明するが、撮像装置100は、撮像レンズ101がカメラ本体に対して交換可能に装着されるレンズ交換型撮像装置であってもよい。   The imaging apparatus 100 includes an imaging optical system (hereinafter referred to as an imaging lens) 101 and an imaging apparatus main body (hereinafter referred to as a camera main body). The imaging lens 101 includes a diaphragm 101a and a focus lens 101b. In this embodiment, a lens-integrated image pickup apparatus in which the image pickup lens 101 is provided integrally with the camera body will be described. It may be an imaging device.

撮像素子(撮像手段)102は、CCDセンサやCMOSセンサ等の二次元光電変換素子である。撮像素子102は、撮像レンズ101により形成された被写体像(結像光)を光電変換してアナログ電気信号を生成する。撮像素子102から出力されたアナログ電気信号は、A/Dコンバータ103によりデジタル信号に変換され、このデジタル信号は撮像信号として画像処理部104に入力される。   The imaging element (imaging means) 102 is a two-dimensional photoelectric conversion element such as a CCD sensor or a CMOS sensor. The image sensor 102 photoelectrically converts a subject image (imaging light) formed by the imaging lens 101 to generate an analog electric signal. The analog electrical signal output from the image sensor 102 is converted into a digital signal by the A / D converter 103, and this digital signal is input to the image processing unit 104 as an image signal.

画像処理部104は、入力された撮像信号に対して所定の処理を行って撮影画像を生成するとともに、該撮影画像に対するアンシャープマスク処理を行う。まず、画像処理部104は、状態検知部107から撮影画像を取得するための撮像時における撮像レンズ101の状態である撮像条件の情報を取得する。撮像条件は、絞り値や被写体距離(フォーカスレンズ101bの位置)を含み、撮像レンズ101がズームレンズである場合は、その焦点距離を含む。状態検知部107は、システムコントローラ106から撮像条件の情報を取得してもよいし、撮像レンズ101を制御するレンズ制御部105から取得してもよい。   The image processing unit 104 performs predetermined processing on the input imaging signal to generate a captured image, and performs unsharp mask processing on the captured image. First, the image processing unit 104 acquires information on an imaging condition that is a state of the imaging lens 101 at the time of imaging for acquiring a captured image from the state detection unit 107. The imaging conditions include an aperture value and subject distance (the position of the focus lens 101b), and when the imaging lens 101 is a zoom lens, includes the focal length. The state detection unit 107 may acquire information on imaging conditions from the system controller 106 or may be acquired from the lens control unit 105 that controls the imaging lens 101.

画像処理部104は、アンシャープマスク処理を行うために、PSF選択部201、補正信号生成部202、補正信号適用部203、重み情報取得部204および信号合成部205を有する。PSF選択部201は像高選定手段およびPSF取得手段に相当し、補正信号生成部202はフィルタ生成手段およびデータ生成手段に相当する。補正信号適用部203はアンシャープマスク処理(補正処理)を行う補正手段に相当する。また、重み情報取得部204は重み取得手段に相当し、信号合成部205は合成手段に相当する。そして、画像処理部104は、アンシャープマスク処理により生成した鮮鋭化画像を所定のフォーマットのデータに変換して画像記録部108に保存する。   The image processing unit 104 includes a PSF selection unit 201, a correction signal generation unit 202, a correction signal application unit 203, a weight information acquisition unit 204, and a signal synthesis unit 205 in order to perform unsharp mask processing. The PSF selection unit 201 corresponds to an image height selection unit and a PSF acquisition unit, and the correction signal generation unit 202 corresponds to a filter generation unit and a data generation unit. The correction signal application unit 203 corresponds to a correction unit that performs unsharp mask processing (correction processing). The weight information acquisition unit 204 corresponds to a weight acquisition unit, and the signal synthesis unit 205 corresponds to a synthesis unit. Then, the image processing unit 104 converts the sharpened image generated by the unsharp mask process into data of a predetermined format and stores it in the image recording unit 108.

画像表示部112は、鮮鋭化画像に対して所定の表示処理を行って得られた表示用画像を表示する。これまで説明した各部の制御は、システムコントローラ106により行われる。撮像レンズ101の機械的な駆動の制御は、システムコントローラ106の指示に基づいてレンズ制御部105により行われる。   The image display unit 112 displays a display image obtained by performing a predetermined display process on the sharpened image. The control of each unit described so far is performed by the system controller 106. The mechanical control of the imaging lens 101 is controlled by the lens control unit 105 based on an instruction from the system controller 106.

撮像レンズ101には、ローパスフィルタや赤外線カットフィルタ等の光学素子を挿入してもよい。ローパスフィルタ等のPSFの特性に影響を与える光学素子を用いる場合は、アンシャープマスクを作成する段階でこの光学素子の影響を考慮することで、より高精度なアンシャープマスク処理が可能である。また、赤外カットフィルタは、分光波長のPSFの積分値であるRGBチャンネルの各PSF、特にRチャンネルのPSFに影響するため、アンシャープマスクを作成する段階でこの赤外カットフィルタの影響を考慮することが好ましい。   An optical element such as a low-pass filter or an infrared cut filter may be inserted into the imaging lens 101. When using an optical element that affects the characteristics of the PSF, such as a low-pass filter, more accurate unsharp mask processing can be performed by considering the influence of the optical element at the stage of creating the unsharp mask. In addition, since the infrared cut filter affects each PSF of the RGB channel, particularly the PSF of the R channel, which is an integral value of the PSF of the spectral wavelength, the influence of the infrared cut filter is considered at the stage of creating the unsharp mask. It is preferable to do.

次に、図2のフローチャートを用いて、本実施例におけるアンシャープマスク処理の基本的な流れについて説明する。本処理は、システムコントローラ106から指示を受けたコンピュータとしての画像処理部104により、前述した画像処理プログラムに従って実行される。   Next, the basic flow of unsharp mask processing in the present embodiment will be described using the flowchart of FIG. This process is executed by the image processing unit 104 as a computer that receives an instruction from the system controller 106 in accordance with the above-described image processing program.

ステップS11において、画像処理部104は、撮影画像を入力画像として取得する。   In step S11, the image processing unit 104 acquires a captured image as an input image.

次にステップS12において、PSF選択部201は、まず図18に示した処理によって特定像高を選定する。次に、PSF選択部201は、特定像高に対応する撮像レンズ101のPSFに関する情報をメモリ109から選択して取得する。このときPSF選択部201が取得するPSFに関する情報は、PSFを示す2次元タップのデータでもよいし、データ量の圧縮や処理の高速化のためにPSFの構成要素である複数の1次元タップのデータでもよい。また、PSFに関する情報としてPSFの係数の情報を取得してもよい。以下の説明では、PSFに関する情報をPSF情報という。   Next, in step S12, the PSF selection unit 201 first selects a specific image height by the process shown in FIG. Next, the PSF selection unit 201 selects and acquires information regarding the PSF of the imaging lens 101 corresponding to the specific image height from the memory 109. At this time, the information about the PSF acquired by the PSF selection unit 201 may be data of a two-dimensional tap indicating the PSF, or a plurality of one-dimensional taps that are constituent elements of the PSF in order to compress the data amount or speed up the processing. Data may be used. Further, PSF coefficient information may be acquired as information about PSF. In the following description, information related to PSF is referred to as PSF information.

次にステップS13において、補正信号生成部202は、ステップS12にて取得されたPSF情報を用いてアンシャープマスクおよび補正信号(補正データ)を生成する。   Next, in step S13, the correction signal generation unit 202 generates an unsharp mask and a correction signal (correction data) using the PSF information acquired in step S12.

図7および図8には、アンシャープマスクの例を示している。アンシャープマスクは、撮像レンズ101の収差特性や要求される鮮鋭化の精度に応じてそのタップ数が決定される。図7には、アンシャープマスクの例として、2次元に配置された11×11タップのフィルターサイズを有するアンシャープマスクを示している。図7では、各タップの値(フィルタ係数:以下、タップ値という)を省略しているが、このアンシャープマスクの一断面でのタップ値を図8に示す。アンシャープマスクにおけるタップ値の分布は、収差により広がった信号値(すなわち撮像レンズ101のPSF)の形状に近い分布、すなわち図7中にハッチングして示す中心タップ回りにおいて回転非対称なタップ値分布が理想的である。このようにPSF情報を用いてアンシャープマスクを生成してもよいし、あるいはPSF選択部201が取得したPSF情報が示すPSFをそのままアンシャープマスクとして使用してもよい。   7 and 8 show examples of unsharp masks. The number of taps of the unsharp mask is determined according to the aberration characteristics of the imaging lens 101 and the required sharpening accuracy. FIG. 7 shows an unsharp mask having a filter size of 11 × 11 taps arranged two-dimensionally as an example of the unsharp mask. In FIG. 7, the value of each tap (filter coefficient: hereinafter referred to as tap value) is omitted, but the tap value in one section of this unsharp mask is shown in FIG. The tap value distribution in the unsharp mask is a distribution close to the shape of the signal value spread by the aberration (that is, the PSF of the imaging lens 101), that is, a rotationally asymmetric tap value distribution around the center tap shown by hatching in FIG. Ideal. In this way, the unsharp mask may be generated using the PSF information, or the PSF indicated by the PSF information acquired by the PSF selection unit 201 may be used as it is as the unsharp mask.

補正信号生成部202は、続いてアンシャープマスクを用いて補正信号を生成する。この補正信号の生成処理については後に詳しく説明する。   Subsequently, the correction signal generation unit 202 generates a correction signal using an unsharp mask. The correction signal generation process will be described in detail later.

次にステップS14において、補正信号適用部203は、ステップS13で補正信号生成部202により生成された補正信号を入力画像に適用する。すなわち、入力画像に対するアンシャープマスク処理を実行する。このステップS14での処理の内容については後に詳しく説明する。   Next, in step S14, the correction signal application unit 203 applies the correction signal generated by the correction signal generation unit 202 in step S13 to the input image. That is, unsharp mask processing is performed on the input image. The contents of the processing in step S14 will be described in detail later.

ステップS13においてPSF情報を用いてアンシャープマスクを生成する場合、PSFは入力画像の像高(画像内の位置)に応じて変化するため、アンシャープマスクも像高に応じて変化させる必要がある。本実施例では、PSF情報、入力画像にアンシャープマスクを適用した後のアンシャープ画像、補正信号およびアンシャープマスク処理後の鮮鋭化画像のうちいずれかを複数の特定像高において中間データ(第1のデータ)として取得(生成)する。そして、これら特定像高に対応する中間データを用いて補間処理を行うことで、すべての像高のPSFに対応する中間データを得る。このときの補間処理についても、後に詳しく説明する。   When the unsharp mask is generated using the PSF information in step S13, the PSF changes according to the image height (position in the image) of the input image. Therefore, the unsharp mask needs to be changed according to the image height. . In the present embodiment, any one of PSF information, an unsharp image after applying an unsharp mask to the input image, a correction signal, and a sharpened image after unsharp mask processing at a plurality of specific image heights (first data). 1 data). Then, by performing an interpolation process using intermediate data corresponding to these specific image heights, intermediate data corresponding to all image height PSFs is obtained. The interpolation processing at this time will also be described in detail later.

次に、図9のフローチャートを用いて、図2にて説明したアンシャープマスク処理の流れをより詳細に説明する。   Next, the flow of the unsharp mask process described with reference to FIG. 2 will be described in more detail with reference to the flowchart of FIG.

まずステップS111において、画像処理部104は、撮影画像を入力画像として取得する。撮影画像のうち実際にアンシャープマスク処理における入力画像として使用するデータは、例えば、デモザイキング後のGチャンネルの画像データである。ただし、RチャンネルやBチャンネルの画像データを入力画像としてもよいし、RGBの全てのチャンネルの画像データを入力画像としてもよい。また、デモザイキング前の画像データを入力画像としてもよい。   First, in step S111, the image processing unit 104 acquires a captured image as an input image. The data actually used as the input image in the unsharp mask process among the captured images is, for example, G channel image data after demosaicing. However, R channel and B channel image data may be used as the input image, or image data of all RGB channels may be used as the input image. Further, image data before demosaicing may be used as an input image.

図10には、一般的な撮像素子の画素配列として用いられているベイヤー配列を示す。このようなベイヤー配列の撮像素子からの撮像信号に基づいて生成された撮影画像のうち単純に特定チャンネル(例えばGチャンネル)の画像データを抜き出して入力画像としてもよいし、全てのチャンネルの画像データを入力画像として用いてもよい。また、図10では、GチャンネルをG1,G2の2つのチャンネルに分けている。Gチャンネルを2つに分けることで、R,G1,G2,Bのそれぞれのチャンネルの画像データは解像度が等しくなるため、処理やデータ加工がしやすくなる。   FIG. 10 shows a Bayer array used as a pixel array of a general image sensor. Image data of a specific channel (for example, G channel) may be simply extracted from the captured image generated based on the image pickup signal from the image pickup device having such a Bayer array, or may be input image data. May be used as an input image. In FIG. 10, the G channel is divided into two channels G1 and G2. By dividing the G channel into two, the resolution of the image data of each of the R, G1, G2, and B channels becomes equal, so that processing and data processing are easy.

続いてステップS112において、PSF選択部201は、図18に示した処理によって特定像高を選定し、さらに特定像高に対応する撮像レンズ101のPSF情報をメモリ109から取得する。図2のステップS12で説明したように、取得するPSF情報は、PSFを示す2次元タップのデータでもよいし、PSFの構成要素である複数の1次元タップのデータでもよい。2次元データを複数の1次元データに分解する方法としては、例えば特異値分解定理がある。このような定理を用いて分解された主成分をメモリ109に記録しておき、撮像レンズ101の撮像条件に応じてPSFの主成分に対応する複数の1次元タップのデータを取得してきてもよい。   Subsequently, in step S112, the PSF selection unit 201 selects a specific image height by the processing illustrated in FIG. 18 and further acquires PSF information of the imaging lens 101 corresponding to the specific image height from the memory 109. As described in step S12 of FIG. 2, the PSF information to be acquired may be two-dimensional tap data indicating the PSF or data of a plurality of one-dimensional taps that are constituent elements of the PSF. As a method of decomposing two-dimensional data into a plurality of one-dimensional data, for example, there is a singular value decomposition theorem. The principal component decomposed using such a theorem may be recorded in the memory 109, and data of a plurality of one-dimensional taps corresponding to the principal component of the PSF may be acquired according to the imaging condition of the imaging lens 101. .

また、前述したようにPSFは像高によって変化するため、より精度良くアンシャープマスク処理を行うには、像高に応じたPSFを用いてアンシャープマスクを生成し、このアンシャープマスクを用いて像高に応じた補正信号を生成する必要がある。しかし、メモリ109に記録できるデータ容量には限りがあるので、多数の像高のそれぞれに応じたPSF情報をメモリ109に保存しておくのは好ましくない。このため、本実施例では、入力画像を複数の画像領域に分割し、画像領域ごとに少なくとも2つの特定像高でのPSF情報を用いて補間処理を行う。これにより、特定像高以外の像高に対応するアンシャープマスクまたはアンシャープマスクの適用によりぼけたアンシャープ画像の生成を可能とする。補間処理の方法は、後のステップS114,S115にて詳しく説明する。   Since the PSF changes depending on the image height as described above, in order to perform unsharp mask processing with higher accuracy, an unsharp mask is generated using the PSF corresponding to the image height, and this unsharp mask is used. It is necessary to generate a correction signal corresponding to the image height. However, since the data capacity that can be recorded in the memory 109 is limited, it is not preferable to store PSF information corresponding to each of a large number of image heights in the memory 109. For this reason, in this embodiment, the input image is divided into a plurality of image areas, and interpolation processing is performed using PSF information at at least two specific image heights for each image area. As a result, it is possible to generate an unsharp image blurred by applying an unsharp mask or an unsharp mask corresponding to an image height other than the specific image height. The method of interpolation processing will be described in detail in later steps S114 and S115.

ここで、入力画像の複数の画像領域への分割について説明する。図11には、入力画像を示している。ここでは、入力画像の長辺方向をx軸方向とし、短辺方向をy軸方向とし、入力画像の中心を座標の原点としている。本実施例では、入力画像をA〜Hの8つの画像領域に分割し、原点と各画像領域の周辺部のPSF情報を取得する。なお、画像領域の分割数は、8つに限られず、撮像時における撮像レンズ101の撮像条件や撮像レンズ101の光学特性、あるいはメモリのデータ容量等を考慮し決定する必要がある。   Here, the division of the input image into a plurality of image regions will be described. FIG. 11 shows an input image. Here, the long side direction of the input image is the x-axis direction, the short side direction is the y-axis direction, and the center of the input image is the origin of coordinates. In this embodiment, the input image is divided into eight image areas A to H, and PSF information of the origin and the peripheral part of each image area is acquired. Note that the number of divisions of the image area is not limited to eight, and needs to be determined in consideration of the imaging conditions of the imaging lens 101 at the time of imaging, the optical characteristics of the imaging lens 101, the data capacity of the memory, and the like.

次に、ステップS113において、補正信号生成部202は、ステップS112で取得されたPSF情報を用いてフィルタリングを行う。本実施例では、PSF情報から得られるPSFからアンシャープマスクを生成し(言い換えればPSFをそのままアンシャープマスクとして用い)、入力画像に対して該アンシャープマスクをコンボリューション(畳み込み積分)することでフィルタリングを行う。ステップS112において取得されたPSFは、それぞれ特定像高である中心像高(軸上)と8つの周辺像高に対応する9つのPSFがある。このため、これら9つのPSFをアンシャープマスクとしてそれぞれ入力画像にコンボリューションすることで、ぼけたアンシャープ画像が9つ得られる。これら9つのアンシャープ画像は、アンシャープマスク処理(補正処理)のための中間データに相当する。   Next, in step S113, the correction signal generation unit 202 performs filtering using the PSF information acquired in step S112. In this embodiment, an unsharp mask is generated from the PSF obtained from the PSF information (in other words, the PSF is directly used as an unsharp mask), and the unsharp mask is convolved (convolution integration) with the input image. Perform filtering. The PSFs acquired in step S112 include nine PSFs corresponding to the center image height (on the axis) that is a specific image height and eight peripheral image heights. For this reason, nine unsharp images are obtained by convolving these nine PSFs as unsharp masks with the input image. These nine unsharp images correspond to intermediate data for unsharp mask processing (correction processing).

次に、ステップS114において、重み情報取得部204は、メモリ109から、後述するステップS115において行われる像高方向の補間処理にて用いられる重み情報を取得する。重み情報は、式(101),(102)におけるwの情報である。   Next, in step S114, the weight information acquisition unit 204 acquires, from the memory 109, weight information used in the image height direction interpolation processing performed in step S115 described later. The weight information is w information in the equations (101) and (102).

次に、ステップS115において、信号合成部205は、ステップS114にて取得された重み情報を用いて、ステップS113で生成された複数(9つ)のアンシャープ画像(第1のデータ)の重み付け合成処理を行う。この重み付け合成処理では、アンシャープ画像の像高方向での補間処理を行う。   Next, in step S115, the signal synthesis unit 205 uses the weight information acquired in step S114 to weight and synthesize a plurality (nine) of unsharp images (first data) generated in step S113. Process. In this weighting synthesis process, an interpolation process in the image height direction of the unsharp image is performed.

ここで、図12を用いて像高方向の補間処理について説明する。図11において、原点に対して画像領域Cがある方向をx軸方向のうち正の側とし、画像領域Aがある方向をy軸方向の正の側とすると、図12は入力画像のうちx,yがともに正となる第1象限の領域を示している。ここで、P0は原点(中心像高)を示し、P1,P2,P3はそれぞれ画像領域A,B,Cにおける周辺像高を示す。ステップS112においてPSF選択部201がこれら像高(特定像高)P0,P1,P2,P3のPSF情報(以下、単にPSFという)を取得したとする。また、図12において、白丸で示されたPnは、画像領域B内の任意の像高を表している。   Here, the interpolation processing in the image height direction will be described with reference to FIG. In FIG. 11, if the direction in which the image area C is located with respect to the origin is the positive side in the x-axis direction, and the direction in which the image area A is located is the positive side in the y-axis direction, FIG. , Y are positive quadrant regions where both are positive. Here, P0 indicates the origin (center image height), and P1, P2, and P3 indicate peripheral image heights in the image areas A, B, and C, respectively. Assume that the PSF selection unit 201 acquires PSF information (hereinafter simply referred to as PSF) of these image heights (specific image heights) P0, P1, P2, and P3 in step S112. In FIG. 12, Pn indicated by a white circle represents an arbitrary image height in the image area B.

任意像高Pnでは、像高P0と像高P2のPSFを用いてステップS113で作成した該任意像高Pnに対するアンシャープマスクを入力画像にフィルタリング(コンボリューション)して中間データとしてのアンシャープ画像を得る。同様に、画像領域A内の任意像高では、像高P0と像高P1のPSFを用いて作成した該任意像高に対するアンシャープマスクを入力画像にフィルタリングして中間データとしてのアンシャープ画像を得る。さらに、画像領域C内の任意像高では、像高P0と像高P3のPSFを用いて作成した該任意像高に対するアンシャープマスクを入力画像にフィルタリングして中間データとしてのアンシャープ画像を得る。   For the arbitrary image height Pn, an unsharp image as intermediate data is obtained by filtering (convolution) the unsharp mask for the arbitrary image height Pn created in step S113 using the PSF of the image height P0 and the image height P2 into the input image. Get. Similarly, for an arbitrary image height in the image area A, an unsharp image as intermediate data is obtained by filtering an unsharp mask for the arbitrary image height created using the image height P0 and the PSF of the image height P1 into an input image. obtain. Furthermore, at an arbitrary image height in the image area C, an unsharp mask as intermediate data is obtained by filtering an unsharp mask for the arbitrary image height created using the PSF having the image height P0 and the image height P3 into the input image. .

ここで、2つの像高での中間データを用いた補間処理によって任意像高Pnでのフィルタリング結果に相当する中間データを生成する方法について説明する。図12に示すように、画像領域B内の任意像高Pnまでの原点P0からの距離がd0であり、像高P2からの距離がd2であるとする。また、ステップS113において、像高P0,P2のPSFを用いたフィルタリング結果としてのアンシャープ画像をそれぞれF0,F2とする。このとき、任意像高Pnにおけるデータ(アンシャープ画像)Fnは、
Fn=F0×(1−d0)+F2×d2 ・・・(8)
と表される。この式(8)は、前述した式(101),(102)においてXa=F0、Xb=F2およびw=d0と設定することで、これら式(101),(102)と等価となる。また、式(102)においてN=1とすれば線形な補間処理が行われ、N>1と設定すれば非線形な補間処理が行われる。
Here, a method for generating intermediate data corresponding to a filtering result at an arbitrary image height Pn by an interpolation process using intermediate data at two image heights will be described. As shown in FIG. 12, it is assumed that the distance from the origin P0 to the arbitrary image height Pn in the image area B is d0 and the distance from the image height P2 is d2. In step S113, the unsharp images as the filtering results using the PSFs having the image heights P0 and P2 are set as F0 and F2, respectively. At this time, the data (unsharp image) Fn at the arbitrary image height Pn is
Fn = F0 * (1-d0) + F2 * d2 (8)
It is expressed. This equation (8) becomes equivalent to these equations (101) and (102) by setting Xa = F0, Xb = F2 and w = d0 in the above-mentioned equations (101) and (102). Further, in equation (102), if N = 1, linear interpolation processing is performed, and if N> 1, nonlinear interpolation processing is performed.

この補間処理方法およびPSFを保持する特定像高P1,P2,P3の位置は、先に述べたように、撮像レンズ101の光学特性を考慮して選定する。このような補間処理により各画像領域内の任意像高での中間データを生成することができる。この結果、ステップS113で生成された9つの中間データ(第1のデータ)としてのアンシャープ画像から、全ての像高ごとのPSFに対応する1つの中間データ(第2のデータ)としてのアンシャープ画像(以下、補間アンシャープ画像という)が生成される。   The interpolation processing method and the positions of the specific image heights P1, P2, and P3 holding the PSF are selected in consideration of the optical characteristics of the imaging lens 101 as described above. By such interpolation processing, intermediate data at an arbitrary image height in each image region can be generated. As a result, the unsharp as one intermediate data (second data) corresponding to the PSF for every image height from the nine unsharp images as the first intermediate data (first data) generated in step S113. An image (hereinafter referred to as an interpolated unsharp image) is generated.

このようにして、像高ごとに異なるPSFから得たアンシャープマスクによる入力画像のフィルタリング結果に相当する補間アンシャープ画像を、限られた数の特定像高のPSFの少ないデータ量のデータを保持するだけで生成することが可能となる。この方法では、全ての像高のPSFを用意して像高ごとのPSFから得たアンシャープマスクで入力画像に対するフィルタリングを行う場合に比べて若干精度が低くなる可能性がある。しかし、保持データ量を大幅に低減したり、処理速度(メモリデータの読み出し速度)を高速化したりすることができる。   In this way, the interpolation unsharp image corresponding to the filtering result of the input image by the unsharp mask obtained from the PSF that varies from image height to image height is retained, and a limited number of specific image height PSF data with a small amount of data is retained. It is possible to generate by just doing. In this method, there is a possibility that the accuracy may be slightly lowered as compared with the case where the PSF of all image heights is prepared and the input image is filtered with an unsharp mask obtained from the PSF for each image height. However, the amount of retained data can be greatly reduced, and the processing speed (memory data reading speed) can be increased.

なお、像高方向の補間処理について、式(8)は第1象限の画像領域Bに関する計算式を示しているが、他の画像領域や他の象限についても同様な演算を行うことにより補間された中間データを作成することができる。   Regarding the interpolation processing in the image height direction, equation (8) shows the calculation formula for the image area B in the first quadrant, but is interpolated by performing similar calculations for other image areas and other quadrants. Intermediate data can be created.

次に、ステップS116において、補正信号生成部202は、ステップS115で信号合成部205により生成された補間アンシャープ画像を用いて最終的な補正データとしての補正信号を生成する。本実施例において、補正信号(補正成分)は式(2)で示されるものであり、入力画像と補間アンシャープ画像の差分をとることで生成される。   Next, in step S116, the correction signal generation unit 202 generates a correction signal as final correction data using the interpolated unsharp image generated by the signal synthesis unit 205 in step S115. In the present embodiment, the correction signal (correction component) is represented by Expression (2), and is generated by taking the difference between the input image and the interpolated unsharp image.

次に、ステップS117において、補正信号適用部203は、ステップS116にて生成された補正信号を入力画像に適用することで、目的とする鮮鋭化画像を生成する。本実施例において、補正信号の適用は、式(1)により、入力画像に対してm倍した補正信号を加算することで行う。この際、画像のノイズや鮮鋭化における補正過剰や補正不足を考慮して調整係数mの値を決定する。ここで、式(1)は第1項と第2項を加算する形で表現されているが、これは調整係数mが負の場合であり、調整係数mが正の場合は減算になる。ただし、加算も減算も単に調整係数mの符号の違いによるもので、本質的には同じことを意味するため、本実施例でもこれらをまとめて加算という。   Next, in step S117, the correction signal applying unit 203 generates a target sharpened image by applying the correction signal generated in step S116 to the input image. In this embodiment, the correction signal is applied by adding the correction signal multiplied by m to the input image according to the equation (1). At this time, the value of the adjustment coefficient m is determined in consideration of image noise, overcorrection and undercorrection in sharpening. Here, the expression (1) is expressed in the form of adding the first term and the second term. This is a case where the adjustment coefficient m is negative, and subtraction is performed when the adjustment coefficient m is positive. However, addition and subtraction are simply due to the difference in the sign of the adjustment coefficient m, which means essentially the same thing, and in the present embodiment, these are collectively referred to as addition.

このように、本実施例では、アンシャープマスク処理において撮像レンズ101のPSFをアンシャープマスクとして用いているため、撮像レンズ101の回転非対称なPSFによって劣化した入力画像から、高い精度で鮮鋭化された鮮鋭化画像を得ることができる。   As described above, in the present embodiment, the PSF of the imaging lens 101 is used as an unsharp mask in the unsharp mask process, so that the input image degraded by the rotationally asymmetric PSF of the imaging lens 101 is sharpened with high accuracy. A sharpened image can be obtained.

本実施例では、像高方向の補間処理を入力画像に対するアンシャープマスクのフィルタリング後に行う場合について説明した。しかし、像高方向の補間処理を、補正信号に対して行ったり、補正信号を入力画像に適用した後の鮮鋭化画像に対して行ったりしてもよい。以下、これらの場合におけるアンシャープマスク処理をそれぞれ、図13および図14に示すフローチャートを用いて説明する。   In this embodiment, the case where the interpolation processing in the image height direction is performed after the unsharp mask filtering on the input image has been described. However, the interpolation process in the image height direction may be performed on the correction signal, or may be performed on the sharpened image after the correction signal is applied to the input image. Hereinafter, the unsharp mask process in these cases will be described using the flowcharts shown in FIGS. 13 and 14, respectively.

図13には、補正信号に対して像高方向の補間処理を行う場合のアンシャープマスク処理の流れを示している。図13において、図9に示したステップと同じステップには図9と同符号を付して説明に代える。図13では、図9に示したステップS114,S115およびS116に代えて、ステップS124,S125およびS126の処理が行われる。   FIG. 13 shows a flow of unsharp mask processing when interpolation processing in the image height direction is performed on the correction signal. In FIG. 13, the same steps as those shown in FIG. 9 are denoted by the same reference numerals as in FIG. In FIG. 13, steps S124, S125, and S126 are performed instead of steps S114, S115, and S116 shown in FIG.

ステップS124おいて、補正信号生成部202は、ステップS113で生成された複数の特定像高のPSFに対応したアンシャープ画像のそれぞれから複数の中間データとしての補正信号(第1のデータ)を生成する。各補正信号は、前述した式(2)により、入力画像とアンシャープ画像との差分をとることで生成される。   In step S124, the correction signal generation unit 202 generates a plurality of correction signals (first data) as intermediate data from each of the unsharp images corresponding to the PSFs having the specific image heights generated in step S113. To do. Each correction signal is generated by taking the difference between the input image and the unsharp image according to the above-described equation (2).

次に、ステップS125において、重み情報取得部204は、次のステップS126にて像高方向の補間処理を行うための重み情報をメモリ109から取得する。   Next, in step S125, the weight information acquisition unit 204 acquires weight information for performing interpolation processing in the image height direction from the memory 109 in the next step S126.

次に、ステップS126において、信号合成部205は、ステップS124で生成された複数の補正信号とステップS125で取得された重み情報とを用いて、補正信号の像高方向での補間処理を行う。これにより、最終的な補正データとしての補正信号(第2のデータ)を生成する。このステップS126で行われる補間処理は、処理対象が補正信号と図9のステップS115とは異なるが、基本的な処理の流れはステップS115にて説明したものと同じである。ステップS115ではPSFをアンシャープマスクとして用い、このアンシャープマスクを入力画像にコンボリューションして得られたアンシャープ画像を像高方向に補間した。これに対して、ステップS126では、入力画像とアンシャープ画像との差分である補正信号に対して像高方向での補間処理を行う。数式の上では式(2)における「f(x,y)*USM」を像高方向に補間するのがステップS115であり、h(x,y)を像高方向に補間するのがステップS126となる。このため、ステップS115におけるf(x,y)*USMのデータをh(x,y)に置き換えることでステップS126にて補正信号を像高方向に補間する処理を行うことができる。   Next, in step S126, the signal synthesis unit 205 performs interpolation processing of the correction signal in the image height direction using the plurality of correction signals generated in step S124 and the weight information acquired in step S125. As a result, a correction signal (second data) as final correction data is generated. The interpolation process performed in step S126 is different from the correction signal and step S115 in FIG. 9, but the basic process flow is the same as that described in step S115. In step S115, PSF was used as an unsharp mask, and an unsharp image obtained by convolving this unsharp mask with an input image was interpolated in the image height direction. On the other hand, in step S126, interpolation processing in the image height direction is performed on the correction signal that is the difference between the input image and the unsharp image. In equation (2), “f (x, y) * USM” is interpolated in the image height direction in step S115, and h (x, y) is interpolated in the image height direction in step S126. It becomes. Therefore, by replacing the data of f (x, y) * USM in step S115 with h (x, y), it is possible to perform a process of interpolating the correction signal in the image height direction in step S126.

また、式(101),(102)で表現すると、Xa,Xbが各像高の補正成分となり、式(102)中のcが重み情報となる。このようにして補正信号の補間処理により得られた補正データとしての補正信号を、補正信号適用部203は、ステップS127において入力画像に適用する。ステップS127における補正信号の適用処理については前述したステップS117と同じである。 Further, the formula (101), when expressed by (102), Xa, Xb is a correction component of each image height, c n in the formula (102) is weight information. The correction signal applying unit 203 applies the correction signal as the correction data obtained by the correction signal interpolation processing in this way to the input image in step S127. The correction signal application processing in step S127 is the same as that in step S117 described above.

図14には、入力画像に補正信号を適用して得られた鮮鋭化画像(第1のデータ)に対して像高方向の補間処理を行う場合のアンシャープマスク処理の流れを示している。図14において、図9に示したステップと同じステップには図9と同符号を付して説明に代える。図14では、図9に示したステップS114,S115,S116およびステップS117に代えて、ステップS134,S135,S136およびS137の処理が行われる。なお、図14の処理では、補正信号適用部203がデータ生成手段に相当し、信号合成部205が補正手段に相当する。   FIG. 14 shows the flow of unsharp mask processing when performing interpolation processing in the image height direction on a sharpened image (first data) obtained by applying a correction signal to an input image. In FIG. 14, the same steps as those shown in FIG. 9 are denoted by the same reference numerals as those in FIG. 14, steps S134, S135, S136, and S137 are performed instead of steps S114, S115, S116, and step S117 shown in FIG. In the process of FIG. 14, the correction signal application unit 203 corresponds to a data generation unit, and the signal synthesis unit 205 corresponds to a correction unit.

ステップS134において、補正信号生成部202は、ステップS113で生成された複数の特定像高のPSFに対応したアンシャープ画像のそれぞれから複数の補正信号を生成する。各補正信号は、前述した式(2)により、入力画像とアンシャープ画像との差分をとることで生成される。   In step S134, the correction signal generation unit 202 generates a plurality of correction signals from each of the unsharp images corresponding to the plurality of specific image height PSFs generated in step S113. Each correction signal is generated by taking the difference between the input image and the unsharp image according to the above-described equation (2).

次に、ステップS135において、補正信号適用部203は、ステップS134で生成された複数の補正信号を入力画像にそれぞれ適用して複数の中間データとしての鮮鋭化画像(第1のデータ)を生成する。ここでは、式(1)により各補正信号を入力画像に適用することで鮮鋭化画像を生成する。   Next, in step S135, the correction signal application unit 203 applies the plurality of correction signals generated in step S134 to the input image, respectively, and generates a sharpened image (first data) as a plurality of intermediate data. . Here, a sharpened image is generated by applying each correction signal to the input image according to Equation (1).

次に、ステップS136において、重み情報取得部204は、次のステップS137にて像高方向の補間処理を行うための重み情報をメモリ109から取得する。   Next, in step S136, the weight information acquisition unit 204 acquires weight information for performing interpolation processing in the image height direction from the memory 109 in the next step S137.

次に、ステップS137において、信号合成部205は、ステップS135で生成された複数の鮮鋭化画像とステップS136で取得された重み情報とを用いて、鮮鋭化画像の像高方向での補間処理を行い、目的とする鮮鋭化画像を生成する。このステップS137で行われる補間処理は、処理対象が鮮鋭化画像と図9のステップS115とは異なるが、基本的な処理の流れはステップS115および図13のステップS126と同じである。ステップS126とステップS137とを比較すると、数式の上では、式(1)におけるh(x,y)を像高方向に補間するのがステップS126であり、g(x,y)を像高方向に補間するのがステップS137である。また、式(101),(102)を用いて表現すると、Xa,Xbが各像高のPSFを用いて鮮鋭化した画像となり、式(102)中のcが重み情報となる。 Next, in step S137, the signal synthesis unit 205 performs interpolation processing in the image height direction of the sharpened image using the plurality of sharpened images generated in step S135 and the weight information acquired in step S136. To produce a desired sharpened image. The interpolation process performed in step S137 is different from the sharpened image and step S115 in FIG. 9 in the processing target, but the basic process flow is the same as step S115 and step S126 in FIG. Comparing step S126 and step S137, in the equation, step S126 interpolates h (x, y) in equation (1) in the image height direction, and g (x, y) in the image height direction. In step S137, interpolation is performed. Further, the formula (101), is expressed using a (102), Xa, Xb becomes sharpened image with the PSF for each image height, c n in the formula (102) is weight information.

本実施例によれば、特定像高でのPSFのデータを用いた像高方向での補間処理を行うことにより、少ない保持データ量でありながらも、光学特性(PSF)の像高変化に対応した高精度の鮮鋭化処理(アンシャープマスク処理)を行うことができる。   According to the present embodiment, by performing interpolation in the image height direction using PSF data at a specific image height, it is possible to cope with a change in the image height of the optical characteristics (PSF) even though the amount of retained data is small. High-precision sharpening processing (unsharp mask processing) can be performed.

次に、本発明の実施例2である撮像装置について説明する。本実施例の撮像装置は、画像処理(アンシャープマスク処理)の内容のみが実施例1の撮像装置と異なり、撮像装置の構成は実施例1の撮像装置と共通である。このため、本実施例の撮像装置の構成については説明を省略する。   Next, an image pickup apparatus that is Embodiment 2 of the present invention will be described. The imaging apparatus of the present embodiment is different from the imaging apparatus of the first embodiment only in the contents of image processing (unsharp mask processing), and the configuration of the imaging apparatus is the same as that of the imaging apparatus of the first embodiment. For this reason, description of the configuration of the imaging apparatus of the present embodiment is omitted.

図15のフローチャートには、本実施例におけるアンシャープマスク処理の流れを示している。本実施例でも、システムコントローラ106の指示を受けた画像処理部104が画像処理プログラムに従って本処理を行う。   The flowchart of FIG. 15 shows the flow of unsharp mask processing in the present embodiment. Also in this embodiment, the image processing unit 104 that has received an instruction from the system controller 106 performs this processing according to the image processing program.

本実施例は、補正信号の生成方法において実施例1と異なる。具体的には、実施例1では式(2)により補正信号を生成したのに対して、本実施例では式(3)により補正信号を生成する。なお、ステップS211とステップS212は、実施例1(図9,図13および図14)のステップS111とステップS112と同じであり、これらの説明は省略する。   The present embodiment is different from the first embodiment in the correction signal generation method. Specifically, the correction signal is generated by the expression (2) in the first embodiment, whereas the correction signal is generated by the expression (3) in the present embodiment. Note that step S211 and step S212 are the same as step S111 and step S112 of the first embodiment (FIGS. 9, 13, and 14), and description thereof is omitted.

ステップS213において、補正信号生成部202は、理想点像とステップS212でPSF選択部201が選択した特定像高のPSFのそれぞれとの差分をとることで複数のフィルタを生成する。   In step S213, the correction signal generation unit 202 generates a plurality of filters by taking the difference between the ideal point image and the PSF having the specific image height selected by the PSF selection unit 201 in step S212.

次に、ステップS214において、補正信号生成部202は、ステップS213にて生成した複数のフィルタをそれぞれ入力画像に対してコンボリューションすることで複数の補正信号を生成する。   Next, in step S214, the correction signal generation unit 202 generates a plurality of correction signals by convolving the plurality of filters generated in step S213 with respect to the input image, respectively.

次に、ステップS215において、重み情報取得部204は、次のステップS216にて像高方向の補間処理を行うための重み情報をメモリ109から取得する。   Next, in step S215, the weight information acquisition unit 204 acquires weight information for performing interpolation processing in the image height direction from the memory 109 in the next step S216.

次に、ステップS216において、補正信号生成部202は、ステップS214で生成した複数の補正信号とステップS125で取得した重み情報とを用いて、補正信号の像高方向での補間処理を行う。このステップS216および次のステップS217の処理は、図13にて説明したステップS126およびステップS127の処理と同じであるため、これらの詳細な説明は省略する。本実施例でも、特定像高や補間方法については先に説明したように撮像レンズ101の光学特性を考慮して選定する。   Next, in step S216, the correction signal generation unit 202 performs interpolation processing of the correction signal in the image height direction using the plurality of correction signals generated in step S214 and the weight information acquired in step S125. Since the processing of step S216 and the next step S217 is the same as the processing of step S126 and step S127 described in FIG. 13, detailed description thereof will be omitted. Also in this embodiment, the specific image height and the interpolation method are selected in consideration of the optical characteristics of the imaging lens 101 as described above.

以上の処理を行うことで、式(6)によるアンシャープマスク処理を行うことができる。   By performing the above process, the unsharp mask process by Formula (6) can be performed.

なお、像高方向の補間処理については、実施例1で説明したように、補正信号に対して行ってもよいし、補正信号を入力画像に適用した後の鮮鋭化画像に対して行ってもよい。   Note that the interpolation processing in the image height direction may be performed on the correction signal as described in the first embodiment, or may be performed on the sharpened image after the correction signal is applied to the input image. Good.

次に、本発明の実施例3である撮像装置について説明する。本実施例の撮像装置は、画像処理(アンシャープマスク処理)の内容のみが実施例1の撮像装置と異なり、撮像装置の構成は実施例1の撮像装置と共通である。このため、本実施例の撮像装置の構成については説明を省略する。   Next, an image pickup apparatus that is Embodiment 3 of the present invention will be described. The imaging apparatus of the present embodiment is different from the imaging apparatus of the first embodiment only in the contents of image processing (unsharp mask processing), and the configuration of the imaging apparatus is the same as that of the imaging apparatus of the first embodiment. For this reason, description of the configuration of the imaging apparatus of the present embodiment is omitted.

図16のフローチャートには、本実施例におけるアンシャープマスク処理の流れを示している。本実施例でも、システムコントローラ106の指示を受けた画像処理部104が画像処理プログラムに従って本処理を行う。   The flowchart of FIG. 16 shows the flow of unsharp mask processing in the present embodiment. Also in this embodiment, the image processing unit 104 that has received an instruction from the system controller 106 performs this processing according to the image processing program.

本実施例は、補正信号の生成方法および補正信号の入力画像に対する適用方法が実施例1,2と異なる。具体的には、本実施例では、式(7)によって補正信号を生成し、入力画像に対してこの補正信号を適用する。このため、図16のフローチャートにおいて、ステップS313(補正信号の生成)およびステップS314(補正信号の適用)が実施例1,2とは異なる。なお、ステップS311とステップS312は、実施例1(図9,図13および図14)のステップS111とステップS112と同じであり、これらの説明は省略する。   This embodiment is different from the first and second embodiments in the method of generating a correction signal and the method of applying the correction signal to the input image. Specifically, in this embodiment, a correction signal is generated according to Expression (7), and this correction signal is applied to the input image. For this reason, in the flowchart of FIG. 16, step S313 (generation of the correction signal) and step S314 (application of the correction signal) are different from the first and second embodiments. Note that steps S311 and S312 are the same as steps S111 and S112 of the first embodiment (FIGS. 9, 13, and 14), and a description thereof is omitted.

ステップS313において、補正信号生成部202は、ステップS312で選択した複数の特定像高のPSFのそれぞれをそのままアンシャープマスクとして用い、式(7)の中括弧内の部分に相当する複数の補正信号を生成する。なお、本実施例では、補正信号生成部202が生成する補正信号はフィルタと等価となる。   In step S313, the correction signal generation unit 202 uses each of the plurality of PSFs having specific image heights selected in step S312 as an unsharp mask, and uses a plurality of correction signals corresponding to the portion in the braces of Expression (7). Is generated. In this embodiment, the correction signal generated by the correction signal generation unit 202 is equivalent to a filter.

次に、ステップS314において、補正信号適用部203は、ステップS313において生成された複数の補正信号(フィルタ)のそれぞれを入力画像に対してコンボリューションすることで複数の中間データとしての鮮鋭化画像(第1のデータ)を生成する。このように、本実施例では、予め撮像レンズ101のPSFをアンシャープマスクとして用いて生成したフィルタとしての補正信号を、入力画像に対して一度だけコンボリューションすることで鮮鋭化画像を生成することができる。   Next, in step S314, the correction signal applying unit 203 convolves each of the plurality of correction signals (filters) generated in step S313 with respect to the input image, thereby obtaining a sharpened image (a plurality of intermediate data). 1st data) is generated. As described above, in this embodiment, a sharpened image is generated by convolving the correction signal as a filter generated in advance using the PSF of the imaging lens 101 as an unsharp mask with respect to the input image only once. Can do.

ステップS315(重み情報の取得)およびステップS316(信号の合成)については、図14にて説明したステップS136およびステップS137と同じであるため、これらの詳しい説明は省略する。本実施例でも、図14にて説明した処理と同様に、信号合成部205での重み付け合成(補間処理)により目的とする鮮鋭化画像(第2のデータ)が得られる。   Step S315 (acquisition of weight information) and step S316 (signal synthesis) are the same as steps S136 and S137 described with reference to FIG. 14, and thus detailed description thereof is omitted. Also in the present embodiment, a target sharpened image (second data) is obtained by weighted synthesis (interpolation processing) in the signal synthesis unit 205, as in the processing described with reference to FIG.

本実施例でも、特定像高や補間方法については先に説明したように撮像レンズ101の光学特性を考慮して選定する。   Also in this embodiment, the specific image height and the interpolation method are selected in consideration of the optical characteristics of the imaging lens 101 as described above.

以上の処理を行うことで、式(7)によるアンシャープマスク処理を行うことができる。   By performing the above process, the unsharp mask process by Formula (7) can be performed.

上記各実施例では、画像処理装置としての画像処理部104が撮像装置に組み込まれている場合について説明したが、画像処理装置を、パーソナルコンピュータ等、撮像装置とは別の装置として構成してもよい。この場合、画像処理装置は、撮像装置にて取得された撮影画像を、半導体メモリ等の記憶媒体やインターネット,LAN等の通信を介して入力画像として取得し、該入力画像に対するアンシャープマスク処理を行う。
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
In each of the above embodiments, the case where the image processing unit 104 as an image processing device is incorporated in the imaging device has been described. However, the image processing device may be configured as a device other than the imaging device, such as a personal computer. Good. In this case, the image processing apparatus acquires the captured image acquired by the imaging apparatus as an input image via a storage medium such as a semiconductor memory, communication via the Internet, LAN, and the like, and performs unsharp mask processing on the input image. Do.
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

以上説明した各実施例は代表的な例にすぎず、本発明の実施に際しては、各実施例に対して種々の変形や変更が可能である。   Each embodiment described above is only a representative example, and various modifications and changes can be made to each embodiment in carrying out the present invention.

101 撮像レンズ
104 画像処理部
201 PSF選択部
202 補正信号生成部
203 補正信号適用部
204 重み情報取得部
205 信号合成部
101 Imaging Lens 104 Image Processing Unit 201 PSF Selection Unit 202 Correction Signal Generation Unit 203 Correction Signal Application Unit 204 Weight Information Acquisition Unit 205 Signal Synthesis Unit

Claims (12)

光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行って鮮鋭化画像を生成する画像処理装置であって、
前記撮像の撮像条件に応じた前記光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得するPSF取得手段と、
前記点像強度分布関数に関する情報を用いて前記複数の特定像高それぞれ対応する複数のフィルタを生成するフィルタ生成手段と、
前記入力画像に対して前記複数のフィルタをそれぞれ適用して複数の第1のデータを生成するデータ生成手段と、
像高に応じた重み情報を取得する重み取得手段と、
前記重み情報を用いて前記複数の第1のデータの重み付け合成を行って、前記補正処理に用いられるデータ又は前記鮮鋭化画像である第2のデータを生成する合成手段とを有し、
前記フィルタ生成手段は、前記複数の特定像高での前記点像強度分布関数のそれぞれと理想点像との差分を用いて前記複数のフィルタを生成し、
前記データ生成手段は、前記入力画像に対して前記複数のフィルタをそれぞれ畳み込み積分して前記複数の第1のデータを生成し、
前記鮮鋭化画像は、前記補正処理において前記第2のデータを用いて生成された補正データを前記入力画像に対して加算することで生成されることを特徴とする画像処理装置。
An image processing apparatus that generates a sharpened image by performing a correction process for sharpening an input image generated by imaging through an optical system,
PSF acquisition means for acquiring information on the point image intensity distribution function of the optical system according to the imaging condition of the imaging, the point image intensity distribution function at a plurality of specific image heights;
A filter generation means for generating a plurality of filters which respond respectively are paired with the plurality of specific image height using information on the point image intensity distribution function,
Data generating means for generating a plurality of first data by applying each of the plurality of filters to the input image;
Weight acquisition means for acquiring weight information according to image height;
Wherein by weighting synthesis of the first data of the plurality using a weight information, it said correction data also used for processing have a synthesizing means for generating a second data which is the sharpened image,
The filter generation means generates the plurality of filters using a difference between each of the point image intensity distribution functions at the plurality of specific image heights and an ideal point image,
The data generation means generates the plurality of first data by convolving and integrating each of the plurality of filters with respect to the input image,
The sharpening image is generated by adding correction data generated by using the second data in the correction processing to the input image .
光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行って鮮鋭化画像を生成する画像処理装置であって、
前記撮像の撮像条件に応じた前記光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得するPSF取得手段と、
前記点像強度分布関数に関する情報を用いて前記複数の特定像高にそれぞれ対応する複数のフィルタを生成するフィルタ生成手段と、
前記入力画像に対して前記複数のフィルタをそれぞれ適用して複数の第1のデータを生成するデータ生成手段と、
像高に応じた重み情報を取得する重み取得手段と、
前記重み情報を用いて前記複数の第1のデータの重み付け合成を行って、前記補正処理に用いられるデータ又は前記鮮鋭化画像である第2のデータを生成する合成手段とを有し、
前記フィルタ生成手段は、前記複数の特定像高での点像強度分布関数のそれぞれと理想点像との差分に対して調整係数を乗算して、その乗算により得られた結果を前記理想点像に加算することによって前記複数のフィルタを生成し、
前記データ生成手段は、前記入力画像に対して前記複数のフィルタを畳み込み積分して前記複数の第1のデータを生成し、
前記鮮鋭化画像は、前記補正処理において前記第2のデータとして前記複数の第1のデータの前記重み付け合成により生成されることを特徴とする画像処理装置。
An image processing apparatus that generates a sharpened image by performing a correction process for sharpening an input image generated by imaging through an optical system,
PSF acquisition means for acquiring information on the point image intensity distribution function of the optical system according to the imaging condition of the imaging, the point image intensity distribution function at a plurality of specific image heights;
Filter generating means for generating a plurality of filters respectively corresponding to the plurality of specific image heights using information on the point image intensity distribution function;
Data generating means for generating a plurality of first data by applying each of the plurality of filters to the input image;
Weight acquisition means for acquiring weight information according to image height;
Synthesis means for performing weighted synthesis of the plurality of first data using the weight information to generate data used for the correction process or second data that is the sharpened image;
The filter generation means multiplies the difference between each of the point image intensity distribution functions at the plurality of specific image heights and the ideal point image by an adjustment coefficient, and obtains the result obtained by the multiplication as the ideal point image. Generating the plurality of filters by adding to
The data generation means generates the plurality of first data by convolving and integrating the plurality of filters with respect to the input image,
The sharpened image, the correction process the plurality of first said combined weighted images processor you characterized in that it is produced by the data as the second data in.
前記特定像高を前記光学系の光学情報に基づいて選定する像高選定手段を有することを特徴とする請求項1または2に記載の画像処理装置。 The image processing apparatus according to claim 1 or 2, characterized in that it has an image height selecting means for selecting based on the specific image height on the optical information of the optical system. 前記PSF取得手段は、前記複数の特定像高での点像強度分布関数に関する情報を記憶した記憶手段から該情報を取得することを特徴とする請求項1からのいずれか一項に記載の画像処理装置。 The said PSF acquisition means acquires this information from the memory | storage means which memorize | stored the information regarding the point image intensity distribution function in these specific image heights, The information as described in any one of Claim 1 to 3 characterized by the above-mentioned. Image processing device. 前記複数のフィルタのそれぞれは、2次元に配置された複数のタップを有し、
前記複数のフィルタは、中心タップに対してタップの値が回転非対称に分布しているフィルタを含むことを特徴とする請求項1からのいずれか一項に記載の画像処理装置。
Each of the plurality of filters has a plurality of taps arranged two-dimensionally,
Wherein the plurality of filters, the image processing device according to claim 1, wherein in any one of 4 to include a filter tap values are distributed rotationally asymmetric with respect to the center tap.
前記合成手段は、前記重み付け合成において、前記重み情報に応じて前記複数の第1のデータを像高に対して非線形に合成する特徴とする請求項1からのいずれか一項に記載の画像処理装置。 The combining means is in said weighted combination, images according to any one of claims 1 5, characterized synthesizing nonlinearly first data of said plurality with respect to the image height in response to the weight information Processing equipment. 前記合成手段は、前記重み付け合成において、前記第2のデータのうち前記複数の特定像高のいずれとも異なる他の像高に対応するデータを、少なくとも前記複数の特定像高のうちの2つの像高から前記他の像高までの距離に応じた補間処理によって生成することを特徴とする請求項1からのいずれか一項に記載の画像処理装置。 In the weighted synthesis, the synthesizing unit generates data corresponding to another image height different from any of the plurality of specific image heights in the second data, at least two images of the plurality of specific image heights. the image processing apparatus according to any one of claims 1 to 6, characterized in that generated by interpolation according to the distance from the high to the other image height. 光学系を通して撮像を行う撮像手段と、
該撮像手段により取得された前記入力画像に対して前記補正処理を行う請求項1からのいずれか一項に記載の画像処理装置とを有することを特徴とする撮像装置。
Imaging means for imaging through an optical system;
Imaging apparatus characterized by comprising an image processing apparatus according to any one of claims 1 to 7 for the correction process on the acquired input image by the imaging means.
光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行って鮮鋭化画像を生成する画像処理方法であって、
前記撮像の撮像条件に応じた前記光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得し、
前記点像強度分布関数に関する情報を用いて前記複数の特定像高それぞれ対応する複数のフィルタを生成し、
前記入力画像に対して前記複数のフィルタをそれぞれ適用して複数の第1のデータを生成し、
像高に応じた重み情報を取得し、
前記重み情報を用いて前記複数の第1のデータの重み付け合成を行って前記補正処理に用いられるデータまたは前記鮮鋭化画像である第2のデータを生成し、
前記複数のフィルタは、前記複数の特定像高での前記点像強度分布関数のそれぞれと理想点像との差分を用いて生成され、
前記複数の第1のデータは、前記入力画像に対して前記複数のフィルタをそれぞれ畳み込み積分することで生成され、
前記鮮鋭化画像は、前記補正処理において前記第2のデータを用いて生成された補正データを前記入力画像に対して加算することで生成されることを特徴とする画像処理方法。
An image processing method for generating a sharpened image by performing a correction process for sharpening an input image generated by imaging through an optical system,
Information regarding the point image intensity distribution function at a plurality of specific image heights, which is a point image intensity distribution function of the optical system according to the imaging conditions of the imaging,
Generating a plurality of filters which respond respectively are paired with the plurality of specific image height using information on the point image intensity distribution function,
Applying each of the plurality of filters to the input image to generate a plurality of first data;
Get weight information according to image height,
Wherein by weighting synthesis of the first data of the plurality using a weight information, and generates the second data is data or the sharpened image used in the correction process,
The plurality of filters are generated using a difference between each of the point image intensity distribution functions at the plurality of specific image heights and an ideal point image,
The plurality of first data is generated by convolving and integrating each of the plurality of filters with respect to the input image,
The sharpening image is generated by adding correction data generated by using the second data in the correction processing to the input image .
光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行って鮮鋭化画像を生成する画像処理方法であって、An image processing method for generating a sharpened image by performing a correction process for sharpening an input image generated by imaging through an optical system,
前記撮像の撮像条件に応じた前記光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得し、Information regarding the point image intensity distribution function at a plurality of specific image heights, which is a point image intensity distribution function of the optical system according to the imaging conditions of the imaging,
前記点像強度分布関数に関する情報を用いて前記複数の特定像高にそれぞれ対応する複数のフィルタを生成し、Generating a plurality of filters respectively corresponding to the plurality of specific image heights using information on the point image intensity distribution function;
前記入力画像に対して前記複数のフィルタをそれぞれ適用して複数の第1のデータを生成し、Applying each of the plurality of filters to the input image to generate a plurality of first data;
像高に応じた重み情報を取得し、Get weight information according to image height,
前記重み情報を用いて前記複数の第1のデータの重み付け合成を行って、前記補正処理に用いられるデータまたは前記鮮鋭化画像である第2のデータを生成し、Performing weighted synthesis of the plurality of first data using the weight information to generate data used for the correction process or second data that is the sharpened image;
前記複数のフィルタは、前記複数の特定像高での点像強度分布関数のそれぞれと理想点像との差分に対して調整係数を乗算して、その乗算により得られた結果を前記理想点像に加算することによって生成され、The plurality of filters multiply the difference between each of the point image intensity distribution functions at the plurality of specific image heights and the ideal point image by an adjustment coefficient, and obtain a result obtained by the multiplication as the ideal point image. Is generated by adding to
前記複数の第1のデータは、前記入力画像に対して前記複数のフィルタを畳み込み積分することで生成され、The plurality of first data is generated by convolving and integrating the plurality of filters with respect to the input image,
前記鮮鋭化画像は、前記補正処理において前記第2のデータとして前記複数の第1のデータの前記重み付け合成により生成されることを特徴とする画像処理方法。The sharpening image is generated by the weighted synthesis of the plurality of first data as the second data in the correction process.
コンピュータに、光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行わせて鮮鋭化画像を生成させるコンピュータプログラムであって、
前記コンピュータに、
前記撮像の撮像条件に応じた前記光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得させ、
前記点像強度分布関数に関する情報を用いて前記複数の特定像高それぞれ対応する複数のフィルタを生成させ、
前記入力画像に対して前記複数のフィルタをそれぞれ適用することにより複数の第1のデータを生成させ、
像高に応じた重み情報を取得させ、
前記重み情報を用いた前記複数の第1のデータの重み付け合成により、前記補正処理に用いられるデータまたは前記鮮鋭化画像である第2のデータを生成させ
前記複数のフィルタは、前記複数の特定像高での前記点像強度分布関数のそれぞれと理想点像との差分を用いて生成され、
前記複数の第1のデータは、前記入力画像に対して前記複数のフィルタをそれぞれ畳み込み積分することで生成され、
前記鮮鋭化画像は、前記補正処理において前記第2のデータを用いて生成された補正データを前記入力画像に対して加算することで生成されることを特徴とする画像処理プログラム。
A computer program for causing a computer to generate a sharpened image by performing correction processing for sharpening on an input image generated by imaging through an optical system,
In the computer,
It is a point image intensity distribution function of the optical system according to the imaging conditions of the imaging, and obtains information on the point image intensity distribution function at a plurality of specific image heights,
To produce a plurality of filters which respond respectively are paired with the plurality of specific image height using information on the point image intensity distribution function,
Generating a plurality of first data by applying each of the plurality of filters to the input image;
Get weight information according to image height,
By using weighted synthesis of the plurality of first data using the weight information, data used for the correction process or second data that is the sharpened image is generated ,
The plurality of filters are generated using a difference between each of the point image intensity distribution functions at the plurality of specific image heights and an ideal point image,
The plurality of first data is generated by convolving and integrating each of the plurality of filters with respect to the input image,
The sharpening image is generated by adding correction data generated using the second data in the correction processing to the input image .
コンピュータに、光学系を通した撮像により生成された入力画像に対して鮮鋭化のための補正処理を行わせて鮮鋭化画像を生成させるコンピュータプログラムであって、A computer program for causing a computer to generate a sharpened image by performing correction processing for sharpening on an input image generated by imaging through an optical system,
前記コンピュータに、In the computer,
前記撮像の撮像条件に応じた前記光学系の点像強度分布関数であって複数の特定像高での点像強度分布関数に関する情報を取得させ、It is a point image intensity distribution function of the optical system according to the imaging conditions of the imaging, and obtains information on the point image intensity distribution function at a plurality of specific image heights,
前記点像強度分布関数に関する情報を用いて前記複数の特定像高にそれぞれ対応する複数のフィルタを生成させ、Generating a plurality of filters respectively corresponding to the plurality of specific image heights using information on the point image intensity distribution function;
前記入力画像に対して前記複数のフィルタをそれぞれ適用することにより複数の第1のデータを生成させ、Generating a plurality of first data by applying each of the plurality of filters to the input image;
像高に応じた重み情報を取得させ、Get weight information according to image height,
前記重み情報を用いた前記複数の第1のデータの重み付け合成により、前記補正処理に用いられるデータまたは前記鮮鋭化画像である第2のデータを生成させ、By using weighted synthesis of the plurality of first data using the weight information, data used for the correction process or second data that is the sharpened image is generated,
前記複数のフィルタは、前記複数の特定像高での点像強度分布関数のそれぞれと理想点像との差分に対して調整係数を乗算して、その乗算により得られた結果を前記理想点像に加算することによって生成され、The plurality of filters multiply the difference between each of the point image intensity distribution functions at the plurality of specific image heights and the ideal point image by an adjustment coefficient, and obtain a result obtained by the multiplication as the ideal point image. Is generated by adding to
前記複数の第1のデータは、前記入力画像に対して前記複数のフィルタを畳み込み積分することで生成され、The plurality of first data is generated by convolving and integrating the plurality of filters with respect to the input image,
前記鮮鋭化画像は、前記補正処理において前記第2のデータとして前記複数の第1のデータの前記重み付け合成により生成されることを特徴とする画像処理プログラム。The sharpening image is generated by the weighted synthesis of the plurality of first data as the second data in the correction process.
JP2015028511A 2015-02-17 2015-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program Active JP6562650B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015028511A JP6562650B2 (en) 2015-02-17 2015-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015028511A JP6562650B2 (en) 2015-02-17 2015-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program

Publications (3)

Publication Number Publication Date
JP2016152481A JP2016152481A (en) 2016-08-22
JP2016152481A5 JP2016152481A5 (en) 2018-03-29
JP6562650B2 true JP6562650B2 (en) 2019-08-21

Family

ID=56696864

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015028511A Active JP6562650B2 (en) 2015-02-17 2015-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP6562650B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022019513A1 (en) * 2020-07-24 2022-01-27 삼성전자 주식회사 Method for compensating autofocus and electronic device compensating autofocus

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6625144B2 (en) * 2018-01-05 2019-12-25 キヤノン株式会社 Image processing method and imaging apparatus, image processing apparatus, image processing program, storage medium, and lens device using the same
CN112034692A (en) * 2020-09-22 2020-12-04 珠海奔图电子有限公司 Optical scanning device and electronic imaging apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4053185B2 (en) * 1999-06-22 2008-02-27 富士フイルム株式会社 Image processing method and apparatus
JP2003163809A (en) * 2001-09-13 2003-06-06 Fuji Photo Film Co Ltd Color image processing apparatus and method, and recording medium with software to execute the same recorded thereon
JP4067806B2 (en) * 2001-10-22 2008-03-26 オリンパス株式会社 Image processing apparatus and method
JP4618355B2 (en) * 2008-09-25 2011-01-26 ソニー株式会社 Image processing apparatus and image processing method
US8330825B2 (en) * 2010-02-22 2012-12-11 Eastman Kodak Company Zoom lens system characterization for image sharpening

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022019513A1 (en) * 2020-07-24 2022-01-27 삼성전자 주식회사 Method for compensating autofocus and electronic device compensating autofocus

Also Published As

Publication number Publication date
JP2016152481A (en) 2016-08-22

Similar Documents

Publication Publication Date Title
EP2860694B1 (en) Image processing apparatus, image processing method, image processing program, and non-transitory computer-readable storage medium
US8830351B2 (en) Image processing method and image processing apparatus for image restoration to reduce a detected color shift
JP6234623B2 (en) Image processing method, imaging apparatus using the same, image processing apparatus, and image processing program
JP6347763B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP6071974B2 (en) Image processing method, image processing apparatus, imaging apparatus, and image processing program
JP6440766B2 (en) Image processing method, image processing apparatus, imaging apparatus, program, and storage medium
JP6071860B2 (en) Image processing method, image processing apparatus, imaging apparatus, and image processing program
JP2017041727A (en) Image processing device, imaging device, and image processing program
JP6448526B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP6562650B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP6071966B2 (en) Image processing method, imaging apparatus using the same, image processing apparatus, and image processing program
JP7301601B2 (en) Image processing device, imaging device, lens device, image processing system, image processing method, and program
JP2019036115A (en) Image processing method, image processing device, imaging device, and program
JP6768312B2 (en) Image processing equipment, optical equipment, image processing methods, image processing programs, and recording media
JP6598886B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, storage medium, and lens apparatus
RU2631521C2 (en) Image processing device, image shooting device, image processing method and permanent machine-readable medium
JP2018107541A (en) Image processing apparatus, imaging device, image processing method, and image processing program
US20240144536A1 (en) Image processing device, image processing method, and storage medium
JP2018180729A (en) Image processing method, image processing apparatus, imaging apparatus, program, and storage medium
RU2656009C1 (en) Image processing device, image survey device, image processing method and continuous automated data medium
JP2021027565A (en) Image processing method, imaging apparatus employing the same, image processing device, and image processing program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180215

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181011

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181204

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190131

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190625

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190723

R151 Written notification of patent or utility model registration

Ref document number: 6562650

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151