JP6255892B2 - Image processing apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP6255892B2
JP6255892B2 JP2013220416A JP2013220416A JP6255892B2 JP 6255892 B2 JP6255892 B2 JP 6255892B2 JP 2013220416 A JP2013220416 A JP 2013220416A JP 2013220416 A JP2013220416 A JP 2013220416A JP 6255892 B2 JP6255892 B2 JP 6255892B2
Authority
JP
Japan
Prior art keywords
filter
image
resolution
resolution information
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013220416A
Other languages
Japanese (ja)
Other versions
JP2015082242A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2013220416A priority Critical patent/JP6255892B2/en
Publication of JP2015082242A publication Critical patent/JP2015082242A/en
Application granted granted Critical
Publication of JP6255892B2 publication Critical patent/JP6255892B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

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

デジタルカメラなどによる撮影画像では、解像度の劣化が生じていることが多い。このような劣化は、レンズ光学系の収差や開口サイズの画角依存性のため、光軸中心部に対して周辺部に生ずる傾向があり、安価なレンズ光学系では顕著である。そこで、撮影画像において、このような光学系による周辺部の画像劣化を画像処理により回復させることが試みられている。   In a photographed image by a digital camera or the like, resolution degradation often occurs. Such deterioration tends to occur in the peripheral portion with respect to the central portion of the optical axis due to the aberration of the lens optical system and the angle-of-view dependency of the aperture size, and is remarkable in an inexpensive lens optical system. Therefore, attempts have been made to recover image degradation of the peripheral portion caused by such an optical system in the captured image by image processing.

例えば、第1マークと第2マークを有するキャリブレーション用チャートを少なくとも2方向から撮影してマークの位置を特定するなどの処理を行うことにより、画像データの劣化を回復させることを目指した例がある。画像データの回復項目に対応する画像領域を画像データから抽出し、回復項目の調整操作に応じて回復フィルタを調整し、回復フィルタによって画像領域の回復処理を行う画像処理装置も知られている。また、複数の指標が含まれるパターン画像から検出された指標の第1の位置と、撮像装置に係るパラメータを用いて計算された指標の第2の位置との差に基づいて補正を行う方法も知られている(例えば、特許文献1〜3参照)。   For example, there is an example aiming at recovering the degradation of image data by performing processing such as photographing a calibration chart having a first mark and a second mark from at least two directions and specifying the position of the mark. is there. There is also known an image processing apparatus that extracts an image area corresponding to a recovery item of image data from the image data, adjusts a recovery filter according to an adjustment operation of the recovery item, and performs recovery processing of the image area by the recovery filter. There is also a method for performing correction based on a difference between a first position of an index detected from a pattern image including a plurality of indices and a second position of the index calculated using a parameter relating to the imaging apparatus. It is known (for example, see Patent Documents 1 to 3).

また、上記のように、画像において検出された指標の位置などに基づき補正を行う方法では、有限個の指標を用いるため、補間処理が必要になる。このため、補間処理を行う方法も知られている(例えば、特許文献4参照)。   In addition, as described above, the method of performing correction based on the position of the index detected in the image uses a finite number of indices, and thus requires interpolation processing. For this reason, a method of performing interpolation processing is also known (for example, see Patent Document 4).

特開2003−307466号公報JP 2003-307466 A 特開2011−193277号公報JP 2011-193277 A 特開2007−34985号公報JP 2007-34985 A 特開2004−48112号公報JP 2004-48112 A

しかしながら、上記のように、画像において検出された指標の位置などに基づき補正を行う方法において補間処理を用いても、例えば、解像度の劣化に異方性がある等の理由により、適切に補正が行えない場合がある。   However, as described above, even if interpolation processing is used in a method for performing correction based on the position of an index detected in an image, for example, due to reasons such as anisotropy in resolution degradation, correction is appropriately performed. It may not be possible.

ひとつの側面によれば、本発明の目的は、画像において、解像度の劣化を精度よく補正するフィルタを生成することができるようにすることである。   According to one aspect, an object of the present invention is to enable generation of a filter that accurately corrects resolution degradation in an image.

ひとつの態様である画像処理装置は、解像度算出部、補間部、及びフィルタ算出部を有している。解像度算出部は、画像上の少なくとも二点に対応する解像度の状況を示す解像度情報を、画像に基づきそれぞれ算出する。補間部は、少なくとも二点以外の画像上の一点に対応する解像度情報を、少なくとも二点のそれぞれに対応する解像度情報と、少なくとも二点および一点の画像上の位置とに基づき算出する。フィルタ算出部は、一点に対応する解像度情報に応じて、画像の前記一点を含む領域を補正するためのフィルタを算出する。この画像処理装置において、解像度情報は、画像の各点に対応する解像度に応じた解像度値、当該解像度の異方性を示す異方性度、および当該解像度の異方性に対応する角度を有し、当該解像度値、当該異方性度、及び当該角度は、少なくとも二点のそれぞれに対して、少なくとも2つの方向のそれぞれにおいて間隔及び幅の異なる線を順次等距離の位置に備えた模様を含む被写体を撮影した画像における、当該模様に対応する輝度値の振幅が同一の点の分布が形成する楕円の大きさ、楕円率、画像における当該楕円の角度に対応する。
An image processing apparatus according to one aspect includes a resolution calculation unit, an interpolation unit, and a filter calculation unit. The resolution calculation unit calculates resolution information indicating the resolution status corresponding to at least two points on the image based on the image. The interpolation unit calculates resolution information corresponding to one point on the image other than at least two points based on the resolution information corresponding to each of at least two points and at least two positions on the image. The filter calculation unit calculates a filter for correcting a region including the one point of the image according to the resolution information corresponding to the one point. In this image processing apparatus, the resolution information has a resolution value corresponding to the resolution corresponding to each point of the image, an anisotropy indicating the anisotropy of the resolution, and an angle corresponding to the anisotropy of the resolution. The resolution value, the degree of anisotropy, and the angle have a pattern in which lines having different intervals and widths are sequentially arranged at equal distances in each of at least two directions with respect to each of at least two points. This corresponds to the size of the ellipse, the ellipticity, and the angle of the ellipse formed by the distribution of points having the same amplitude of the luminance value corresponding to the pattern in the image of the captured subject.

実施形態の画像処理装置、画像処理方法及びプログラムによれば、画像において、解像度の劣化を精度よく補正するフィルタを生成することができる。   According to the image processing apparatus, the image processing method, and the program of the embodiment, it is possible to generate a filter that accurately corrects resolution degradation in an image.

第1の実施の形態による画像処理装置を含む撮像装置の概略構成の一例を示すブロック図である。It is a block diagram which shows an example of schematic structure of the imaging device containing the image processing device by 1st Embodiment. 第1の実施の形態による係数分析部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the coefficient analysis part by 1st Embodiment. 第1の実施の形態による補間部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the interpolation part by 1st Embodiment. 第1の実施の形態による光学系の一例を示す図である。It is a figure which shows an example of the optical system by 1st Embodiment. 第1の実施の形態による画像位置に応じた開口の例を示す図である。It is a figure which shows the example of the opening according to the image position by 1st Embodiment. 第1の実施の形態による画像位置に応じたボケの方向の一例を示す図である。It is a figure which shows an example of the direction of the blur according to the image position by 1st Embodiment. 第1の実施の形態によるチャートを用いる場合の解像度を説明するための図である。It is a figure for demonstrating the resolution in the case of using the chart by 1st Embodiment. 第1の実施の形態によるチャートで解像度を計測した結果を示す図である。It is a figure which shows the result of having measured the resolution with the chart by 1st Embodiment. 第1の実施の形態による撮影画像位置による解像度劣化の相違の一例を示す図である。It is a figure which shows an example of the difference in the resolution degradation by the picked-up image position by 1st Embodiment. 第1の実施の形態によるチャートにおける解像度の異方性を示す図である。It is a figure which shows the anisotropy of the resolution in the chart by 1st Embodiment. 第1の実施の形態によるチャートの解像度分析結果を示す図である。It is a figure which shows the resolution analysis result of the chart by 1st Embodiment. 第1の実施の形態による撮影画像中央部のチャートの解像度分析結果を示す図である。It is a figure which shows the resolution analysis result of the chart of the captured image center part by 1st Embodiment. 第1の実施の形態によるPSFの算出方法を説明する図である。It is a figure explaining the calculation method of PSF by a 1st embodiment. 第1の実施の形態によるPSFをフーリエ変換したときの特性例を示す図である。It is a figure which shows the example of a characteristic when Fourier-transforming PSF by 1st Embodiment. 第1の実施の形態による楕円のPSFの一例を示す図である。It is a figure which shows an example of the elliptical PSF by 1st Embodiment. 第1の実施の形態による楕円のPSFをフーリエ変換した図である。It is the figure which carried out the Fourier-transform of the elliptical PSF by 1st Embodiment. 第1の実施の形態によるK(ω,θ)の逆数を示す図である。It is a figure which shows the reciprocal number of K ((omega), (theta)) by 1st Embodiment. 第1の実施の形態による一定値を分母に足した場合のフィルタの一例を示す図である。It is a figure which shows an example of the filter at the time of adding the constant value by 1st Embodiment to the denominator. 第1の実施の形態による高周波ほどゲインを落とす場合のフィルタの一例を示す図である。It is a figure which shows an example of the filter in the case of reducing a gain, so that it becomes high frequency by 1st Embodiment. 第1の実施の形態によるチャートに基づきフィルタを算出した例を示す図である。It is a figure which shows the example which calculated the filter based on the chart by 1st Embodiment. 第1の実施の形態による9個のチャートから9個のフィルタを算出した例を示す図である。It is a figure which shows the example which calculated nine filters from nine charts by 1st Embodiment. 第1の実施の形態によるフィルタの算出位置の配置例を示す図である。It is a figure which shows the example of arrangement | positioning of the calculation position of the filter by 1st Embodiment. フィルタの補間処理の比較例を示す図である。It is a figure which shows the comparative example of the interpolation process of a filter. フィルタを補間により算出する比較例を示す図である。It is a figure which shows the comparative example which calculates a filter by interpolation. フィルタを補間により算出する比較例を示す図である。It is a figure which shows the comparative example which calculates a filter by interpolation. 要素同士の補間によるフィルタ算出の比較例をまとめた図である。It is the figure which put together the comparative example of the filter calculation by the interpolation between elements. 回転によりフィルタの補間を行う比較例を示す図である。It is a figure which shows the comparative example which performs the interpolation of a filter by rotation. 第1の実施の形態における補間を説明する図である。It is a figure explaining the interpolation in 1st Embodiment. 第1の実施の形態によるフィルタの補間を説明する図である。It is a figure explaining the interpolation of the filter by a 1st embodiment. 第1の実施の形態によるフィルタテーブルの一例を示す図である。It is a figure which shows an example of the filter table by 1st Embodiment. 第1の実施の形態による解像度テーブルの一例を示す図である。It is a figure which shows an example of the resolution table by 1st Embodiment. フィルタ算出例の比較の一例を示す図である。It is a figure which shows an example of the comparison of a filter calculation example. 第1の実施の形態による撮像装置の全体的な処理を示すフローチャートである。It is a flowchart which shows the whole process of the imaging device by 1st Embodiment. 第1の実施の形態による補間処理を示すフローチャートである。It is a flowchart which shows the interpolation process by 1st Embodiment. 変形例による補間部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the interpolation part by a modification. 変形例による角度算出方法を説明する図である。It is a figure explaining the angle calculation method by a modification. 変形例による角度算出方法を説明する図である。It is a figure explaining the angle calculation method by a modification. 第2の実施の形態による撮像装置の概略構成の一例を示すブロック図である。It is a block diagram which shows an example of schematic structure of the imaging device by 2nd Embodiment. 第3の実施の形態による係数分析部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the coefficient analysis part by 3rd Embodiment. 第3の実施の形態による重み係数の決定処理の一例を説明する図である。It is a figure explaining an example of the determination process of the weighting coefficient by 3rd Embodiment. 第3の実施の形態による重み係数の決定処理の一例を説明する図である。It is a figure explaining an example of the determination process of the weighting coefficient by 3rd Embodiment. 第3の実施の形態による画像補正後の解像度の分析結果を示す図である。It is a figure which shows the analysis result of the resolution after the image correction by 3rd Embodiment. 第3の実施の形態による画像補正後の解像度の分析結果を示す図である。It is a figure which shows the analysis result of the resolution after the image correction by 3rd Embodiment. 第3の実施の形態によるフィルタ算出の処理を示すフローチャートである。It is a flowchart which shows the filter calculation process by 3rd Embodiment. 第3の実施の形態によるフィルタ算出の処理を示すフローチャートである。It is a flowchart which shows the filter calculation process by 3rd Embodiment. 第4の実施の形態によるボケが画像の中心に対して非対称の場合を示す図である。It is a figure which shows the case where the blurring by 4th Embodiment is asymmetrical with respect to the center of an image. 第4の実施の形態によるボケが非対称な場合の角度算出方法の一例を示す図である。It is a figure which shows an example of the angle calculation method when the blurring by 4th Embodiment is asymmetrical. 第4の実施の形態による解像度情報の算出方法の効果を示す図である。It is a figure which shows the effect of the calculation method of the resolution information by 4th Embodiment. 第5の実施の形態による画像のボケを表すPSFと、要素数が5×5のフィルタとの大きさの関係の一例を示す図である。It is a figure which shows an example of the magnitude | size relationship between PSF showing the blur of the image by 5th Embodiment, and the filter whose number of elements is 5x5. 第5の実施の形態による複数段のフィルタの構成例を示す図である。It is a figure which shows the structural example of the filter of the multistage by 5th Embodiment. 第5の実施の形態による複数段のフィルタの構成例を示す図である。It is a figure which shows the structural example of the filter of the multistage by 5th Embodiment. 第5の実施の形態によるフィルタ制御部及びフィルタ処理部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the filter control part by 5th Embodiment, and a filter process part. 第5の実施の形態におけるフィルタ制御部及びフィルタ処理部の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of the filter control part in 5th Embodiment, and a filter process part. 第5の実施の形態によるフィルタの分割の一例を示す図である。It is a figure which shows an example of the division | segmentation of the filter by 5th Embodiment. 第5の実施の形態によるフィルタの分割の一例を示す図である。It is a figure which shows an example of the division | segmentation of the filter by 5th Embodiment. 補正用被写体におけるチャートの配置の一例を示す図である。It is a figure which shows an example of the arrangement | positioning of the chart in the to-be-corrected subject. 補正用被写体におけるチャートの配置の一例を示す図である。It is a figure which shows an example of the arrangement | positioning of the chart in the to-be-corrected subject. 補正用被写体におけるチャートの配置の一例を示す図である。It is a figure which shows an example of the arrangement | positioning of the chart in the to-be-corrected subject. 補正用被写体におけるチャートの配置の一例を示す図である。It is a figure which shows an example of the arrangement | positioning of the chart in the to-be-corrected subject. 標準的なコンピュータのハードウエア構成を示す図である。It is a figure which shows the hardware constitutions of a standard computer.

(第1の実施の形態)
以下、図面を参照しながら、第1の実施の形態による画像処理装置について説明する。図1は、第1の実施の形態による画像処理装置を含む撮像装置100の概略構成の一例を示すブロック図である。図1に示す撮像装置100は、被写体として補正用被写体20を撮影し、画像を補正するフィルタを算出するための装置である。図1に示すように、撮像装置100は、光学系1、撮像素子2、Analog Front End(AFE)3、画像処理部4、後処理部5、駆動制御装置6、制御装置7、画像メモリ8、表示部9、係数分析部10、及び補間部13を備える。
(First embodiment)
The image processing apparatus according to the first embodiment will be described below with reference to the drawings. FIG. 1 is a block diagram illustrating an example of a schematic configuration of an imaging apparatus 100 including an image processing apparatus according to the first embodiment. An imaging apparatus 100 shown in FIG. 1 is an apparatus for photographing a correction subject 20 as a subject and calculating a filter for correcting the image. As shown in FIG. 1, the imaging device 100 includes an optical system 1, an imaging device 2, an analog front end (AFE) 3, an image processing unit 4, a post-processing unit 5, a drive control device 6, a control device 7, and an image memory 8. , A display unit 9, a coefficient analysis unit 10, and an interpolation unit 13.

図1の例では、補正用被写体20には、チャート25が、中心と四隅に配置されている。チャート25は、楔形を放射状に配置した模様であり、シーメンスターと呼ばれる。例えば、光学系1は、レンズ11a、11b、11c、及び絞り12を含む。レンズ11a、11b、11c、及び絞り12は、補正用被写体20などの被写体からの光を撮像素子2の撮像面に集光させて被写体の像を結像する。駆動制御装置6は、レンズ11a、11b、11cの位置や絞り12の絞り度合い等を制御する装置である。なお、光学系1は一例であり、その構成は特定のものに限定されない。   In the example of FIG. 1, a chart 25 is arranged at the center and four corners of the correction subject 20. The chart 25 is a pattern in which wedges are arranged radially, and is called a Siemens star. For example, the optical system 1 includes lenses 11a, 11b, 11c, and a diaphragm 12. The lenses 11 a, 11 b, 11 c and the diaphragm 12 focus the light from a subject such as the correction subject 20 on the imaging surface of the imaging device 2 to form an image of the subject. The drive control device 6 is a device that controls the positions of the lenses 11a, 11b, and 11c, the degree of aperture of the aperture 12, and the like. The optical system 1 is an example, and the configuration is not limited to a specific one.

撮像素子2は、光学系1によって集光された被写体からの光を電子信号(アナログ信号)に変換する。撮像素子2は、例えば、Charge−Coupled Device(CCD)/Complementary Metal−Oxide Semiconductor(CMOS)等の二次元撮像素子を含む。撮像素子2は、被写体の像を電子信号(画像信号)に変換してAFE3へ出力する。   The image sensor 2 converts light from the subject collected by the optical system 1 into an electronic signal (analog signal). The imaging device 2 includes, for example, a two-dimensional imaging device such as Charge-Coupled Device (CCD) / Complementary Metal-Oxide Semiconductor (CMOS). The image sensor 2 converts the subject image into an electronic signal (image signal) and outputs the electronic signal to the AFE 3.

AFE3は、撮像画像のアナログ信号をデジタル信号に変換する。AFE3は、例えばAnalog/Digital(A/D)コンバータ31及びタイミングジェネレータ32を含む。タイミングジェネレータ32は、制御装置7からの制御信号に基づいて、撮像素子2の駆動に用いられるタイミングパルスを生成し、撮像素子2及びA/Dコンバータ31へ出力する。A/Dコンバータ31は、タイミングパルスに応じて、アナログ信号をデジタル信号に変換する。   The AFE 3 converts an analog signal of the captured image into a digital signal. The AFE 3 includes, for example, an analog / digital (A / D) converter 31 and a timing generator 32. The timing generator 32 generates a timing pulse used for driving the image sensor 2 based on a control signal from the control device 7 and outputs the timing pulse to the image sensor 2 and the A / D converter 31. The A / D converter 31 converts an analog signal into a digital signal according to the timing pulse.

画像処理部4は、AFE3からのデジタル信号の画像を保存して画像処理を行う。画像処理部4は、RAWメモリ41を含む。RAWメモリ41は、例えばA/Dコンバータ31でデジタル信号に変換された画像(RAW画像)を記録する。画像処理部4は、RAW画像に対して、例えば圧縮処理等、所定の処理を施してもよい。所定の処理が施された画像は画像メモリ8に記録される。   The image processing unit 4 stores an image of a digital signal from the AFE 3 and performs image processing. The image processing unit 4 includes a RAW memory 41. The RAW memory 41 records, for example, an image (RAW image) converted into a digital signal by the A / D converter 31. The image processing unit 4 may perform predetermined processing such as compression processing on the RAW image. The image subjected to the predetermined processing is recorded in the image memory 8.

後処理部5は、所定の処理を経た画像に対して更に、例えば色調を変化させるなど必要な処理を施して表示画像を生成する。後処理部5は、例えば、所定の処理が施された画像を画像メモリ8から読み出して、表示するための画像を生成する処理を行い、表示部9へ出力する。   The post-processing unit 5 further performs necessary processing such as changing the color tone on the image that has undergone predetermined processing to generate a display image. For example, the post-processing unit 5 reads an image that has been subjected to predetermined processing from the image memory 8, performs processing for generating an image to be displayed, and outputs the image to the display unit 9.

画像メモリ8は、所定の処理後の画像を記憶する。表示部9は、例えば、画像を記録するVideo Random Access Memory(VRAM)、及びVRAMの画像を出力するディスプレイを含むことができる。なお、撮像装置100は、表示機能を必ずしも備えなくてもよく、表示部9の替わりに、表示用の画像を記録する記録部(例えば、VRAM等)が設けられてもよい。駆動制御装置6は、光学系1を制御する。制御装置7は、AFE3、及び後処理部5を制御する。   The image memory 8 stores an image after predetermined processing. The display unit 9 can include, for example, a Video Random Access Memory (VRAM) that records an image and a display that outputs an image of the VRAM. Note that the imaging apparatus 100 does not necessarily have a display function, and instead of the display unit 9, a recording unit (for example, a VRAM) that records an image for display may be provided. The drive control device 6 controls the optical system 1. The control device 7 controls the AFE 3 and the post-processing unit 5.

係数分析部10は、チャートが撮影された画像から、各画像位置での解像度を分析し、解像度の異方性を改善するための適切なフィルタデータを決定する。係数分析部10の詳細は後述する。補間部13は、係数分析部10で解析された結果に基づき、補正用被写体20による画像から算出されなかった画像上の点(例えば画素位置)に対応して、補間によりフィルタを算出する。補間により対応するフィルタが算出される点を補間位置ともいう。   The coefficient analysis unit 10 analyzes the resolution at each image position from the image in which the chart is photographed, and determines appropriate filter data for improving the resolution anisotropy. Details of the coefficient analysis unit 10 will be described later. Based on the result analyzed by the coefficient analysis unit 10, the interpolation unit 13 calculates a filter by interpolation corresponding to a point (for example, a pixel position) on the image that has not been calculated from the image of the correction subject 20. A point at which a corresponding filter is calculated by interpolation is also referred to as an interpolation position.

フィルタデータは、例えば、デコンボリューションカーネルのように、画像補正のためのフィルタリングに必要なパラメータの集合とすることができる。デコンボリューションカーネルは、具体的には、Point Spread Function(PSF)に応じた円形又は楕円形の被写体の像の分布する領域と、領域における各画素の重みを表すデータで表すことができる。このようなデータをデコンボリューション分布と称する。   The filter data can be a set of parameters necessary for filtering for image correction, such as a deconvolution kernel. Specifically, the deconvolution kernel can be represented by a region in which an image of a circular or elliptical object corresponding to Point Spread Function (PSF) is distributed and data representing the weight of each pixel in the region. Such data is called a deconvolution distribution.

図2は、係数分析部10の構成の一例を示すブロック図である。図2に示すように、係数分析部10は、解像度算出部101、フィルタ算出部102、及びフィルタメモリ103を有している。解像度算出部101は、画像の位置に応じて、補正用被写体20におけるチャート25の解像度劣化を少なくとも撮像素子2方向で分析する。   FIG. 2 is a block diagram illustrating an example of the configuration of the coefficient analysis unit 10. As illustrated in FIG. 2, the coefficient analysis unit 10 includes a resolution calculation unit 101, a filter calculation unit 102, and a filter memory 103. The resolution calculation unit 101 analyzes resolution deterioration of the chart 25 in the correction subject 20 at least in the direction of the image sensor 2 according to the position of the image.

例えば、解像度算出部101は、横軸に1ピクセルあたりのライン数、縦軸に振幅強度をとった場合の両者の関係により解像度の分析を行うようにしてもよい。解像度算出部101は、後述する解像度情報の角度、異方性度、解像度値を算出する。すなわち解像度算出部101は、補正用被写体20の各チャート25に対応する画像における輝度の振幅値について、ある一定閾値(最大振幅の半分程度)で等高線を作って楕円を求める。求められた楕円が解像度情報に対応している。以下、解像度情報に対応する楕円を、解像度情報の楕円ともいう。解像度情報において、角度は、求められた楕円の画像における向きを示す角度である。異方性度は、求められた楕円の楕円率である。解像度値は、楕円の大きさ(短軸または長軸の長さ)である。   For example, the resolution calculation unit 101 may perform resolution analysis based on the relationship between the number of lines per pixel on the horizontal axis and the amplitude intensity on the vertical axis. The resolution calculation unit 101 calculates an angle, an anisotropy degree, and a resolution value of resolution information described later. That is, the resolution calculation unit 101 obtains an ellipse by creating contour lines with a certain threshold value (about half of the maximum amplitude) for the luminance amplitude value in the image corresponding to each chart 25 of the correction subject 20. The obtained ellipse corresponds to the resolution information. Hereinafter, the ellipse corresponding to the resolution information is also referred to as resolution information ellipse. In the resolution information, the angle is an angle indicating a direction in the obtained ellipse image. The degree of anisotropy is the ellipticity of the obtained ellipse. The resolution value is the size of the ellipse (short axis or long axis length).

なお、求められた解像度情報は、例えば解像度情報の楕円の中心の点に対応する解像度情報、などという。また、解像度情報の楕円の中心点に対応する例えば画素の位置を、解像度情報の算出位置ともいう。   The obtained resolution information is referred to as resolution information corresponding to the center point of the ellipse of the resolution information, for example. For example, the position of a pixel corresponding to the center point of the ellipse in the resolution information is also referred to as a resolution information calculation position.

解像度算出部101は、求めた楕円の長軸と短軸の比率として楕円率を算出できる。解像度算出部101は、画像におけるチャート25の位置に基づいて、例えば幾何学的に解像度情報の角度θ1を算出する。例えば、角度θ1は、画像の光軸中心に対応する画像上の点から解像度情報の算出位置の方向として角度θ1を算出する。また、解像度算出部101は、解像度情報の楕円の長軸、短軸から角度θ1を算出することもできる。長軸、短軸から角度θ1を算出した方が、実際のボケ具合に合わせて角度を算出することができる。   The resolution calculation unit 101 can calculate the ellipticity as the ratio between the major axis and the minor axis of the obtained ellipse. Based on the position of the chart 25 in the image, the resolution calculation unit 101 geometrically calculates the angle θ1 of the resolution information, for example. For example, the angle θ1 is calculated as the direction of the resolution information calculation position from the point on the image corresponding to the optical axis center of the image. The resolution calculation unit 101 can also calculate the angle θ1 from the major axis and minor axis of the ellipse of the resolution information. If the angle θ1 is calculated from the long axis and the short axis, the angle can be calculated in accordance with the actual degree of blur.

解像度算出部101は、解像度情報の角度として、例えば画像の縦方向と、楕円の半径方向との角度を算出すればよい。ここで角度の基準は、画像の縦方向に限定されない。光軸中心は、基本的には画像中心だが、レンズの位置ずれにより中心がずれる場合もある。解像度情報の角度、異方性度、楕円の大きさは、相対的な値でもよい。解像度算出部101は、算出された解像度情報を、算出位置と対応付けて、後述する解像度情報テーブルとして、例えばフィルタメモリ103に記憶させる。   For example, the resolution calculation unit 101 may calculate an angle between the vertical direction of the image and the radial direction of the ellipse as the angle of the resolution information. Here, the angle reference is not limited to the vertical direction of the image. The center of the optical axis is basically the center of the image, but the center may deviate due to the displacement of the lens. The angle, the degree of anisotropy, and the size of the ellipse in the resolution information may be relative values. The resolution calculation unit 101 stores the calculated resolution information in association with the calculated position, for example, in the filter memory 103 as a resolution information table described later.

フィルタ算出部102は、この算出された解像度情報からPSFを決定する。このときのPSFの楕円は、解像度情報の楕円とは90度回転した形状となる。フィルタ算出部102は、画像のPSFに応じたフィルタを算出する。フィルタ算出部102が算出するフィルタは、画像を補正するための逆フィルタであるが、以下、単にフィルタという。フィルタ算出部102は、算出されたフィルタを、算出された画像上の位置と関連付け、後述するフィルタテーブルとして例えばフィルタメモリ103に記憶させる。   The filter calculation unit 102 determines the PSF from the calculated resolution information. The PSF ellipse at this time has a shape rotated 90 degrees from the ellipse of the resolution information. The filter calculation unit 102 calculates a filter according to the PSF of the image. The filter calculated by the filter calculation unit 102 is an inverse filter for correcting an image, but is hereinafter simply referred to as a filter. The filter calculation unit 102 associates the calculated filter with the calculated position on the image, and stores the filter in the filter memory 103 as a filter table to be described later.

図3は、補間部13の構成の一例を示すブロック図である。図3に示すように、補間部13は、補間位置特定部35、補間元特定部36、解像度情報補間部37を有している。補間位置特定部35は、解像度算出部101で解像度情報が算出された位置以外の画像上の位置を、補間によるフィルタ算出対象の算出位置(補間位置ともいう)として特定する。補間元特定部36は、補間位置特定部35で決定された補間位置におけるフィルタ算出を行うために利用する複数の補間元位置を特定する。このとき補間元位置は、解像度算出部101で解像度情報を求めたいずれかの算出位置とする。なお、補間位置特定部35、補間元特定部36は、それぞれの位置を特定するためにフィルタメモリ103に記憶された解像度情報を参照することが好ましい。   FIG. 3 is a block diagram illustrating an example of the configuration of the interpolation unit 13. As illustrated in FIG. 3, the interpolation unit 13 includes an interpolation position specifying unit 35, an interpolation source specifying unit 36, and a resolution information interpolation unit 37. The interpolation position specifying unit 35 specifies a position on the image other than the position where the resolution information is calculated by the resolution calculating unit 101 as a calculation position (also referred to as an interpolation position) of a filter calculation target by interpolation. The interpolation source specifying unit 36 specifies a plurality of interpolation source positions used for performing filter calculation at the interpolation position determined by the interpolation position specifying unit 35. At this time, the interpolation source position is set to one of the calculated positions at which resolution information is obtained by the resolution calculation unit 101. The interpolation position specifying unit 35 and the interpolation source specifying unit 36 preferably refer to the resolution information stored in the filter memory 103 in order to specify each position.

解像度情報補間部37は、解像度情報の角度、解像度値、異方性度を、補間により算出する。補間の方法には、例えば特許文献4に記載のような、ニアレストネイバ法、バイリニア法、バイキュービック法などの方法を用いることができる。このとき、角度は、画像の縦方向または横方向に対する角度とすることができる。補間部13は、補間された解像度情報を係数分析部10に出力する。係数分析部10は、補間された解像度情報から、上述した方法でフィルタ算出部102によりフィルタを算出し、フィルタメモリ103に記憶させる。   The resolution information interpolation unit 37 calculates the angle, resolution value, and anisotropy of the resolution information by interpolation. As an interpolation method, for example, a nearest neighbor method, a bilinear method, a bicubic method, or the like as described in Patent Document 4 can be used. At this time, the angle can be an angle with respect to the vertical direction or the horizontal direction of the image. The interpolation unit 13 outputs the interpolated resolution information to the coefficient analysis unit 10. The coefficient analysis unit 10 calculates a filter by the filter calculation unit 102 from the interpolated resolution information by the method described above, and stores it in the filter memory 103.

以上のようにして、撮像装置100により、画像上の複数の点におけるそれぞれのフィルタが算出される。算出されたフィルタは、算出位置、または補間位置と対応付けて、例えば係数分析部10に設けられたフィルタメモリ103のフィルタテーブルに保存されるようにしてもよい。   As described above, the imaging device 100 calculates each filter at a plurality of points on the image. The calculated filter may be stored in a filter table of the filter memory 103 provided in the coefficient analysis unit 10 in association with the calculation position or the interpolation position, for example.

次に、上記のような撮像装置100における解像度劣化の一つの要因について、図4〜6を用いて説明する。図4は、光学系の一例を示す図である。図5は、画像位置に応じた開口の例を示す図である。図4に示す光学系を用いる場合、図5に示すように、光軸中心での開口は円形である。しかし、画角が大きい場合の開口はけられが生じ、画像位置によって楕円となる。開口が狭くなると解像度は劣化するため、開口の形状と、本実施の形態における解像度情報の楕円の形状とは対応している。   Next, one factor of resolution degradation in the imaging apparatus 100 as described above will be described with reference to FIGS. FIG. 4 is a diagram illustrating an example of an optical system. FIG. 5 is a diagram illustrating an example of an opening corresponding to an image position. When the optical system shown in FIG. 4 is used, the opening at the center of the optical axis is circular as shown in FIG. However, when the angle of view is large, the opening is scraped and becomes an ellipse depending on the image position. Since the resolution is degraded when the opening is narrowed, the shape of the opening corresponds to the shape of the ellipse of the resolution information in the present embodiment.

図6は、画像位置に応じたボケの方向の一例を示す図である。図4に示す光学系を用いる場合、図6に示すように、開口が狭くなると解像度が劣化するので、ボケは半径方向により劣化する傾向がある。半径方向とは、ここでは光軸中心から画像の端部に向かう方向である。図6において、楕円の中心からの距離の大きさがボケの大きさを示し、楕円の中心から楕円上の点への方向がボケの方向を示している。図6に示したように、光軸中心を中心とする同心円を描いたときに、半径方向のボケが大きい。なお、半径方向に直交する方向を円周方向という。ボケが大きいとは、解像度が相対的に低いことをいう。   FIG. 6 is a diagram illustrating an example of a blur direction according to an image position. When the optical system shown in FIG. 4 is used, as shown in FIG. 6, since the resolution deteriorates when the aperture is narrowed, the blur tends to deteriorate in the radial direction. Here, the radial direction is a direction from the center of the optical axis toward the end of the image. In FIG. 6, the size of the distance from the center of the ellipse indicates the size of the blur, and the direction from the center of the ellipse to a point on the ellipse indicates the direction of the blur. As shown in FIG. 6, when a concentric circle centered on the center of the optical axis is drawn, the radial blur is large. A direction orthogonal to the radial direction is referred to as a circumferential direction. Large blur means that the resolution is relatively low.

次に、本実施の形態における解像度情報に関係する解像度の分析について説明する。上記のように、放射状にエッジが分布するチャート25のような模様の撮影により、解像度の劣化の傾向が詳細に分析できる。   Next, analysis of resolution related to resolution information in the present embodiment will be described. As described above, the tendency of resolution degradation can be analyzed in detail by photographing a pattern such as the chart 25 in which edges are distributed radially.

図7は、チャートを用いる場合の解像度を説明するための図である。図7に示す例では、矢印26方向に解像度を計測するために、この方向と垂直な方向に複数データを取得する。図7に示すチャートを用いる場合、チャート25の端部から中心部に向かうほど、ライン幅が狭くなり、単位ピクセル当りのライン数は多くなる。チャート25の中心部は、高周波成分を表す。また、端部から中心部に向かうほど、輝度値の振幅(Intensity)は減少する。   FIG. 7 is a diagram for explaining the resolution when a chart is used. In the example shown in FIG. 7, in order to measure the resolution in the direction of the arrow 26, a plurality of data is acquired in a direction perpendicular to this direction. When the chart shown in FIG. 7 is used, the line width decreases as the distance from the end of the chart 25 toward the center increases, and the number of lines per unit pixel increases. The central part of the chart 25 represents a high frequency component. Further, the amplitude (Intensity) of the luminance value decreases from the end toward the center.

図7に示すチャート25のように、放射状に広がる、例えば楔形形状の被写体を用いることで、方向による解像度(Modulation Transfer Function:MTF)を分析することが可能になる。なお、チャートはシーメンスターに限定されず、空間周波数に対する解像度の変化が計測可能であればよい。   By using, for example, a wedge-shaped subject that spreads radially like a chart 25 shown in FIG. 7, it becomes possible to analyze the resolution by direction (Modulation Transfer Function: MTF). Note that the chart is not limited to a Siemens star as long as the change in resolution with respect to the spatial frequency can be measured.

図8は、チャート25で解像度を計測した結果を示す図である。図8は、図7の矢印26に示す方向で解像度を計測したグラフを示す。図8に示す縦軸は輝度値の振幅を示し、横軸は1ピクセル当りのライン数(Line Pair:LP)を示す。この分析では、振幅が中心部へ向かうほど小さくなり、高周波成分(横軸右方向)になるほど劣化していく様子(MTF)を分析できる。   FIG. 8 is a diagram showing the result of measuring the resolution with the chart 25. FIG. 8 shows a graph in which the resolution is measured in the direction indicated by the arrow 26 in FIG. The vertical axis shown in FIG. 8 indicates the amplitude of the luminance value, and the horizontal axis indicates the number of lines per pixel (Line Pair: LP). In this analysis, it is possible to analyze a state (MTF) in which the amplitude decreases toward the center, and deteriorates as the high frequency component (rightward in the horizontal axis) is reached.

図9は、撮影画像位置による解像度劣化の相違の一例を示す図である。図9に示す例では、チャートを複数枚並べて撮影すると、中央部に対する端部での解像度の劣化を分析できる。図9に示す例では、Dx方向は円周方向、Dy方向は半径方向を示す。Dx方向とDy方向の定義は、以降の図においても同様である。   FIG. 9 is a diagram illustrating an example of a difference in resolution degradation depending on a captured image position. In the example shown in FIG. 9, when a plurality of charts are photographed side by side, it is possible to analyze the resolution degradation at the end with respect to the center. In the example shown in FIG. 9, the Dx direction indicates the circumferential direction, and the Dy direction indicates the radial direction. The definition of the Dx direction and the Dy direction is the same in the following drawings.

図10は、チャート25における解像度の異方性を示す図である。図10に示すように、画像端部を含む周辺部では、単に解像度が劣化しているだけでなく、解像度に異方性があることがわかる。すなわち、チャート25では、半径方向のほうが、円周方向よりもボケが大きく、解像度が劣っている。   FIG. 10 is a diagram illustrating the anisotropy of the resolution in the chart 25. As shown in FIG. 10, it can be seen that, in the peripheral portion including the image edge portion, the resolution is not only deteriorated but also the resolution is anisotropic. That is, in the chart 25, the radial direction is more blurred than the circumferential direction, and the resolution is inferior.

図11は、図10に示したチャートの解像度分析結果を示す図である。図11に示すように、半径方向の解像度が円周方向の解像度よりも劣化している。これにより、画像端部では、解像度に異方性があることが分かり、その解像度を定量的に測定することが可能である。   FIG. 11 is a diagram showing a resolution analysis result of the chart shown in FIG. As shown in FIG. 11, the resolution in the radial direction is worse than the resolution in the circumferential direction. Thereby, it can be seen that there is anisotropy in the resolution at the edge of the image, and the resolution can be measured quantitatively.

図12は、撮影画像中央部のチャートの解像度分析結果を示す図である。ここでのチャートは、例えば図9におけるチャート27である。図12に示すように、半径方向の解像度と、円周方向の解像度とは、それほどの違いはない。よって、画像中央部では、解像度の異方性は見られない。このように、チャート25、27の解像度を比較すると、中央部では、解像度の異方性が少ないが、端部では、異方性がより大きい。   FIG. 12 is a diagram showing the resolution analysis result of the chart in the central portion of the captured image. The chart here is, for example, the chart 27 in FIG. As shown in FIG. 12, there is no significant difference between the resolution in the radial direction and the resolution in the circumferential direction. Therefore, no anisotropy of resolution is observed at the center of the image. As described above, when the resolutions of the charts 25 and 27 are compared, the anisotropy of the resolution is small in the central part, but the anisotropy is larger in the end part.

上記のような解像度劣化を含むボケを補正するには、点広がり関数(PSF)を用いて補正する手法がある。PSFは、例えばボケの度合いを表す関数ともいえる。本実施の形態において、PSFは、解像度情報の楕円を90度回転させた楕円として表される。   In order to correct the blur including resolution degradation as described above, there is a method of correcting using a point spread function (PSF). The PSF can be said to be a function representing the degree of blur, for example. In the present embodiment, the PSF is represented as an ellipse obtained by rotating an ellipse of resolution information by 90 degrees.

図13は、PSFの算出方法を説明する図である。図13に示すように、チャート25において、図7に示した輝度値の振幅が同一の値を有する点を結ぶことにより、解像度情報の楕円51が得られる。この楕円51を90度回転させることにより、PSF53が得られる。   FIG. 13 is a diagram for explaining a PSF calculation method. As shown in FIG. 13, in the chart 25, an ellipse 51 of resolution information is obtained by connecting points having the same amplitude of the luminance values shown in FIG. PSF 53 is obtained by rotating this ellipse 51 by 90 degrees.

ここで、元画像をx、PSFをkとすると、ボケ画像yは、xとkを畳み込みした画像となり、下記の式1で表される。
Here, if the original image is x and the PSF is k, the blurred image y is an image obtained by convolving x and k, and is expressed by the following Expression 1.

実際にはノイズnが含まれるが、ここでは説明を簡単にするため省略する。
式1は、フーリエ変換されると、式2になる。
Y(ω)=K(ω)X(ω)・・・(式2)
ここで、ωは、空間周波数である。
In practice, noise n is included, but is omitted here for the sake of simplicity.
Equation 1 becomes Equation 2 when Fourier transformed.
Y (ω) = K (ω) X (ω) (Formula 2)
Here, ω is a spatial frequency.

次に、フィルタKinvは、単純に求めようとすると、Kの逆数で求められる。
Kinv(ω)=1/K(ω)・・・(式3)
これより、元画像のフーリエ変換X(ω)は、式4で求められ、これを逆フーリエ変換することにより元画像が算出される。
X(ω)=Kinv(ω)Y(ω)・・・(式4)
Next, the filter Kinv is obtained by the reciprocal of K if it is simply obtained.
Kinv (ω) = 1 / K (ω) (Equation 3)
From this, the Fourier transform X (ω) of the original image is obtained by Equation 4, and the original image is calculated by performing inverse Fourier transform on this.
X (ω) = Kinv (ω) Y (ω) (Formula 4)

このようにPSFをフーリエ変換し、逆数によるフィルタ関数(逆フィルタ)を算出する際に、空間周波数での割り算を行うため、高周波領域でゼロ割が生じてしまう場合がある。ゼロ割とは、“0”又は“0”に近い値で割り算することである。高周波でK(ω)が“0”に近いと逆数が大きくなりすぎ、高周波のノイズが強調されてしまう。   In this way, when the PSF is Fourier-transformed and the filter function (inverse filter) by the reciprocal number is calculated, division by the spatial frequency is performed, so that there is a case where zero division occurs in the high frequency region. Zero division is division by “0” or a value close to “0”. When K (ω) is close to “0” at a high frequency, the reciprocal becomes too large, and high frequency noise is emphasized.

図14は、PSFをフーリエ変換したときの特性例を示す図である。図14において、横軸は周波数ωであり、縦軸はK(ω)を示している。図14に示すように、K(ω)は、高周波では“0”に近くなる。このように、K(ω)が“0”に近くなると、Kinv(ω)では、高周波でのノイズが拡大されてしまう。そこで、この高周波でのノイズを低減するために、式5のように、分母に補正項を挿入して高周波での強調を防ぐ。
Kinv(ω)=1/(K(ω)+λ)・・・(式5)
フィルタは、複素数なので、共役複素数を用いて表す。
FIG. 14 is a diagram illustrating a characteristic example when the PSF is subjected to Fourier transform. In FIG. 14, the horizontal axis represents the frequency ω, and the vertical axis represents K (ω). As shown in FIG. 14, K (ω) is close to “0” at high frequencies. As described above, when K (ω) is close to “0”, noise at high frequency is expanded in Kinv (ω). Therefore, in order to reduce the noise at the high frequency, a correction term is inserted into the denominator as shown in Equation 5 to prevent emphasis at the high frequency.
Kinv (ω) = 1 / (K (ω) + λ) (Formula 5)
Since the filter is a complex number, it is expressed using a conjugate complex number.

ここで、PSFが楕円の場合について考える。図15は、楕円のPSFの一例を示す図である。図15に示す例では、Dx方向よりもDy方向の方が、解像度が悪いことを示す。つまり、Dy方向の方が、Dx方向よりも解像度が劣化している。   Here, consider the case where the PSF is an ellipse. FIG. 15 is a diagram illustrating an example of an elliptical PSF. In the example shown in FIG. 15, the resolution is worse in the Dy direction than in the Dx direction. That is, the resolution in the Dy direction is deteriorated compared to the Dx direction.

楕円のPSFを、k(r,θ)で表す。ここで、rは半径を表し、θは方向を表す。このように、楕円のPSFは、半径rと方向θの関数として表される。楕円のPSFをフーリエ変換すると、K(ω,θ)=fk(r,θ)となる。fは、フーリエ変換を表す。例えば、フーリエ変換後のK(ω,θ)は、空間周波数ωと方向θの関数である。   The elliptical PSF is represented by k (r, θ). Here, r represents a radius, and θ represents a direction. Thus, the elliptical PSF is expressed as a function of the radius r and the direction θ. When an elliptical PSF is Fourier transformed, K (ω, θ) = fk (r, θ). f represents a Fourier transform. For example, K (ω, θ) after Fourier transform is a function of the spatial frequency ω and the direction θ.

図16は、楕円のPSFをフーリエ変換した図である。図16において、横軸は周波数ωであり、縦軸はK(ω,θ)を示している。図16に示すように、Dx方向と、Dy方向とでは、解像度の特性が異なることが分かる。   FIG. 16 is a diagram obtained by Fourier transforming an elliptical PSF. In FIG. 16, the horizontal axis represents the frequency ω, and the vertical axis represents K (ω, θ). As shown in FIG. 16, it can be seen that the resolution characteristics differ between the Dx direction and the Dy direction.

図17は、K(ω,θ)の逆数を示す図である。図17において、横軸は周波数ωであり、縦軸はKinv(ω,θ)を示している。Kinv(ω,θ)は、下記の式7で表される。Kinv(ω,θ)では、例えば高周波では分母が“0”に近いので高周波でのノイズが拡大されてしまう。
Kinv(ω,θ)=1/K(ω,θ)・・・(式7)
FIG. 17 is a diagram illustrating the reciprocal of K (ω, θ). In FIG. 17, the horizontal axis represents the frequency ω, and the vertical axis represents Kinv (ω, θ). Kinv (ω, θ) is expressed by the following Equation 7. In Kinv (ω, θ), for example, since the denominator is close to “0” at high frequencies, noise at high frequencies is expanded.
Kinv (ω, θ) = 1 / K (ω, θ) (Expression 7)

そこで、この高周波でのノイズを低減するために、分母に補正項を挿入して高周波での強調を防ぐ。式8は、高周波のノイズを低減するフィルタを表す。
Therefore, in order to reduce this high frequency noise, a correction term is inserted into the denominator to prevent high frequency emphasis. Equation 8 represents a filter that reduces high frequency noise.

図18は、式8で表されるような、一定値を分母に足した場合のフィルタの一例を示す図である。図19は、高周波ほどゲインを落とす場合のフィルタの一例を示す図である。本実施の形態では、図18や図19に示すように、周波数成分ごとに重みを加えてノイズを低減することが好ましい。   FIG. 18 is a diagram illustrating an example of a filter when a constant value is added to the denominator as represented by Expression 8. FIG. 19 is a diagram illustrating an example of a filter when the gain is decreased as the frequency increases. In the present embodiment, as shown in FIGS. 18 and 19, it is preferable to reduce the noise by applying a weight to each frequency component.

以上のように、例えば、撮像装置100は、補正用被写体20を撮影することにより、5つのチャート25、27等の中心の位置におけるフィルタを求める。図20は、チャートに基づきフィルタを算出した例を示す図である。図20に示すように、チャート25、28に対応してそれぞれフィルタ52、54が算出されている。   As described above, for example, the imaging apparatus 100 obtains a filter at the center position of the five charts 25 and 27 by photographing the correction subject 20. FIG. 20 is a diagram illustrating an example in which a filter is calculated based on a chart. As shown in FIG. 20, the filters 52 and 54 are calculated corresponding to the charts 25 and 28, respectively.

フィルタ52、54では、フィルタの強度を白黒で表しており、白いほうが強度が強く、黒いほうが強度が小さい。フィルタ52、54は、それぞれ半径方向と円周方向に関して異方性を有していることが、図の濃淡で示されている。すなわち、フィルタ52、54は、半径方向の強度差が大きくなっており、解像度劣化が大きい半径方向の解像度を改善するようなフィルタとなっている。また、フィルタ52、54は、楕円形状に相当した強度の形状となっている。すなわち、フィルタにはチャート測定により得られた解像度情報が反映されている。   In the filters 52 and 54, the intensity of the filter is expressed in black and white, and the white is stronger and the black is less intense. It is shown by the shading in the figure that the filters 52 and 54 have anisotropy in the radial direction and the circumferential direction, respectively. In other words, the filters 52 and 54 are filters that have a large radial strength difference and improve the resolution in the radial direction with a large resolution degradation. The filters 52 and 54 have a shape corresponding to an elliptical shape. That is, the resolution information obtained by the chart measurement is reflected in the filter.

図21は、9個のチャートから9個のフィルタを算出した例を示す図である。図21に示すように、補正用画像55は、9個のチャートを有している。上述したように、それぞれのチャートについてMTFを求めることにより、解像度情報が得られる。解像度情報例57は、解像度情報の楕円をチャートの位置に応じて示した例である。解像度情報例57は、それぞれのチャートに対応する解像度情報の楕円61、64、65などを示している。   FIG. 21 is a diagram illustrating an example in which nine filters are calculated from nine charts. As shown in FIG. 21, the correction image 55 has nine charts. As described above, the resolution information is obtained by obtaining the MTF for each chart. The resolution information example 57 is an example in which an ellipse of resolution information is shown according to the position of the chart. The resolution information example 57 shows ellipses 61, 64, 65, etc. of resolution information corresponding to the respective charts.

フィルタ70は、解像度情報例57の楕円61、64などを90度回転させたPSFに基づき算出されたフィルタを示している。フィルタ70は、9個のチャートに対応する9個のフィルタ71−79を有している。   The filter 70 is a filter calculated based on the PSF obtained by rotating the ellipses 61 and 64 of the resolution information example 57 by 90 degrees. The filter 70 has nine filters 71 to 79 corresponding to the nine charts.

図21のフィルタ70においては、強度を白黒で表しており、白に近い方がフィルタ強度は強く、黒に近い方が強度は小さい。また、一つのフィルタでは、強度差が大きいほうが、大きな解像度劣化を改善するフィルタとなっている。また、フィルタの強度分布と解像度情報の楕円の形状とは互いに対応している。   In the filter 70 of FIG. 21, the intensity is expressed in black and white, the filter intensity is stronger near white and the intensity is smaller near black. In addition, in one filter, the larger the intensity difference is, the larger the resolution degradation is. Further, the intensity distribution of the filter and the ellipse shape of the resolution information correspond to each other.

フィルタ71−79は、それぞれの解像度が悪い方向を改善する方向に設計されている。一般的には半径方向の解像度劣化が大きいので、半径方向の解像度を改善するようなフィルタ特性となる。また、補正用画像55の周辺にいくほど振幅強度が強い傾向のフィルタとなっている。解像度情報の楕円が大きいほど、フィルタ強度は強い傾向である。   The filters 71-79 are designed to improve the direction in which the resolution is poor. Generally, since the resolution degradation in the radial direction is large, the filter characteristics improve the resolution in the radial direction. Further, the filter tends to have a stronger amplitude intensity as it goes around the correction image 55. The greater the ellipse of the resolution information, the stronger the filter strength.

しかしながら、上記の方法では一つのチャートから算出されるフィルタは一つであるから、チャート数が少ない場合は、情報量が少ない。そこで、例えば、チャートから算出されたフィルタに基づき補間によりフィルタを算出する処理を行い、より多くのフィルタによって画像を補正する方法が考えられる。   However, in the above method, since one filter is calculated from one chart, the information amount is small when the number of charts is small. Therefore, for example, a method of performing a process of calculating a filter by interpolation based on a filter calculated from a chart and correcting an image with more filters is conceivable.

図22は、フィルタの算出位置の配置例を示す図である。図22に示すように、フィルタ算出位置配置例59では、9個のフィルタ算出位置67、68などが示されている。フィルタ算出位置配置例80では、108個のフィルタ算出位置81、83等が示されている。このように、フィルタの算出位置を増加させる。   FIG. 22 is a diagram illustrating an arrangement example of filter calculation positions. As shown in FIG. 22, in the filter calculation position arrangement example 59, nine filter calculation positions 67, 68 and the like are shown. In the filter calculation position arrangement example 80, 108 filter calculation positions 81, 83, etc. are shown. In this way, the calculation position of the filter is increased.

図23は、フィルタの補間処理の比較例を示す図である。フィルタ70は9個のフィルタの算出位置に対して算出されたフィルタ71−79を示している。フィルタ算出例85は、補間処理により、108個のフィルタの算出位置に対して算出されたフィルタを示している。なお、フィルタ71−79は、それぞれ有限個の要素から構成されている。フィルタ算出例85は、比較のため、フィルタ71とフィルタ74との有限個の要素同士を補間することにより算出した108個のフィルタの例を示している。   FIG. 23 is a diagram illustrating a comparative example of filter interpolation processing. The filter 70 shows filters 71 to 79 calculated for the calculation positions of nine filters. The filter calculation example 85 shows filters calculated for the calculation positions of 108 filters by interpolation processing. Each of the filters 71-79 is composed of a finite number of elements. The filter calculation example 85 shows an example of 108 filters calculated by interpolating a finite number of elements of the filter 71 and the filter 74 for comparison.

図24は、図23に示したフィルタ71とフィルタ74との間の位置のフィルタを補間により算出する比較例を示している。図24に示すように、フィルタ71とフィルタ74から、フィルタ86が生成される。フィルタ86は、フィルタ71とフィルタ74との有限個の要素同士を補間することにより算出されているとする。このとき、算出されたフィルタ86の算出位置に基づく半径方向は、矢印87の方向である。すなわち、フィルタ86に対応する算出位置では、矢印87の方向が、解像度の異方性を示す方向である。しかし、要素同士の補間により算出されたフィルタ86の異方性を示す方向は、矢印88の方向となっており、実際の異方性を示す方向とずれてしまっている。このように、フィルタ71がフィルタ74に比べて強度が大きいので、フィルタ74の解像度情報が欠落し、フィルタ71の解像度情報が優先して残ってしまう。   FIG. 24 shows a comparative example in which a filter at a position between the filter 71 and the filter 74 shown in FIG. 23 is calculated by interpolation. As shown in FIG. 24, a filter 86 is generated from the filter 71 and the filter 74. It is assumed that the filter 86 is calculated by interpolating a finite number of elements of the filter 71 and the filter 74. At this time, the radial direction based on the calculated position of the calculated filter 86 is the direction of the arrow 87. That is, at the calculation position corresponding to the filter 86, the direction of the arrow 87 is the direction indicating the anisotropy of the resolution. However, the direction indicating the anisotropy of the filter 86 calculated by interpolating elements is the direction of the arrow 88, which is shifted from the direction indicating the actual anisotropy. Thus, since the filter 71 is stronger than the filter 74, the resolution information of the filter 74 is lost, and the resolution information of the filter 71 remains preferentially.

図25は、フィルタ71と、フィルタ75との間の位置のフィルタを補間により算出する比較例を示している。図25は、異方性の方向は同じだが、強度差が大きいフィルタ71とフィルタ75とを補間する例である。図25では、フィルタの形状として、それぞれフィルタに対応する解像度情報の楕円を表している。図25に示すように、異方性の方向が同じフィルタを用いて補間を行う場合、解像度情報の楕円の形状は、強度の大きいフィルタ71が優先されてしまい、フィルタ75の情報が欠落した形になってしまう。上記比較例の、フィルタの要素同士を補間する例のように補間の際にデータが欠落してしまうと、解像度の悪い方向を改善するという効果が低下してしまう。   FIG. 25 shows a comparative example in which a filter at a position between the filter 71 and the filter 75 is calculated by interpolation. FIG. 25 is an example in which the filter 71 and the filter 75 having the same anisotropy direction but a large intensity difference are interpolated. In FIG. 25, as the shape of the filter, an ellipse of resolution information corresponding to each filter is represented. As shown in FIG. 25, when interpolation is performed using filters having the same anisotropy direction, the ellipse shape of the resolution information is given priority to the filter 71 having high strength, and the information of the filter 75 is missing. Become. If data is lost during interpolation as in the example of interpolating filter elements in the above comparative example, the effect of improving the direction of poor resolution is reduced.

図26は、要素同士の補間によるフィルタ算出の比較例をまとめた図である。図26に示すように、解像度情報の楕円61、64からそれぞれフィルタ71、74を算出し、要素同士を補間すると、フィルタ71の影響を強く受けたフィルタ86が算出されてしまう。   FIG. 26 is a table summarizing comparative examples of filter calculation by interpolation between elements. As shown in FIG. 26, when the filters 71 and 74 are calculated from the ellipses 61 and 64 of the resolution information and the elements are interpolated, the filter 86 that is strongly influenced by the filter 71 is calculated.

図27は、算出されたフィルタ86を回転することにより、フィルタの補間を行う比較例を示す図である。図27に示すように、フィルタ86は有限要素のフィルタであるため、情報の欠落が生ずると共に、解像度情報の楕円の異方性度を算出できない。   FIG. 27 is a diagram illustrating a comparative example in which filter interpolation is performed by rotating the calculated filter 86. As shown in FIG. 27, since the filter 86 is a finite element filter, information is lost and the anisotropy of the ellipse of the resolution information cannot be calculated.

図28は、本実施の形態における補間を説明する図である。図28に示すように、本実施の形態においては、補間部13は、解像度情報の楕円61、楕円64の形状に基づき、異方性度、解像度値、角度を補間する。これにより、補間位置における解像度情報の楕円68が算出される。係数分析部10は、算出された解像度情報に基づきPSFを算出し、例えば、フィルタ91を求める。   FIG. 28 is a diagram for explaining interpolation in the present embodiment. As shown in FIG. 28, in the present embodiment, the interpolation unit 13 interpolates the anisotropy, the resolution value, and the angle based on the shapes of the ellipse 61 and the ellipse 64 of the resolution information. Thereby, the ellipse 68 of the resolution information at the interpolation position is calculated. The coefficient analysis unit 10 calculates the PSF based on the calculated resolution information, and obtains the filter 91, for example.

このとき、解像度情報の楕円61、楕円64から楕円68を補間により算出する際には、例えば、解像度情報補間部37は、楕円61の長軸91、楕円64の長軸93の例えば、画像の水平方向に対する角度を算出する。そして解像度情報補間部37は、算出された角度と、それぞれの算出位置、及び楕円68の算出位置に基づき、楕円68の角度を補間するようにしてもよい。   At this time, when the ellipse 68 is calculated from the ellipse 61 and the ellipse 64 of the resolution information by interpolation, for example, the resolution information interpolating unit 37, for example, the long axis 91 of the ellipse 61 and the long axis 93 of the ellipse 64 The angle with respect to the horizontal direction is calculated. Then, the resolution information interpolation unit 37 may interpolate the angle of the ellipse 68 based on the calculated angle, each calculated position, and the calculated position of the ellipse 68.

図29は、本実施の形態によるフィルタの補間を説明する図である。図29に示すように、解像度情報例57は、補正用画像55に基づき算出された各位置での解像度情報の楕円61、62、64、65等を示している。   FIG. 29 is a diagram illustrating filter interpolation according to the present embodiment. As shown in FIG. 29, the resolution information example 57 shows ellipses 61, 62, 64, 65, etc. of the resolution information at each position calculated based on the correction image 55.

解像度情報補間例99は、解像度情報例57に基づき補間された、例えば楕円68で表されるような補間された解像度情報を示している。解像度情報補間例99には、一部分の楕円のみ表示しているが、全面に亘り同様に補間を行って楕円が算出される。フィルタ算出例109は、解像度情報補間例99における解像度情報に基づき算出されたフィルタの例を示している。ここでは、フィルタの値の大小は輝度で表されている。図29の例では、9個の解像度情報から、108個のフィルタが算出されている。   The resolution information interpolation example 99 shows the interpolated resolution information represented by an ellipse 68, for example, interpolated based on the resolution information example 57. In the resolution information interpolation example 99, only a part of the ellipse is displayed, but the ellipse is calculated by performing the same interpolation over the entire surface. The filter calculation example 109 shows an example of a filter calculated based on the resolution information in the resolution information interpolation example 99. Here, the magnitude of the filter value is represented by luminance. In the example of FIG. 29, 108 filters are calculated from nine pieces of resolution information.

図30は、フィルタテーブルの一例を示す図である。図30に示すように、フィルタテーブル125は、フィルタ算出位置と、フィルタとが対応付けられたテーブルである。フィルタテーブル125には、補正用画像55に基づき算出されたフィルタを記憶させる。さらに、補正用画像55に基づき算出された解像度情報に基づき補間された解像度情報から算出されたフィルタを記憶させるようにしてもよい。なお、算出されたフィルタは、例えば、算出位置を含む領域の画像を補正するために用いる。算出位置を含む領域は、例えば、算出位置を中央部に含む長方形の領域などとすることができる。   FIG. 30 is a diagram illustrating an example of the filter table. As shown in FIG. 30, the filter table 125 is a table in which filter calculation positions and filters are associated with each other. The filter table 125 stores a filter calculated based on the correction image 55. Furthermore, a filter calculated from resolution information interpolated based on resolution information calculated based on the correction image 55 may be stored. Note that the calculated filter is used, for example, to correct an image of an area including the calculated position. The area including the calculation position can be, for example, a rectangular area including the calculation position in the center.

図31は、解像度テーブルの一例を示す図である。解像度テーブル127は、解像度情報算出位置と、算出された解像度情報の解像度値η、異方性μ、角度θとを関連付けられたテーブルである。   FIG. 31 is a diagram illustrating an example of a resolution table. The resolution table 127 is a table in which the resolution information calculation position is associated with the resolution value η, anisotropy μ, and angle θ of the calculated resolution information.

図32は、フィルタ算出例の比較の一例を示す図である。図32において、フィルタ算出例85は、上述の図23〜図27のように、フィルタの要素同士を補間することにより算出した、本実施の形態の算出方法とは異なる比較例である。それに対して、フィルタ算出例109は、解像度情報を補間して、補間された解像度情報に基づきフィルタを算出した本実施の形態による算出例である。   FIG. 32 is a diagram illustrating an example of comparison of filter calculation examples. 32, a filter calculation example 85 is a comparative example different from the calculation method of the present embodiment, which is calculated by interpolating filter elements as shown in FIGS. 23 to 27 described above. In contrast, the filter calculation example 109 is a calculation example according to this embodiment in which resolution information is interpolated and a filter is calculated based on the interpolated resolution information.

図32に示すように、元の9個だけのフィルタからフィルタの要素の補間で算出したフィルタ算出例85では、元の9個だけのサンプリング位置での角度情報が残ってしまっており、精度が悪い。しかし、フィルタ算出例109のように、それぞれのフィルタの算出位置で解像度情報の角度を算出してフィルタ係数を算出することで、精度よく異方性の解像度劣化を補正できる。   As shown in FIG. 32, in the filter calculation example 85 calculated by interpolation of filter elements from only the original nine filters, the angle information at the original nine sampling positions remains, and the accuracy is low. bad. However, as in the filter calculation example 109, by calculating the angle of the resolution information at the calculation position of each filter and calculating the filter coefficient, anisotropic resolution degradation can be accurately corrected.

このように、フィルタ算出例85では、それぞれのフィルタ算出位置での解像度情報に基づいていないので、精度よく解像度の劣化を補正できない。それに対して、フィルタ算出例109では、それぞれの算出位置において解像度情報を算出しているので、精度よく解像度の異方性を改善することができる。   Thus, since the filter calculation example 85 is not based on the resolution information at each filter calculation position, the resolution degradation cannot be corrected with high accuracy. On the other hand, in the filter calculation example 109, since the resolution information is calculated at each calculation position, the anisotropy of the resolution can be improved with high accuracy.

以下、フローチャートを参照しながら、本実施の形態による画像処理方法についてさらに説明する。図33は、撮像装置100の全体的な処理を示すフローチャートである。以下の処理は、図1から図38に示した各機能が行うこととして説明する。   Hereinafter, the image processing method according to the present embodiment will be further described with reference to a flowchart. FIG. 33 is a flowchart showing the overall processing of the imaging apparatus 100. The following processing will be described assuming that each function shown in FIGS. 1 to 38 is performed.

図33に示すように、係数分析部10の解像度算出部101は、後処理部5から例えば、補正用被写体20を撮影した画像を読み込む(S131)。解像度算出部101は、補正用画像55等から、例えばチャート25等のチャート部分を取り出す(S132)。解像度算出部101は、取り出したチャート部分の画像に基づき、解像度情報を算出し、例えばフィルタメモリ103の解像度テーブル127に記憶させる(S133)。   As shown in FIG. 33, the resolution calculation unit 101 of the coefficient analysis unit 10 reads, for example, an image obtained by photographing the correction subject 20 from the post-processing unit 5 (S131). The resolution calculation unit 101 extracts, for example, a chart portion such as the chart 25 from the correction image 55 or the like (S132). The resolution calculation unit 101 calculates resolution information based on the extracted chart portion image and stores the resolution information in, for example, the resolution table 127 of the filter memory 103 (S133).

補間部13は、解像度算出部101で算出された解像度情報を解像度情報テーブル127から読み出し、補間処理を行う(S134)。補間処理の詳細については後述する。さらに、補間部13は、補間処理を行った解像度情報を係数分析部10に出力する。係数分析部10では、補間された解像度情報を解像度情報テーブル127に記憶させるようにしてもよい。係数分析部10では、フィルタ算出部102が、解像度情報テーブル127に記憶された解像度情報に基づきPSFを算出し、フィルタのフィルタデータを求める(S135)。   The interpolation unit 13 reads the resolution information calculated by the resolution calculation unit 101 from the resolution information table 127 and performs an interpolation process (S134). Details of the interpolation processing will be described later. Further, the interpolation unit 13 outputs the resolution information subjected to the interpolation process to the coefficient analysis unit 10. The coefficient analysis unit 10 may store the interpolated resolution information in the resolution information table 127. In the coefficient analysis unit 10, the filter calculation unit 102 calculates a PSF based on the resolution information stored in the resolution information table 127, and obtains filter data of the filter (S135).

図34は、補間部13における補間処理を示すフローチャートである。図34に示すように、補間部13において補間位置特定部35は、補間によりフィルタデータを算出する補間位置となるフィルタ算出位置を特定する(S141)。補間元特定部36は、特定された補間位置に基づき、既に算出された解像度情報に対応する算出位置から補間に用いる解像度情報に対応する補間元位置を特定する(S142)。このとき補間元特定部36は、解像度情報テーブル127から、特定したい値に対応する解像度情報を読み出す。   FIG. 34 is a flowchart showing the interpolation processing in the interpolation unit 13. As shown in FIG. 34, in the interpolation unit 13, the interpolation position specifying unit 35 specifies a filter calculation position that is an interpolation position for calculating filter data by interpolation (S141). The interpolation source specifying unit 36 specifies the interpolation source position corresponding to the resolution information used for the interpolation from the calculated position corresponding to the already calculated resolution information based on the specified interpolation position (S142). At this time, the interpolation source specifying unit 36 reads resolution information corresponding to a value to be specified from the resolution information table 127.

解像度情報補間部37は、所定の方法により読み出した解像度情報に基づき特定された位置の解像度を算出する補間処理を行う(S143)。解像度情報補間部37は、算出された解像度情報を係数分析部10に出力する。   The resolution information interpolation unit 37 performs an interpolation process for calculating the resolution of the position specified based on the resolution information read by a predetermined method (S143). The resolution information interpolation unit 37 outputs the calculated resolution information to the coefficient analysis unit 10.

以上説明したように、第1の実施の形態による撮像装置100によれば、ある数のチャートを有する補正用被写体20を撮影した画像に基づき、ある数より多くの画像補正用のフィルタが補間により算出される。補間する場合には、実際に撮像装置100で撮影された画像のチャートの位置に対応する算出位置におけるボケの程度を表す解像度情報が用いられる。撮像装置100は、補間された解像度情報に基づき、補間による算出位置のフィルタを算出する。   As described above, according to the imaging apparatus 100 according to the first embodiment, more than a certain number of image correction filters are interpolated based on an image obtained by photographing the correction subject 20 having a certain number of charts. Calculated. In the case of interpolation, resolution information indicating the degree of blur at the calculated position corresponding to the chart position of the image actually captured by the imaging apparatus 100 is used. The imaging apparatus 100 calculates a filter at a calculation position by interpolation based on the interpolated resolution information.

以上のように第1の実施の形態による撮像装置100は、補正用被写体20におけるチャートの位置以外の算出位置におけるボケの度合いを示す解像度情報を、補間により算出する。これにより、元のチャートの数よりも多くの算出位置におけるフィルタデータが算出される。このとき、算出されるフィルタデータには、解像度の異方性を示す情報が反映される。本実施の形態においては、それぞれの算出位置において解像度情報を算出しているので、精度よく解像度の異方性を改善するフィルタが生成できる。よって、撮像装置100によれば、撮影画像において、精度よく異方性のある解像度劣化を補正できるフィルタを算出することができる。   As described above, the imaging apparatus 100 according to the first embodiment calculates resolution information indicating the degree of blur at a calculation position other than the position of the chart in the correction subject 20 by interpolation. As a result, filter data at more calculation positions than the number of original charts is calculated. At this time, the calculated filter data reflects information indicating resolution anisotropy. In this embodiment, since the resolution information is calculated at each calculation position, it is possible to generate a filter that improves the resolution anisotropy with high accuracy. Therefore, according to the imaging device 100, it is possible to calculate a filter that can accurately correct anisotropic resolution degradation in a captured image.

このとき、解像度情報は、補正用被写体20を撮影した画像から算出されるので、例えば、画像の周縁部などの劣化を、光学系のレンズ面形状、厚さ、硝材などのデータを所定の形式で記述したレンズデータを基に算出する必要がない。さらに、実際の画像に基づいて補正用のフィルタを算出するので、レンズの製造誤差、撮影条件によって、実際に得られる周縁部の劣化がレンズデータから得られる結果とは異なる様な場合にも、精度よく補正を行うフィルタとすることができる。   At this time, since the resolution information is calculated from the image obtained by photographing the correction subject 20, for example, deterioration of the peripheral portion of the image, data on the lens surface shape, thickness, glass material, etc. of the optical system are in a predetermined format. It is not necessary to calculate based on the lens data described in. Furthermore, since the correction filter is calculated based on the actual image, even when the degradation of the peripheral portion actually obtained differs from the result obtained from the lens data due to the manufacturing error of the lens and the photographing conditions, It can be set as a filter which corrects accurately.

本実施の形態では、撮像装置100で解像度を測定するために十分な大きさのチャートを撮影し、撮影された画像に基づき、元のチャート数より多くの算出位置でのフィルタを算出する。そのため、多くの位置でのフィルタを得るために多くのチャートを並べる必要がなく、画像から解像度を算出する際に、チャートが小さすぎて算出が困難という事態が回避される。また、大きなチャートを動かしながら撮影するなど、撮像装置以外の駆動機構などは必要としない。   In this embodiment, the imaging device 100 captures a chart that is large enough to measure the resolution, and calculates filters at more calculation positions than the original number of charts based on the captured image. Therefore, it is not necessary to arrange many charts in order to obtain filters at many positions, and when the resolution is calculated from the image, a situation where the chart is too small and difficult to calculate is avoided. In addition, a driving mechanism other than the imaging device is not required, such as shooting while moving a large chart.

補間によりフィルタ算出を行う際には、解像度情報を補間しているため、例えばブロック毎に同一のフィルタを用いる例などのように、ブロックの境界で段差が生じることはない。また、フィルタの要素同士を補間する場合に生じるような、より強度の強いほうのフィルタに影響され、解像度劣化の角度情報が適正に補間されないフィルタが算出されてしまうという問題も回避される。   When performing the filter calculation by interpolation, the resolution information is interpolated, so that there is no step at the block boundary as in the example of using the same filter for each block. In addition, the problem of calculating a filter that is affected by the stronger filter, such as occurs when the filter elements are interpolated, and in which the angle information of resolution degradation is not appropriately interpolated is also avoided.

このように、チャートを撮影した画像に基づきボケの状態を算出し、ボケの状態を示す解像度情報を補間した結果に基づき画像補正用のフィルタを算出するので、半径方向の解像度劣化が大きいという解像度の異方性を、精度よく改善することが可能になる。   As described above, the blur state is calculated based on the image obtained by photographing the chart, and the image correction filter is calculated based on the result of interpolating the resolution information indicating the blur state. The anisotropy of can be improved with high accuracy.

(第1の実施の形態の変形例)
以下、第1の実施の形態による撮像装置100の変形例について説明する。本変形例において、第1の実施の形態と同様の構成及び動作には同一符号を付し、重複説明を省略する。
(Modification of the first embodiment)
Hereinafter, modifications of the imaging device 100 according to the first embodiment will be described. In this modification, the same configurations and operations as those of the first embodiment are denoted by the same reference numerals, and redundant description is omitted.

本変形例は、解像度情報の補間処理における変形例である。本変形例における撮像装置は、撮像装置100において、補間部13に変えて補間部14を有する。図35は、本変形例による補間部14の構成の一例を示すブロック図である。補間部14は、補間部13の解像度情報補間部37に代えて、楕円形状補間部38、角度算出部39を有している。楕円形状補間部38は、解像度情報のうちの、解像度値及び異方性度を補間する。角度算出部39が、解像度情報の楕円の角度を、補間ではなく幾何学的に求める点で、本変形例は、第1の実施の形態とは相違している。   This modification is a modification in the resolution information interpolation process. The imaging apparatus according to the present modification includes an interpolation unit 14 instead of the interpolation unit 13 in the imaging apparatus 100. FIG. 35 is a block diagram illustrating an example of the configuration of the interpolation unit 14 according to the present modification. The interpolation unit 14 includes an elliptical shape interpolation unit 38 and an angle calculation unit 39 instead of the resolution information interpolation unit 37 of the interpolation unit 13. The elliptical shape interpolation unit 38 interpolates the resolution value and the degree of anisotropy in the resolution information. This modification is different from the first embodiment in that the angle calculation unit 39 obtains the ellipse angle of the resolution information geometrically instead of interpolation.

図36、図37は、本変形例による角度算出方法を説明する図である。図36に示すように、画像96は、9つのチャートを有する画像である。画像96において、光軸の中心は、点98と対応しているとする。このとき、算出位置97における解像度情報の角度を算出する場合について説明する。算出位置97は、画像96の左上のチャートに対応する位置である。距離rは、点98と、算出位置97との距離を表している。また、画像96において、点98を原点とする算出位置97の座標(水平方向及び垂直方向の距離)を(dx、dy)と表している。このとき、算出位置97に対応する半径方向の角度θは、下記の式9で表される。
θ=tan−1(dx/dy)・・・(式9)
36 and 37 are diagrams for explaining an angle calculation method according to this modification. As shown in FIG. 36, the image 96 is an image having nine charts. In the image 96, it is assumed that the center of the optical axis corresponds to the point 98. At this time, the case where the angle of the resolution information at the calculation position 97 is calculated will be described. The calculation position 97 is a position corresponding to the upper left chart of the image 96. The distance r represents the distance between the point 98 and the calculated position 97. In the image 96, the coordinates (the distances in the horizontal direction and the vertical direction) of the calculation position 97 with the point 98 as the origin are represented as (dx, dy). At this time, the angle θ in the radial direction corresponding to the calculated position 97 is expressed by Equation 9 below.
θ = tan −1 (dx / dy) (Equation 9)

図37に示すように、例えば算出位置を全部で108個にする場合にも、例えば、算出位置111における解像度情報の角度θ1、算出位置113における角度θ2は、中心117について同心円を描いたときの半径方向に対応する角度とすることができる。よって、それぞれの算出点の座標を特定することにより、式9を用いて解像度情報の角度を幾何学的に算出することができる。   As shown in FIG. 37, for example, when the calculation positions are 108 in total, for example, the angle θ1 of the resolution information at the calculation position 111 and the angle θ2 at the calculation position 113 are obtained when a concentric circle is drawn about the center 117. The angle can correspond to the radial direction. Therefore, by specifying the coordinates of each calculation point, the angle of the resolution information can be geometrically calculated using Equation 9.

以上の処理により解像度情報の角度が算出される。係数分析部10は、上記のように算出された角度と第1の実施の形態において説明した補間により算出された解像度値と異方性度とを含む解像度情報に基づきPSFを算出し、PSFに基づきフィルタデータを算出する。   The angle of the resolution information is calculated by the above processing. The coefficient analysis unit 10 calculates the PSF based on the resolution information including the angle calculated as described above and the resolution value and the anisotropy calculated by the interpolation described in the first embodiment. Based on this, filter data is calculated.

以上説明したように、第1の実施の形態の変形例によれば、解像度情報を補間により求める際に、算出された解像度情報における楕円の角度と算出位置の位置関係とから角度を補間するのではなく、画像における補間位置の座標から求めることができる。なお、解像度値は補間で求めてもよいし、中心からの距離に応じて求めてもよい。また、中心付近はフィルタの強度“0”(補正を行わない)としてもよい。   As described above, according to the modification of the first embodiment, when the resolution information is obtained by interpolation, the angle is interpolated from the angle of the ellipse in the calculated resolution information and the positional relationship between the calculated positions. Instead, it can be obtained from the coordinates of the interpolation position in the image. Note that the resolution value may be obtained by interpolation or may be obtained according to the distance from the center. In addition, the vicinity of the center may have a filter strength of “0” (no correction is performed).

なお、上記第1の実施の形態及び変形例において、2個の解像度情報に基づき補間を行う例について説明したが、例えば4個など他の数の解像度情報を用いることもできる。また、後述するように、補正用のフィルタの算出を、撮像装置100とは別の、例えば標準的なコンピュータで実行することも可能である。   In the first embodiment and the modification, the example in which interpolation is performed based on two pieces of resolution information has been described. However, for example, other pieces of resolution information such as four pieces may be used. Further, as will be described later, the calculation of the correction filter can be executed by, for example, a standard computer different from the imaging apparatus 100.

(第2の実施の形態)
次に、第2の実施の形態による撮像装置について説明する。本実施の形態において、第1の実施の形態またはその変形例と同様の構成及び動作には同一符号を付し、重複説明を省略する。第2の実施の形態は、例えば、第1の実施の形態またはその変形例により算出されるフィルタにより画像補正を行う場合の実施の形態である。
(Second Embodiment)
Next, an imaging device according to a second embodiment will be described. In the present embodiment, the same reference numerals are given to the same configurations and operations as those in the first embodiment or the modified example thereof, and the duplicate description is omitted. The second embodiment is an embodiment in the case where image correction is performed using a filter calculated by the first embodiment or a modification thereof, for example.

図38は、例えば、第1の実施の形態による撮像装置100を用いて生成されたフィルタを用いて画像を補正する撮像装置200の概略構成の一例を示すブロック図である。図38において、図1の撮像装置100と同様の構成は、同一符号を付し、重複説明を省略する。撮像装置200は、撮像装置100の画像処理部4に代えて画像処理部15を有している。   FIG. 38 is a block diagram illustrating an example of a schematic configuration of an imaging apparatus 200 that corrects an image using, for example, a filter generated using the imaging apparatus 100 according to the first embodiment. In FIG. 38, the same components as those of the imaging device 100 of FIG. The imaging device 200 includes an image processing unit 15 instead of the image processing unit 4 of the imaging device 100.

画像処理部15は、RAWメモリ41、フィルタ制御部43、及びフィルタ処理部45を備えている。フィルタ制御部43は、例えば、撮像装置100で作成されたフィルタテーブル125を保持する。フィルタ制御部43は、フィルタテーブル125を参照して、処理対象画像の位置に対応するフィルタを特定し、そのフィルタをフィルタ処理部45に出力する。つまり、フィルタ制御部43は、処理対象画像の各位置に対応する各フィルタをフィルタ処理部45に出力する。フィルタ処理部45は、フィルタ制御部43から取得したフィルタを用いて、対応する画像位置でフィルタリングを実行する。なお、算出されたフィルタは、例えば、算出位置を含む領域の画像を補正するために用いる。よって、対応する画像位置は、算出位置を含む領域における各画素位置となる。このように、撮像装置200は、例えば、撮像装置100で算出されたそれぞれの算出位置に応じて算出されたフィルタにより、算出位置を含む各領域を補正することにより、全体の画像を復元する。   The image processing unit 15 includes a RAW memory 41, a filter control unit 43, and a filter processing unit 45. For example, the filter control unit 43 holds the filter table 125 created by the imaging device 100. The filter control unit 43 refers to the filter table 125, identifies a filter corresponding to the position of the processing target image, and outputs the filter to the filter processing unit 45. That is, the filter control unit 43 outputs each filter corresponding to each position of the processing target image to the filter processing unit 45. The filter processing unit 45 performs filtering at the corresponding image position using the filter acquired from the filter control unit 43. Note that the calculated filter is used, for example, to correct an image of an area including the calculated position. Therefore, the corresponding image position becomes each pixel position in the area including the calculated position. In this way, the imaging apparatus 200 restores the entire image by correcting each region including the calculated position, for example, with a filter calculated according to each calculated position calculated by the imaging apparatus 100.

上記のような構成により撮像装置200は、第1の実施の形態またはその変形例により生成されたフィルタにより画像を補正して出力することができる。これにより、画像の各位置で異なる解像度の異方性を改善しつつ画質を向上させることができる。よって、撮像装置200によれば、撮影画像において、精度よく異方性のある解像度劣化を補正することができる。   With the configuration described above, the imaging apparatus 200 can correct and output an image using the filter generated according to the first embodiment or a modification thereof. Thereby, it is possible to improve the image quality while improving the anisotropy of different resolutions at each position of the image. Therefore, according to the imaging apparatus 200, it is possible to accurately correct anisotropic resolution degradation in a captured image.

なお、撮像装置100は、例えば撮像装置200の較正を行なう際の機能とすることができる。また、撮像装置200において、例えば、フィルタ制御部43に、第1の実施の形態による係数分析部10及び補間部13の機能を持たせ、フィルタテーブル125を生成するような形態も可能である。   Note that the imaging apparatus 100 can have a function for calibrating the imaging apparatus 200, for example. In the imaging apparatus 200, for example, the filter control unit 43 may have the functions of the coefficient analysis unit 10 and the interpolation unit 13 according to the first embodiment to generate the filter table 125.

(第3の実施の形態)
次に、第3の実施の形態による撮像装置について説明する。本実施の形態において、第1の実施の形態と同様の構成及び動作には同一符号を付し、重複説明を省略する。第3の実施の形態は、第1の実施の形態及びその変形例の係数分析に関する別の形態である。
(Third embodiment)
Next, an imaging apparatus according to a third embodiment will be described. In the present embodiment, the same configurations and operations as those of the first embodiment are denoted by the same reference numerals, and redundant description is omitted. The third embodiment is another embodiment relating to the coefficient analysis of the first embodiment and its modifications.

図39は、第3の実施の形態による係数分析部11の構成の一例を示すブロック図である。第3の実施の形態による撮像装置は、撮像装置100の係数分析部10に代えてこの係数分析部11を備えている。係数分析部11は、解像度算出部101、フィルタメモリ103、フィルタ算出部104を備えている。フィルタ算出部104は、調整部121、画像補正部122、係数決定部123を備えている。   FIG. 39 is a block diagram illustrating an example of the configuration of the coefficient analysis unit 11 according to the third embodiment. The imaging device according to the third embodiment includes this coefficient analysis unit 11 instead of the coefficient analysis unit 10 of the imaging device 100. The coefficient analysis unit 11 includes a resolution calculation unit 101, a filter memory 103, and a filter calculation unit 104. The filter calculation unit 104 includes an adjustment unit 121, an image correction unit 122, and a coefficient determination unit 123.

解像度算出部101は、例えば、放射状の模様を有する被写体(補正用被写体20等)が撮像された画像の解像度劣化を少なくとも2方向で分析する。このとき解像度算出部101は、上述のように解像度情報を算出する。これにより、少なくとも撮像素子2方向の解像度異方性が分析される。フィルタ算出部104は、解像度算出部101で解析された解像度情報に基づき、フィルタデータを算出する。調整部121は、方向に依存しない重み係数εと、方向に依存する重み係数γを調整し、画像補正部122に出力する。画像補正部122は、調整部121で算出されたフィルタデータにより画像を補正する。画像補正部122は、補正後の画像を解像度算出部101に出力し、解像度算出部101では、補正後の画像について上述の処理を行う。   For example, the resolution calculation unit 101 analyzes at least two directions of resolution degradation of an image in which a subject having a radial pattern (such as the correction subject 20) is captured. At this time, the resolution calculation unit 101 calculates the resolution information as described above. Thereby, at least the resolution anisotropy in the imaging element 2 direction is analyzed. The filter calculation unit 104 calculates filter data based on the resolution information analyzed by the resolution calculation unit 101. The adjustment unit 121 adjusts the weighting coefficient ε that does not depend on the direction and the weighting coefficient γ that depends on the direction, and outputs the result to the image correction unit 122. The image correction unit 122 corrects the image with the filter data calculated by the adjustment unit 121. The image correction unit 122 outputs the corrected image to the resolution calculation unit 101, and the resolution calculation unit 101 performs the above-described processing on the corrected image.

係数決定部123は、補正後の画像に対する解像度分析結果に基づいて、2つの方向の解像度劣化の差が小さくなるように重み係数を決定する。係数決定部123は、様々な重み係数により補正された画像の分析結果を保持し、例えば、所定の振幅強度において、空間周波数の値の差分が最小となるように、重み係数ε、γを決定する。   The coefficient determining unit 123 determines the weighting coefficient based on the resolution analysis result for the corrected image so that the difference in resolution degradation between the two directions becomes small. The coefficient determination unit 123 holds the analysis result of the image corrected by various weighting coefficients, and determines the weighting coefficients ε and γ so that the difference in the spatial frequency value is minimized at a predetermined amplitude intensity, for example. To do.

以下、係数分析部11で算出されるフィルタについて説明する。フィルタ算出部104では、解像度の異方性を改善するフィルタを算出する。以下、解像度の異方性を改善する、例えば、解像度の悪い方向の調整を行うフィルタの算出手順について説明する。   Hereinafter, the filter calculated by the coefficient analysis unit 11 will be described. The filter calculation unit 104 calculates a filter that improves resolution anisotropy. Hereinafter, a calculation procedure of a filter that improves the anisotropy of the resolution, for example, performs adjustment in a direction with a poor resolution will be described.

式1で示したように、元画像xとPSF:k、ボケ画像yを考える。この元画像xを求めるときに、逆問題として式10が最小となれば、元画像に近い画像が得られる。
通常は、逆問題を解くときに何らかの正則化項が施される。よって、正則化項を加算し、式11から逆問題を解く。
Consider the original image x, PSF: k, and blurred image y as shown in Equation 1. When obtaining the original image x, if Equation 10 is minimized as an inverse problem, an image close to the original image is obtained.
Usually, some regularization term is applied when solving the inverse problem. Therefore, the regularization term is added and the inverse problem is solved from Equation 11.

今回の問題では、方向性を必要とするから、画像の横(水平)方向(x方向)および縦(垂直)方向(y方向)の微分項を正則化項として追加する。
ε:重み係数
dm,dn:行列方向の微分フィルタ
Since the problem this time requires directionality, differential terms in the horizontal (horizontal) direction (x direction) and vertical (vertical) direction (y direction) of the image are added as regularization terms.
ε: weighting coefficient dm, dn: differential filter in matrix direction

式12が最小となるには、式12をxで偏微分した結果を“0”とすればよく、フーリエ変換して、X(ω)について解くと以下の式13が得られる。
X(ω)=K(ω)Y(ω)/(K(ω)+ε{Dm(ω)+Dn(ω)})
・・・(式13)
X(ω)、Y(ω)、K(ω)、Dm(ω)、Dn(ω)は、それぞれx、y、k、dm、dnのフーリエ変換を表す。
In order to minimize Expression 12, the result of partial differentiation of Expression 12 by x may be set to “0”. When Fourier transform is performed and X (ω) is solved, the following Expression 13 is obtained.
X (ω) = K (ω) Y (ω) / (K (ω) 2 + ε {Dm (ω) 2 + Dn (ω) 2 })
... (Formula 13)
X (ω), Y (ω), K (ω), Dm (ω), and Dn (ω) represent Fourier transforms of x, y, k, dm, and dn, respectively.

周波数領域でのフィルタKinv(ω)は、式14を満たす。
X(ω)=Kinv(ω)Y(ω)・・・(式14)
The filter Kinv (ω) in the frequency domain satisfies Expression 14.
X (ω) = Kinv (ω) Y (ω) (Equation 14)

よって、フィルタKinv(ω)は、次の式15を満たす。
Kinv(ω)=K(ω)/(K(ω)+ε{Dm(ω)+Dn(ω)})
・・・(式15)
式15は、共役複素数を用いると式16となる。
Therefore, the filter Kinv (ω) satisfies the following Expression 15.
Kinv (ω) = K (ω) / (K (ω) 2 + ε {Dm (ω) 2 + Dn (ω) 2 })
... (Formula 15)
Expression 15 becomes Expression 16 when a conjugate complex number is used.

本実施の形態においては、解像度の悪い方向を調整するため、回転行列を用いて角度θ方向に微分係数の軸を回転させる。
Dx(ω、θ)=Dm(ω)cosθ―Dn(ω)sinθ・・・(式17)
Dy(ω、θ)=Dm(ω)sinθ―Dn(ω)cosθ・・・(式18)
上記のように、回転行列を用いることで、方向性を持たせることができる。式17、式18によれば、Dn方向はθ回転されてDy方向となり、Dm方向は、θ回転されてDx方向となる。
In the present embodiment, in order to adjust the direction with poor resolution, the axis of the differential coefficient is rotated in the direction of the angle θ using the rotation matrix.
Dx (ω, θ) = Dm (ω) cos θ−Dn (ω) sin θ (Expression 17)
Dy (ω, θ) = Dm (ω) sinθ−Dn (ω) cosθ (Expression 18)
As described above, using a rotation matrix can provide directionality. According to Equations 17 and 18, the Dn direction is rotated by θ to become the Dy direction, and the Dm direction is rotated by θ and becomes the Dx direction.

ここで、楕円PSFをk(r,θ)、フーリエ変換後の楕円PSFをK(ω,θ)=fk(r,θ)とする。式16に、式17、式18及びK(ω,θ)を代入するとともに、方向による重みγを設定すると、式19が成り立つ。
γ:フィルタの方向による重み係数
ε:全体の重み係数
Here, it is assumed that the ellipse PSF is k (r, θ) and the ellipse PSF after Fourier transform is K (ω, θ) = fk (r, θ). When Expression 17, Expression 18, and K (ω, θ) are substituted into Expression 16, and the weight γ according to the direction is set, Expression 19 is established.
γ: weighting factor according to filter direction ε: overall weighting factor

この式19により、各実施例で用いるフィルタの方向性の重み調整を施すことが可能となる。例えば、係数分析部11は、解像度の悪い方向(Dy方向)の重み係数γを調整する。例えば、重み係数γを小さくすることで、解像度の悪い半径方向の解像度を改善することができる。このように、解像度の異方性を、重み係数の調整により改善することができる。   This equation 19 makes it possible to adjust the weight of the directionality of the filter used in each embodiment. For example, the coefficient analysis unit 11 adjusts the weighting coefficient γ in the direction with the poor resolution (Dy direction). For example, by reducing the weighting factor γ, it is possible to improve the radial resolution with poor resolution. In this way, the resolution anisotropy can be improved by adjusting the weighting factor.

以下、係数決定部123による処理についてさらに説明する。図40、図41は、重み係数の決定処理の一例を説明する図である。図40、図41において、横軸は解像度、縦軸は振幅強度を示す。図40に示すように、係数決定部123は、所定振幅強度(閾値1)において、空間周波数の差が小さくなるよう重み係数を決定する(決定処理1)。係数決定部123は、図41に示すように、所定の空間周波数において、振幅強度の差が最小となるように、重み係数εとγを決定してもよい(決定処理2)。   Hereinafter, the process by the coefficient determination unit 123 will be further described. 40 and 41 are diagrams for explaining an example of a weighting factor determination process. 40 and 41, the horizontal axis represents resolution and the vertical axis represents amplitude intensity. As shown in FIG. 40, the coefficient determination unit 123 determines a weighting coefficient so that the difference in spatial frequency becomes small at a predetermined amplitude intensity (threshold 1) (determination process 1). As shown in FIG. 41, the coefficient determining unit 123 may determine the weighting coefficients ε and γ so that the difference in amplitude intensity is minimized at a predetermined spatial frequency (decision process 2).

なお、閾値1、閾値2は、複数設定してもよく、係数決定部123は、各閾値での差分の二乗和が最小となるように重み係数を決定してもよい。なお、係数決定部123は、所定の差分が予め設定された閾値以下となるように重み係数を決定してもよい。この閾値は、事前の実験等により設定されればよい。   Note that a plurality of threshold values 1 and 2 may be set, and the coefficient determination unit 123 may determine the weighting coefficient so that the sum of squares of the differences at each threshold value is minimized. The coefficient determining unit 123 may determine the weighting coefficient so that the predetermined difference is equal to or less than a preset threshold value. This threshold may be set by a prior experiment or the like.

また、係数決定部123は、画像中心部での2方向の解像度の差分二乗和と、画像中心部とは異なる画像周辺部での2方向の解像度の差分二乗和との差が所定値以下となるように重み係数を決定してもよい。また、係数決定部123は、画像中心部と画像周辺部との解像度の差分二乗和が最小となるように重み係数を決定してもよい。これにより、解像度の異方性を低減する際、画像中央部の解像度と画像周辺部の解像度を同様にすることで、画像全体の解像度が同様になり、画質の向上が図れる。係数決定部123による最小化の判断は、最小化関数を用いて算出してもよい。最小化関数としては、例えば、シンプレックスサーチ法や、最急降下法、共役勾配法などがある。   Also, the coefficient determination unit 123 determines that the difference between the difference square sum of the two-direction resolution at the center of the image and the difference square sum of the two-direction resolution at the peripheral portion of the image different from the image central portion You may determine a weighting coefficient so that it may become. The coefficient determination unit 123 may determine the weighting coefficient so that the sum of squares of the difference between the image center and the image periphery is minimized. As a result, when the resolution anisotropy is reduced, the resolution of the central portion of the image and the resolution of the peripheral portion of the image are made the same, so that the resolution of the entire image becomes the same, and the image quality can be improved. The determination of minimization by the coefficient determination unit 123 may be calculated using a minimization function. Examples of the minimizing function include a simplex search method, a steepest descent method, and a conjugate gradient method.

上記のように、フィルタ算出部104は、重み係数を変更して調整し、調整後の重み係数で逆フィルタを求め、求めた逆フィルタで画像を補正し、補正後の画像の解像度分析結果に基づいて、最適な重み係数を決定する。最適な重み係数が決定されるまで、重み係数の調整、逆フィルタの算出、フィルタリングによる補正、解像度分析の処理が繰り返される。   As described above, the filter calculation unit 104 changes and adjusts the weighting factor, obtains an inverse filter with the adjusted weighting factor, corrects the image with the obtained inverse filter, and obtains a resolution analysis result of the corrected image. Based on this, an optimum weighting factor is determined. The adjustment of the weighting factor, calculation of the inverse filter, correction by filtering, and resolution analysis are repeated until the optimum weighting factor is determined.

図42、図43は、第3の実施の形態による画像補正後の解像度の分析結果を示す図である。図42、図43において、横軸は解像度、縦軸は振幅強度を示している。図42に示す例では、γ=1/300である。図42に示すように、Dx、Dy方向共に解像度が改善し、さらに、各方向の差が小さくなっている。よって、解像度の異方性を改善することができている。   42 and 43 are diagrams showing the analysis results of the resolution after image correction according to the third embodiment. 42 and 43, the horizontal axis represents resolution, and the vertical axis represents amplitude intensity. In the example shown in FIG. 42, γ = 1/300. As shown in FIG. 42, the resolution is improved in both the Dx and Dy directions, and the difference between the directions is small. Therefore, the resolution anisotropy can be improved.

図43は、γ=1とした場合の画像補正後の解像度の分析結果を示している。図43に示す分析結果は、重み係数により解像度の異方性を補正していないフィルタを用いた場合の結果である。図43に示すように、各方向で解像度は改善しているが、その差が大きくなっており、解像度の異方性は、図42の例ほど改善されていない。   FIG. 43 shows the analysis result of resolution after image correction when γ = 1. The analysis result shown in FIG. 43 is a result in the case of using a filter in which the resolution anisotropy is not corrected by the weighting coefficient. As shown in FIG. 43, the resolution is improved in each direction, but the difference is large, and the anisotropy of the resolution is not improved as much as the example of FIG.

以下、第3の実施の形態による撮像装置の動作について、フローチャートを参照しながら説明する。第3の実施の形態による撮像装置の全体的な動作は、図33を参照しながら説明した動作と同様である。   Hereinafter, an operation of the imaging apparatus according to the third embodiment will be described with reference to a flowchart. The overall operation of the imaging apparatus according to the third embodiment is the same as the operation described with reference to FIG.

図44、図45は、第3の実施の形態によるフィルタ算出の処理を示すフローチャートである。以下の処理は、図39に示した各機能が行うこととして説明する。なお、フィルタ算出処理は、図1のS135の処理に相当する。   44 and 45 are flowcharts showing filter calculation processing according to the third embodiment. The following processing is described as being performed by each function shown in FIG. The filter calculation process corresponds to the process of S135 in FIG.

図44に示すように、フィルタ算出部104は、まず、重み係数ε、γの初期値を設定する(S151)。調整部121、画像補正部122は、フィルタデータの最適化を行う(S152)。係数決定部123は、フィルタデータを決定する(S153)。なお、決定されたフィルタデータは、フィルタメモリ103に記憶されることが好ましい。この処理は、上述のように、最適な重み係数が決定されるまで繰り返されることが好ましい。   As shown in FIG. 44, the filter calculation unit 104 first sets initial values of the weighting coefficients ε and γ (S151). The adjustment unit 121 and the image correction unit 122 optimize the filter data (S152). The coefficient determination unit 123 determines filter data (S153). The determined filter data is preferably stored in the filter memory 103. This process is preferably repeated until the optimum weighting factor is determined as described above.

図45に示すように、画像補正部122は、まず算出されたフィルタを調整部121から取得する(S161)。画像補正部122は、取得したフィルタにより画像を補正する(S162)。解像度算出部101は、補正された画像において、解像度情報を算出する(S163)。調整部121は、算出された解像度を、閾値と比較する(S164)。調整部121は、解像度が収束しているか否か判断する(S165)。   As shown in FIG. 45, the image correction unit 122 first acquires the calculated filter from the adjustment unit 121 (S161). The image correction unit 122 corrects the image with the acquired filter (S162). The resolution calculation unit 101 calculates resolution information in the corrected image (S163). The adjustment unit 121 compares the calculated resolution with a threshold value (S164). The adjustment unit 121 determines whether the resolution has converged (S165).

解像度が収束していると判断される場合には(S165:YES)、図44のS152に戻って処理を進める。収束していると判断されない場合には(S165:NO)、S161に戻って処理を繰り返す。なお、上記の処理は、1つの算出位置に関するフィルタ算出を説明したものであり、上記処理を全ての算出位置について繰り返すことにより、画像全体の複数のフィルタが算出される。   If it is determined that the resolution has converged (S165: YES), the process returns to S152 in FIG. If it is not determined that the image has converged (S165: NO), the process returns to S161 and is repeated. Note that the above processing describes filter calculation for one calculation position, and a plurality of filters for the entire image are calculated by repeating the above processing for all calculation positions.

第3の実施の形態においては、上記のようにしてフィルタが算出されるが、解像度算出部101による解像度情報の算出は、第1の実施の形態及び変形例と同様に、解像度情報を補間する方法により行われる。角度の算出方法については、第1の実施の形態または変形例のいずれの方法も適用が可能である。   In the third embodiment, the filter is calculated as described above, but the resolution information is calculated by the resolution calculation unit 101 by interpolating the resolution information as in the first embodiment and the modification. By the method. As the angle calculation method, any method of the first embodiment or the modification can be applied.

第3の実施の形態においては、フィルタ算出の際、それぞれの位置での角度以外の情報、例えば、解像度値、異方性度、重み係数等は、解像度情報を補間することで算出する。補間により差出された各値は、例えば幾何学的に算出された角度とともに、それぞれの位置でのフィルタ算出に用いられる。算出された全ての算出位置でのフィルタにより、画像の補正を行う。   In the third embodiment, when calculating the filter, information other than the angle at each position, for example, the resolution value, the degree of anisotropy, the weighting coefficient, and the like are calculated by interpolating the resolution information. Each value obtained by interpolation is used for filter calculation at each position together with, for example, a geometrically calculated angle. The image is corrected using filters at all the calculated positions.

以上説明したように、第3の実施の形態によれば、第1の実施の形態による画像処理による効果に加え、フィルタ算出のための重み係数を導入することにより、解像度の異方性をより改善することが可能となる。   As described above, according to the third embodiment, in addition to the effect of the image processing according to the first embodiment, by introducing a weighting factor for filter calculation, the resolution anisotropy is further improved. It becomes possible to improve.

(第4の実施の形態)
次に、第4の実施の形態による撮像装置について説明する。本実施の形態において、第1の実施の形態から第3の実施の形態と同様の構成及び動作には同一符号を付し、重複説明を省略する。第4の実施の形態は、第1から第3の実施の形態及び変形例の解像度情報算出に関する別の形態である。
(Fourth embodiment)
Next, an imaging apparatus according to a fourth embodiment will be described. In the present embodiment, the same reference numerals are given to the same configurations and operations as those in the first to third embodiments, and the duplicate description will be omitted. The fourth embodiment is another form relating to resolution information calculation of the first to third embodiments and the modification.

第1から第3の実施の形態及び変形例の解像度情報算出においては、画像の中心と、解像度の異方性が最も少ない点とが一致している例について説明した。本実施の形態は、ボケの状態が画像の中心に対して非対称の場合の例である。   In the resolution information calculation of the first to third embodiments and the modified examples, the example in which the center of the image coincides with the point having the smallest resolution anisotropy has been described. The present embodiment is an example in the case where the blur state is asymmetric with respect to the center of the image.

図46は、ボケが画像の中心に対して非対称の場合を示す図である。図46に示すように、画像170では、解像度情報を示す図形173、174、177、179は、画像の中心の図形175に対して対称ではない。ここでは、最もボケが小さい、ボケの中心座標となる点は、点172となっている。また、図46の左側の図形174、177の方が、右側の図形173、179よりも大きい。これは、画像170では、図の左側のほうがボケが大きいことを示している。このように、ボケの度合いが左右非対称な場合には、解像度情報における解像度値の逆比で中心を設定することもできる。   FIG. 46 is a diagram illustrating a case where the blur is asymmetric with respect to the center of the image. As shown in FIG. 46, in the image 170, the graphics 173, 174, 177, and 179 indicating the resolution information are not symmetric with respect to the graphic 175 at the center of the image. Here, the point with the smallest blur and the center coordinate of the blur is a point 172. Also, the left graphics 174 and 177 in FIG. 46 are larger than the right graphics 173 and 179. This indicates that the image 170 is more blurred on the left side of the figure. As described above, when the degree of blur is asymmetrical, the center can be set by the inverse ratio of the resolution value in the resolution information.

図47は、ボケが非対称な場合の角度算出方法の一例を示す図である。図47に示すように、ボケの中心座標が点172の場合、点172から解像度情報の算出位置に向かう方向を、解像度の悪い半径方向とする。図47の例では、点172と点181とを結ぶ方向が、点181で解像度が悪い方向となる。同様に、点172と点183とを結ぶ方向が、点183で解像度が悪い方向となる。これら解像度の悪い方向に基づき、解像度情報の角度θ1、θ2を算出する。   FIG. 47 is a diagram illustrating an example of an angle calculation method when the blur is asymmetric. As shown in FIG. 47, when the center coordinate of the blur is a point 172, the direction from the point 172 toward the calculation position of the resolution information is a radial direction with a poor resolution. In the example of FIG. 47, the direction connecting the point 172 and the point 181 is the direction where the resolution is bad at the point 181. Similarly, the direction connecting the point 172 and the point 183 is the direction where the resolution is poor at the point 183. Based on these bad resolution directions, the angles θ1 and θ2 of the resolution information are calculated.

図48は、本実施の形態による解像度情報の算出方法の効果を示す図である。図48において、フィルタ算出例191は、補正用被写体20を撮影した画像に基づき算出されたフィルタである。フィルタ算出例193は、フィルタ算出例191に基づき、本実施の形態による解像度情報算出方法を用いて算出したフィルタである。   FIG. 48 is a diagram showing the effect of the resolution information calculation method according to the present embodiment. In FIG. 48, a filter calculation example 191 is a filter calculated based on an image obtained by photographing the correction subject 20. The filter calculation example 193 is a filter calculated based on the filter calculation example 191 using the resolution information calculation method according to the present embodiment.

フィルタ算出例193のように、中心座標をずらして解像度情報の角度を算出することで、全体的に図の左側が強い強度のフィルタが算出される。なお、この場合、解像度情報の異方性度、解像度値は、補間により求めてもよいし、中心からの距離に応じて求めてもよい。   By calculating the angle of the resolution information by shifting the center coordinates as in the filter calculation example 193, a filter having a strong intensity on the left side of the figure as a whole is calculated. In this case, the anisotropy degree and the resolution value of the resolution information may be obtained by interpolation or may be obtained according to the distance from the center.

以上説明したように、ボケの度合いが非対称な撮像装置の場合にも、ボケの中心を解像度情報の角度を求める際の中心座標としてフィルタ算出をすることで、精度よく画像を補正することが可能となる。このとき、解像度情報の楕円の大きさの逆比で、中心座標を算出して設定するようにしてもよい。このように、中心座標をずらして角度を算出することにより、ボケの度合いが大きい側が強い強度のフィルタを算出できる。   As described above, even in the case of an imaging device with an asymmetric degree of blur, it is possible to correct an image with high accuracy by performing filter calculation using the blur center as the center coordinate when determining the angle of resolution information. It becomes. At this time, the center coordinates may be calculated and set by the inverse ratio of the size of the ellipse of the resolution information. In this way, by calculating the angle by shifting the center coordinates, it is possible to calculate a filter having a stronger intensity on the side where the degree of blurring is larger.

さらに、レンズの製造誤差、撮影条件によって、実際に得られる周縁部の劣化の対称性がレンズデータから得られる結果とは異なり、レンズデータに基づく周縁部劣化の中心が撮影画像中心とは異なる場合でも、精度よく補正を行うことが可能である。   Furthermore, depending on the manufacturing error of the lens and the shooting conditions, the peripheral edge degradation symmetry that is actually obtained is different from the result obtained from the lens data, and the center of the peripheral edge deterioration based on the lens data is different from the center of the captured image. However, it is possible to correct with high accuracy.

(第5の実施の形態)
次に、第5の実施の形態による撮像装置について説明する。本実施の形態において、第1から第4の実施の形態と同様の構成及び動作には同一符号を付し、重複説明を省略する。第5の実施の形態は、第1から第4実施の形態及び変形例の画像処理部15の構成の別の形態である。
(Fifth embodiment)
Next, an imaging apparatus according to a fifth embodiment will be described. In the present embodiment, the same configurations and operations as those in the first to fourth embodiments are denoted by the same reference numerals, and redundant description is omitted. The fifth embodiment is another form of the configuration of the image processing unit 15 of the first to fourth embodiments and the modified example.

第1から第4の実施の形態による画像処理装置において算出されるフィルタを実装する場合、メモリ及び計算量の観点から所定の要素数以下のフィルタを用いたいという要求がある。現状では、例えば5×5以下のフィルタを用いることが考えられている。しかしながら、フィルタの要素数を小さくすると、ボケを表すPSFの大きさが要素数よりも大きくなり、情報量が欠落して、画質が劣化する場合がある。   When a filter calculated in the image processing apparatus according to the first to fourth embodiments is mounted, there is a demand to use a filter having a predetermined number of elements or less from the viewpoint of memory and calculation amount. At present, it is considered to use a filter of 5 × 5 or less, for example. However, if the number of elements of the filter is reduced, the size of the PSF representing blur is larger than the number of elements, the amount of information is lost, and the image quality may deteriorate.

図49は、画像のボケを表すPSFと、要素数が5×5のフィルタ215との大きさの関係の一例を示す図である。図49に示すように、5×5のフィルタ215の大きさよりもPSFが大きいとする。なお、フィルタ1つの要素は、画像の1画素に相当している。図49に示す例では、PSFの大きさよりもフィルタ215の要素数の方が小さい。このため、このようなフィルタ215により画像補正をすると、PSFの情報が欠落するため、モアレの発生など、画像補正の品質低下の問題が生ずる。以下、このように要素数が小さい場合にも情報の欠落による画像補正の品質を低下させない方法について説明する。   FIG. 49 is a diagram illustrating an example of the relationship between the size of the PSF representing the blur of the image and the filter 215 having the number of elements of 5 × 5. As shown in FIG. 49, it is assumed that the PSF is larger than the size of the 5 × 5 filter 215. One element of the filter corresponds to one pixel of the image. In the example shown in FIG. 49, the number of elements of the filter 215 is smaller than the size of the PSF. For this reason, when image correction is performed using such a filter 215, PSF information is lost, and thus there is a problem of degradation in image correction quality such as generation of moire. Hereinafter, a method for preventing the quality of image correction from being deteriorated due to missing information even when the number of elements is small will be described.

下記の式20は、元画像yに対し、算出されたフィルタFを畳み込んで、元画像との差分処理が行われて補正画像xが生成される場合を示している。
Equation 20 below shows a case where the corrected image x is generated by convolving the calculated filter F with the original image y and performing a difference process with the original image.

別の例として、下記式21〜24は、元画像yに対し、算出されたフィルタF'を畳み込むことで、補正画像xが生成されることを示している。
As another example, the following formulas 21 to 24 indicate that the corrected image x is generated by convolving the calculated filter F ′ with the original image y.

まず、モアレの発生を防ぐ概要について説明する。上述したように、解像度に異方性を有するフィルタを有限化することにより、高周波情報の消失が方向によって異なるため、モアレが発生する。つまり、方向によって周波数の劣化の補正度合いが異なるため、モアレが発生する。   First, an outline for preventing the occurrence of moire will be described. As described above, since the loss of high-frequency information differs depending on the direction by making the filter having anisotropy in resolution, moiré occurs. That is, moire occurs because the degree of correction of frequency degradation differs depending on the direction.

そこで、有限のハイパスフィルタを通すことで、急激に輝度が変化する部分を低減し、方向によって異なる高周波情報の補正度合いの違いを低減する。これにより、方向によって異なる周波数情報の劣化を原因とするモアレの発生を防ぐことができる。   Therefore, by passing through a finite high-pass filter, the portion where the luminance changes abruptly is reduced, and the difference in the correction degree of the high-frequency information that differs depending on the direction is reduced. As a result, it is possible to prevent the occurrence of moire caused by deterioration of frequency information that varies depending on the direction.

なお、有限のハイパスフィルタは、要素の総和が0であり、かつ少なくとも2つの要素が非0である有限フィルタであればよい。以下では、有限フィルタとして、有限のハイパスフィルタを用いて説明する。また、算出されたフィルタを分割し、所定の要素数以下となる複数段のフィルタを生成することで、実装上の課題もクリアできる。   The finite high-pass filter may be a finite filter in which the sum of elements is 0 and at least two elements are non-zero. Hereinafter, a finite high-pass filter will be used as the finite filter. In addition, by dividing the calculated filter and generating a plurality of stages of filters having a predetermined number of elements or less, it is possible to clear mounting problems.

図51、図52は、複数段のフィルタの構成例を示す図である。図51に示すように、画像処理部210は、式20と対応している。画像処理部210は、元画像213をフィルタセット211により補正して、補正画像219を出力する。フィルタセット211は、式20のフィルタFを、複数段のフィルタ(5×5)215、217に分割した構成である。   51 and 52 are diagrams illustrating a configuration example of a plurality of stages of filters. As shown in FIG. 51, the image processing unit 210 corresponds to Expression 20. The image processing unit 210 corrects the original image 213 with the filter set 211 and outputs a corrected image 219. The filter set 211 is configured by dividing the filter F of Expression 20 into a plurality of stages of filters (5 × 5) 215 and 217.

図52に示すように、画像処理部220は、式21〜24と対応している。画像処理部220は、元画像213をフィルタセット211により補正して、補正画像227を出力する。フィルタセット221は、式24のフィルタF’を、複数段のフィルタ(5×5)223、225に分割した構成である。第5の実施の形態においては、フィルタの要素数よりも大きいPSFに対し、異方性のあるフィルタを複数で構成し、複数のフィルタを組み合わせることで異方性を改善する。   As illustrated in FIG. 52, the image processing unit 220 corresponds to Expressions 21 to 24. The image processing unit 220 corrects the original image 213 with the filter set 211 and outputs a corrected image 227. The filter set 221 is configured by dividing the filter F ′ of Expression 24 into a plurality of stages of filters (5 × 5) 223 and 225. In the fifth embodiment, anisotropy is improved by configuring a plurality of anisotropic filters for a PSF larger than the number of filter elements and combining the plurality of filters.

次に、本実施の形態による画像処理装置を含む撮像装置について説明する。ここでは、図52、図53を参照しながら、フィルタ制御部250、280、フィルタ処理部270、290について説明する。   Next, an imaging apparatus including the image processing apparatus according to this embodiment will be described. Here, the filter control units 250 and 280 and the filter processing units 270 and 290 will be described with reference to FIGS. 52 and 53.

図52は、フィルタ制御部250及びフィルタ処理部270の構成の一例を示すブロック図である。フィルタ制御部250、フィルタ処理部270は、図50の画像処理部220に対応する構成である。フィルタ制御部250は、フィルタ記憶部251、フィルタ取得部252、フィルタ算出部253、及びフィルタ生成部254を有する。   FIG. 52 is a block diagram illustrating an example of the configuration of the filter control unit 250 and the filter processing unit 270. The filter control unit 250 and the filter processing unit 270 have configurations corresponding to the image processing unit 220 in FIG. The filter control unit 250 includes a filter storage unit 251, a filter acquisition unit 252, a filter calculation unit 253, and a filter generation unit 254.

フィルタ記憶部251は、第1フィルタ261と、第2フィルタ262と、複数段フィルタ263とを少なくとも記憶する。各フィルタは、それぞれ異なる記憶領域に記憶されればよい。   The filter storage unit 251 stores at least the first filter 261, the second filter 262, and the multistage filter 263. Each filter may be stored in a different storage area.

第1フィルタ261は、例えば、異方性のある解像度情報に基づき算出された異方性を有するフィルタである。第1フィルタ261は、例えば、図30に示したフィルタテーブル125の各フィルタである。フィルタテーブル125のフィルタには、上述したように、補正用被写体20に基づき生成されたフィルタから補間により生成されたフィルタも含むことが好ましい。   The first filter 261 is, for example, a filter having anisotropy calculated based on anisotropic resolution information. The first filter 261 is, for example, each filter of the filter table 125 illustrated in FIG. As described above, the filter of the filter table 125 preferably includes a filter generated by interpolation from a filter generated based on the correction subject 20.

第2フィルタ262は、フィルタ算出部253により算出されるフィルタである。第2フィルタは、例えば、第1フィルタ261にハイパスフィルタが畳み込まれたフィルタである。ハイパスフィルタについては後述する。複数段フィルタ263は、フィルタ生成部254により生成されるフィルタ群である。   The second filter 262 is a filter calculated by the filter calculation unit 253. For example, the second filter is a filter in which a high-pass filter is convoluted with the first filter 261. The high pass filter will be described later. The multistage filter 263 is a filter group generated by the filter generation unit 254.

フィルタ取得部252は、異方性のある解像度情報に基づき算出された、異方性を有する有限のフィルタを取得する。フィルタ取得部252は、例えば、フィルタ記憶部251から第1フィルタ211を取得する。フィルタ取得部252は、取得した第1フィルタ261をフィルタ算出部253に出力する。   The filter acquisition unit 252 acquires a finite filter having anisotropy calculated based on anisotropic resolution information. For example, the filter acquisition unit 252 acquires the first filter 211 from the filter storage unit 251. The filter acquisition unit 252 outputs the acquired first filter 261 to the filter calculation unit 253.

フィルタ算出部253は、フィルタ取得部252から取得した第1フィルタ261に対し、要素の総和が0であり、かつ少なくとも2つの要素が非0である有限フィルタを畳み込むことで第2フィルタを算出する。   The filter calculation unit 253 calculates the second filter by convolving a first filter 261 acquired from the filter acquisition unit 252 with a finite filter in which the sum of elements is 0 and at least two elements are non-zero. .

このとき、フィルタ算出部253は、ボケの大きさ(PSFの楕円の大きさ)よりも大きい要素数を有する第2フィルタを算出する。フィルタ算出部253は、判定部265を有し、判定部265は、例えばフィルタ記憶部251に記憶されたPSF(または解像度情報の楕円)の大きさからボケの大きさを判定する。なお、レンズ設計値からシミュレーションでPSFを取得できる場合は、取得したPSFからボケの大きさを判定してもよい。フィルタ算出部253は、例えば、画像のPSFよりも大きい要素数を有する第1フィルタに有限のハイパスフィルタを畳み込んで第2フィルタを算出する。   At this time, the filter calculation unit 253 calculates the second filter having a larger number of elements than the size of the blur (the size of the PSF ellipse). The filter calculation unit 253 includes a determination unit 265, and the determination unit 265 determines the size of the blur from the size of the PSF (or ellipse of resolution information) stored in the filter storage unit 251, for example. Note that when the PSF can be acquired by simulation from the lens design value, the size of the blur may be determined from the acquired PSF. For example, the filter calculation unit 253 calculates the second filter by convolving a finite high-pass filter with the first filter having a larger number of elements than the PSF of the image.

なお、フィルタ算出部253は、有限のハイパスフィルタを予め保持していることが好ましい。有限なハイパスフィルタは、例えば3×3のフィルタとすると、次の式25又は式26を用いればよい。
The filter calculation unit 253 preferably holds a finite high-pass filter in advance. If the finite high-pass filter is, for example, a 3 × 3 filter, the following Expression 25 or Expression 26 may be used.

本実施の形態で扱う異方性は、任意の方向の角度に応じたフィルタであるため、式(26)に示すように、全ての要素に非0の係数がある方が好ましい。   Since the anisotropy handled in the present embodiment is a filter according to an angle in an arbitrary direction, it is preferable that all elements have non-zero coefficients as shown in Expression (26).

フィルタ算出部253は、ハイパスフィルタを3×3とすると、フィルタKinvを7×7とすることで、その二つのフィルタを畳み込みして9×9のフィルタを算出する。このように、フィルタ算出部253は、ハイパスフィルタとフィルタを畳み込みして、所望の要素数になるように算出する。   If the high-pass filter is 3 × 3, the filter calculation unit 253 calculates a 9 × 9 filter by convolving the two filters by setting the filter Kinv to 7 × 7. As described above, the filter calculation unit 253 convolves the high-pass filter and the filter, and calculates the desired number of elements.

ここで、7×7のフィルタをF7と表記し、ハイパスフィルタをLapと表記すると、フィルタ算出部253で算出された9×9のフィルタF9は、以下の式27で表される。
Here, if the 7 × 7 filter is expressed as F7 and the high-pass filter is expressed as Lap, the 9 × 9 filter F9 calculated by the filter calculation unit 253 is expressed by Expression 27 below.

フィルタ算出部253は、上述した式27により算出した第2フィルタF9をフィルタ記憶部251に記憶する。なお、フィルタ算出部253は、別の装置に設けられ、フィルタ制御部250では、別の装置で求められた第2フィルタ262を記憶するようにしてもよい。   The filter calculation unit 253 stores the second filter F9 calculated by Expression 27 described above in the filter storage unit 251. The filter calculation unit 253 may be provided in another device, and the filter control unit 250 may store the second filter 262 obtained by another device.

フィルタ生成部254は、フィルタ記憶部251から第2フィルタ262を取得し、この第2フィルタ262から、所定の要素数以下となる複数段のフィルタを生成する。複数段のフィルタの生成については後述する。フィルタ生成部254は、生成した複数段フィルタ263をフィルタ記憶部251に記憶する。   The filter generation unit 254 acquires the second filter 262 from the filter storage unit 251, and generates a plurality of stages of filters having a predetermined number of elements or less from the second filter 262. The generation of the multi-stage filter will be described later. The filter generation unit 254 stores the generated multistage filter 263 in the filter storage unit 251.

次に、フィルタ処理部270について説明する。フィルタ処理部270は、畳み込み演算部271と、減算部272とを有する。畳み込み演算部271は、例えば図38に示したRAWメモリ41から画像を取得し、その画像に対して複数段フィルタ263で畳み込むフィルタ処理を行う。   Next, the filter processing unit 270 will be described. The filter processing unit 270 includes a convolution operation unit 271 and a subtraction unit 272. For example, the convolution operation unit 271 acquires an image from the RAW memory 41 illustrated in FIG. 38 and performs a filter process for convolving the image with the multistage filter 263.

畳み込み演算部271は、複数段フィルタ263が、1つの畳み込み回路に対して複数回処理を行うことでフィルタ処理を行ってもよいし、複数の畳み込み回路を用意してフィルタ処理を行ってもよい。畳み込み演算部271は、フィルタ処理後の画像を減算部272に出力する。   In the convolution operation unit 271, the multistage filter 263 may perform the filter processing by performing a plurality of times of processing on one convolution circuit, or may perform the filter processing by preparing a plurality of convolution circuits. . The convolution operation unit 271 outputs the filtered image to the subtraction unit 272.

減算部272は、RAWメモリ41から取得した画像から、フィルタ処理後の画像を減算し、補正後の画像を生成する。補正画像は、後処理部5や画像メモリ8に出力される。   The subtraction unit 272 subtracts the filtered image from the image acquired from the RAW memory 41 to generate a corrected image. The corrected image is output to the post-processing unit 5 and the image memory 8.

次に、式21〜式24に対応するフィルタ制御部280、フィルタ処理部290について説明する。図53は、第5の実施の形態におけるフィルタ制御部280及びフィルタ処理部290の概略構成の一例を示すブロック図である。まず、フィルタ制御部280について説明する。フィルタ制御部280は、フィルタ記憶部284、フィルタ取得部202、フィルタ算出部282、及びフィルタ生成部283を有する。   Next, the filter control unit 280 and the filter processing unit 290 corresponding to Equations 21 to 24 will be described. FIG. 53 is a block diagram illustrating an example of a schematic configuration of the filter control unit 280 and the filter processing unit 290 according to the fifth embodiment. First, the filter control unit 280 will be described. The filter control unit 280 includes a filter storage unit 284, a filter acquisition unit 202, a filter calculation unit 282, and a filter generation unit 283.

フィルタ制御部280の構成で、図52に示す構成と同様のものは同じ符号を付す。フィルタ記憶部284は、フィルタ算出部282により算出された第3フィルタ285と、フィルタ生成部283により算出された複数段フィルタ286を記憶する。   In the configuration of the filter control unit 280, the same components as those shown in FIG. The filter storage unit 284 stores the third filter 285 calculated by the filter calculation unit 282 and the multistage filter 286 calculated by the filter generation unit 283.

フィルタ算出部282は、前述した画像同士の減算処理を不要にする第3フィルタ285を算出する。フィルタ算出部282は、式21〜式24を用いて式変形を行うことで、減算処理を不要とすることができる。この例では、9×9の第3フィルタ(F9')が生成されるとする。これにより、前述した処理と同じ結果が得られて、画像同士の減算処理を不要とする一つの有限フィルタ(F9')を生成することができる。フィルタ算出部282は、算出したフィルタF9'をフィルタ記憶部284に記憶させる。   The filter calculation unit 282 calculates the third filter 285 that eliminates the above-described subtraction process between images. The filter calculation unit 282 can eliminate the subtraction process by performing equation transformation using Equations 21 to 24. In this example, it is assumed that a 9 × 9 third filter (F9 ′) is generated. As a result, the same result as the above-described processing can be obtained, and one finite filter (F9 ′) that does not require subtraction processing between images can be generated. The filter calculation unit 282 stores the calculated filter F9 ′ in the filter storage unit 284.

フィルタ生成部283は、フィルタ記憶部284から第3フィルタ285を取得し、この第3フィルタ285から、所定の要素数以下となる複数段のフィルタを生成する。複数段のフィルタの生成については後述する。フィルタ生成部283は、生成した複数段フィルタ286をフィルタ記憶部284に記憶する。フィルタ処理部290は、畳み込み演算部291を有する。畳み込み演算部291は、複数段フィルタ286を畳み込む処理を行い、補正後の画像xを生成する。   The filter generation unit 283 acquires the third filter 285 from the filter storage unit 284, and generates a plurality of stages of filters having a predetermined number of elements or less from the third filter 285. The generation of the multi-stage filter will be described later. The filter generation unit 283 stores the generated multistage filter 286 in the filter storage unit 284. The filter processing unit 290 has a convolution operation unit 291. The convolution operation unit 291 performs a process of convolving the multistage filter 286 to generate a corrected image x.

次に、複数段のフィルタの生成について説明する。以下では、図53に示すフィルタ生成部283が、複数段のフィルタを生成する例について説明するが、図52に示すフィルタ生成部254でも同様にして生成することができる。また、この処理は、図2の係数分析部10で行うこともできる。   Next, generation of a plurality of stages of filters will be described. In the following, an example in which the filter generation unit 283 illustrated in FIG. 53 generates a plurality of stages of filters will be described. However, the filter generation unit 254 illustrated in FIG. This processing can also be performed by the coefficient analysis unit 10 in FIG.

まず、フィルタ生成部283は、PSFよりも大きい要素数のフィルタから、所定の要素数以下のフィルタ群に分けるとき、1個のフィルタを仮定して、その仮定したフィルタに基づいて他のフィルタを最適化で求める。   First, when the filter generation unit 283 divides a filter having the number of elements larger than the PSF into a filter group having a number of elements equal to or less than a predetermined number of elements, the filter generation unit 283 assumes one filter and selects other filters based on the assumed filter. Find by optimization.

例えば、第3フィルタF9'に対し、2つの5×5のフィルタ223(F5A’)、フィルタ225(F5B’)に分けるとする。このとき、フィルタ生成部283は、以下の式28を定義することができる。
eは、差分エラーである。以下、複数段のフィルタへの分割方法の一例について説明する。
For example, the third filter F9 ′ is divided into two 5 × 5 filters 223 (F5A ′) and a filter 225 (F5B ′). At this time, the filter generation unit 283 can define the following Expression 28.
e is a differential error. Hereinafter, an example of a dividing method into a plurality of stages of filters will be described.

フィルタの分割方法の一例として、フィルタ223を、第3フィルタF9'の中心部分の5×5の要素数を抽出したフィルタとする。この分割方法では、フィルタ生成部283は、フィルタ223を決定し、下記の式29で表される評価関数を最小化することで、フィルタ225を求めることができる。
As an example of the filter dividing method, the filter 223 is a filter obtained by extracting the number of 5 × 5 elements in the central portion of the third filter F9 ′. In this division method, the filter generation unit 283 can determine the filter 223, and can obtain the filter 225 by minimizing the evaluation function represented by the following Expression 29.

ここで求められたフィルタを用いて、さらに以下の式30に基づき補正画像xが生成される。
Using the filter obtained here, a corrected image x is further generated based on Expression 30 below.

このとき、差分エラーeは“0”とならない。そこで、複数段のフィルタに対してそれぞれゲインを設定することで、精度の向上を図ることができる。このとき、ゲインをG1、G2を用いて、補正画像xは、以下の式31で表される。
At this time, the difference error e does not become “0”. Therefore, accuracy can be improved by setting a gain for each of the plurality of stages of filters. At this time, the correction image x is expressed by the following Expression 31 using the gains G1 and G2.

なお、ゲインG1、G2の決定は、以下のように行うことができる。例えば、まず、画像処理部15は、ゲインG1、G2の初期値を設定する。このゲインを用いて式31により画像補正を行い、解像度情報を取得する。これに基づき上記のようにフィルタを算出し、式29の値を算出する。上記を繰り返し、式29の値が最小となるゲインG1、G2を決定する。   The gains G1 and G2 can be determined as follows. For example, first, the image processing unit 15 sets initial values of the gains G1 and G2. Using this gain, image correction is performed by Equation 31 to obtain resolution information. Based on this, the filter is calculated as described above, and the value of Equation 29 is calculated. The above is repeated and the gains G1 and G2 that minimize the value of Expression 29 are determined.

図54、図55は、フィルタの分割の一例を示す図である。図54、図55では、フィルタの大きさが輝度値で表されている。図54は、フィルタ例231が、フィルタ例233とフィルタ例235に分割されることを示している。ここで、フィルタ例231は、9個の9×9のフィルタを有する。フィルタ例233、フィルタ例235は、それぞれ、9個の5×5フィルタを有している。   54 and 55 are diagrams illustrating an example of filter division. 54 and 55, the size of the filter is represented by a luminance value. FIG. 54 shows that the filter example 231 is divided into a filter example 233 and a filter example 235. Here, the filter example 231 includes nine 9 × 9 filters. The filter example 233 and the filter example 235 each have nine 5 × 5 filters.

図55は、フィルタ例241が、フィルタ例243とフィルタ例245に分割されることを示している。ここで、フィルタ例241は、108個の9×9のフィルタを有する。フィルタ例243、フィルタ例245は、それぞれ、108個の5×5フィルタを有している。   FIG. 55 shows that the filter example 241 is divided into a filter example 243 and a filter example 245. Here, the filter example 241 includes 108 9 × 9 filters. Filter example 243 and filter example 245 each have 108 5 × 5 filters.

以上説明したように、第5の実施の形態による画像処理方法によれば、フィルタを要素数の少ない複数のフィルタに分割することができる。よって、計算量の制限から要素数の少ないフィルタを用いる場合にも、フィルタの要素数がPSFの大きさより小さい場合に生ずる補正品質の低下を防止することが可能になる。さらに、分割したフィルタのそれぞれに対応するゲインを設定する。これにより、さらに精度の高い画像補正用フィルタを算出することができる。   As described above, according to the image processing method of the fifth embodiment, the filter can be divided into a plurality of filters having a small number of elements. Therefore, even when a filter with a small number of elements is used due to the limitation of the calculation amount, it is possible to prevent a reduction in correction quality that occurs when the number of elements of the filter is smaller than the PSF. Further, a gain corresponding to each of the divided filters is set. As a result, an image correction filter with higher accuracy can be calculated.

このように、フィルタを複数段に分割する場合も、補正用被写体20を撮影した画像においてそれぞれのチャートに対応する算出位置でボケの度合いを表す解像度情報を算出し、フィルタを算出後、複数段のフィルタに分割する。   As described above, even when the filter is divided into a plurality of stages, the resolution information indicating the degree of blur is calculated at the calculation position corresponding to each chart in the image obtained by photographing the correction subject 20, and the plurality of stages are calculated after the filter is calculated. Divide into filters.

なお、フィルタを分割する方法については上記に限定されず、他の方法でもよい。分割後のフィルタの要素数や、係数、ゲインの求め方についても、上記の例は一例であり、記載例に限定されるものではない。   The method for dividing the filter is not limited to the above, and other methods may be used. The above example is also an example regarding the number of filter elements after division, the coefficient, and the method of obtaining the gain, and is not limited to the description example.

(チャート数の変形例)
以下、補正用被写体20におけるチャート数について説明する。図56から図59は、補正用被写体20におけるチャートの配置の一例を示す図である。上記第1から第5の実施の形態及び変形例において、チャート撮影には、解像度劣化の少ない基準となる中心付近のチャートと、劣化の大きい周辺部のチャートが必要となる。
(Modification of the number of charts)
Hereinafter, the number of charts in the correction subject 20 will be described. 56 to 59 are diagrams showing an example of the chart arrangement in the correction subject 20. In the first to fifth embodiments and the modifications described above, chart photographing requires a chart near the center serving as a reference with little resolution degradation and a chart around the periphery with great degradation.

図56に示すように、チャート配置例351では、中心と、四隅にチャートが配置されている。上記画像処理を行うには、このチャート配置例351のように配置された、少なくとも計5個のチャートがあることが好ましい。例えば、画像が点対称である場合には、中心と、四隅のうちの一つがあれば、チャート配置例351と実質的に同様な配置となる。   As shown in FIG. 56, in the chart arrangement example 351, charts are arranged at the center and at the four corners. In order to perform the image processing, it is preferable that there are at least five charts arranged as in the chart arrangement example 351. For example, when the image is point-symmetric, if there is a center and one of the four corners, the arrangement is substantially the same as the chart arrangement example 351.

図57に示すように、チャート配置例353は、12個のチャートが縦横3×4に配置されている。チャート配置例353の場合は、基準となる中心に配置されたチャートはないが、中心付近の1個もしくは中心付近の複数個を基準とする。   As shown in FIG. 57, in the chart arrangement example 353, twelve charts are arranged in 3 × 4 length and width. In the case of the chart arrangement example 353, there is no chart arranged at the reference center, but one chart near the center or a plurality near the center is used as a reference.

図58に示すように、チャート配置例355は、5×5=25個のチャートを配置されている。チャート配置例としては、図58のような例でもよい。   As shown in FIG. 58, in the chart arrangement example 355, 5 × 5 = 25 charts are arranged. As an example of the chart arrangement, an example as shown in FIG. 58 may be used.

図59は、12×9=108個のチャートを有するチャート配置例357を示している。例えば、第1の実施の形態では、図29を参照しながら、9つのチャートに基づき、全体として108個のフィルタを算出する例を説明した。チャート配置例357では、チャート自体が108個配置されているため、補間を使わずに108個のフィルタが得られる配置になっている。しかし、このように多い数だと、撮像装置の性能によっては解像度が計測できなくなり、限られた個数で測定せざるをえないことがある。   FIG. 59 shows a chart arrangement example 357 having 12 × 9 = 108 charts. For example, in the first embodiment, an example in which 108 filters are calculated as a whole based on nine charts has been described with reference to FIG. In the chart arrangement example 357, 108 charts are arranged, so that 108 filters can be obtained without using interpolation. However, with such a large number, the resolution cannot be measured depending on the performance of the imaging apparatus, and a limited number may be required.

このように、補正用被写体20に配置するチャートの数は、様々な数が適用可能であるが、撮像装置の性質や性能に基づき決定されることが好ましい。   As described above, various numbers of charts to be arranged on the correction subject 20 can be applied, but it is preferable to be determined based on the properties and performance of the imaging apparatus.

なお、上記第1から第5の実施の形態及び変形例におけるフィルタ算出は、標準的なコンピュータなど個別の情報処理装置で計算してもよい。また、補正用被写体20の撮影画像を、端末や撮像装置が通信ネットワークを介してサーバに転送し、サーバ内でフィルタ計算し、フィルタ計算結果を端末や撮像装置へ転送して画像補正処理を行うようにしてもよい。端末や撮像装置が、チャート撮影画像から算出した撮影個数のフィルタ情報をサーバに転送し、撮影個数よりも多いフィルタをサーバ内で算出してもよい。   The filter calculation in the first to fifth embodiments and modifications may be performed by an individual information processing apparatus such as a standard computer. The captured image of the correction subject 20 is transferred to the server by the terminal or the imaging device via the communication network, the filter calculation is performed in the server, and the filter calculation result is transferred to the terminal or the imaging device to perform image correction processing. You may do it. The terminal or the imaging apparatus may transfer filter information of the number of shots calculated from the chart shot image to the server, and calculate a filter larger than the number of shots in the server.

ここで、上記第1から第5の実施の形態、及び各変形例による画像処理方法の動作をコンピュータに行わせるために共通に適用されるコンピュータの例について説明する。図60は、標準的なコンピュータのハードウエア構成の一例を示すブロック図である。図60に示すように、コンピュータ300は、Central Processing Unit(CPU)302、メモリ304、入力装置306、出力装置308、外部記憶装置312、媒体駆動装置314、ネットワーク接続装置等がバス310を介して接続されている。   Here, an example of a computer that is commonly applied to cause the computer to perform the operations of the image processing methods according to the first to fifth embodiments and the modifications will be described. FIG. 60 is a block diagram illustrating an example of a hardware configuration of a standard computer. As shown in FIG. 60, a computer 300 includes a central processing unit (CPU) 302, a memory 304, an input device 306, an output device 308, an external storage device 312, a medium driving device 314, a network connection device, and the like via a bus 310. It is connected.

CPU302は、コンピュータ300全体の動作を制御する演算処理装置である。メモリ304は、コンピュータ300の動作を制御するプログラムを予め記憶したり、プログラムを実行する際に必要に応じて作業領域として使用したりするための記憶部である。メモリ304は、例えばRandom Access Memory(RAM)、Read Only Memory(ROM)等である。入力装置306は、コンピュータの使用者により操作されると、その操作内容に対応付けられている使用者からの各種情報の入力を取得し、取得した入力情報をCPU302に送付する装置であり、例えばキーボード装置、マウス装置などである。出力装置308は、コンピュータ300による処理結果を出力する装置であり、表示装置などが含まれる。例えば表示装置は、CPU302により送付される表示データに応じてテキストや画像を表示する。   The CPU 302 is an arithmetic processing unit that controls the operation of the entire computer 300. The memory 304 is a storage unit for storing in advance a program for controlling the operation of the computer 300 or using it as a work area when necessary when executing the program. The memory 304 is, for example, a random access memory (RAM), a read only memory (ROM), or the like. The input device 306 is a device that, when operated by a computer user, acquires various information input from the user associated with the operation content and sends the acquired input information to the CPU 302. Keyboard device, mouse device, etc. The output device 308 is a device that outputs a processing result by the computer 300, and includes a display device and the like. For example, the display device displays text and images according to display data sent by the CPU 302.

外部記憶装置312は、例えば、ハードディスクなどの記憶装置であり、CPU302により実行される各種制御プログラムや、取得したデータ等を記憶しておく装置である。媒体駆動装置314は、可搬記録媒体316に書き込みおよび読み出しを行うための装置である。CPU302は、可搬記録媒体316に記録されている所定の制御プログラムを、媒体駆動装置314を介して読み出して実行することによって、各種の制御処理を行うようにすることもできる。可搬記録媒体316は、例えばCompact Disc(CD)−ROM、Digital Versatile Disc(DVD)、Universal Serial Bus(USB)メモリ等である。ネットワーク接続装置318は、有線または無線により外部との間で行われる各種データの授受の管理を行うインタフェース装置である。バス310は、上記各装置等を互いに接続し、データのやり取りを行う通信経路である。   The external storage device 312 is a storage device such as a hard disk, and stores various control programs executed by the CPU 302, acquired data, and the like. The medium driving device 314 is a device for writing to and reading from the portable recording medium 316. The CPU 302 can perform various control processes by reading and executing a predetermined control program recorded on the portable recording medium 316 via the medium driving device 314. The portable recording medium 316 is, for example, a Compact Disc (CD) -ROM, a Digital Versatile Disc (DVD), a Universal Serial Bus (USB) memory, or the like. The network connection device 318 is an interface device that manages transmission / reception of various data performed between the outside by wired or wireless. A bus 310 is a communication path for connecting the above devices and the like to exchange data.

上記第1から第5の実施の形態による画像処理方法をコンピュータに実行させるプログラムは、例えば外部記憶装置312に記憶させる。CPU302は、外部記憶装置312からプログラムを読み出し、コンピュータ300に画像処理の動作を行なわせる。このとき、まず、画像処理の処理をCPU302に行わせるための制御プログラムを作成して外部記憶装置312に記憶させておく。そして、入力装置306から所定の指示をCPU302に与えて、この制御プログラムを外部記憶装置312から読み出させて実行させるようにする。また、このプログラムは、可搬記録媒体316に記憶するようにしてもよい。   A program that causes a computer to execute the image processing methods according to the first to fifth embodiments is stored in, for example, the external storage device 312. The CPU 302 reads a program from the external storage device 312 and causes the computer 300 to perform an image processing operation. At this time, first, a control program for causing the CPU 302 to perform image processing is created and stored in the external storage device 312. Then, a predetermined instruction is given from the input device 306 to the CPU 302 so that the control program is read from the external storage device 312 and executed. The program may be stored in the portable recording medium 316.

なお、本発明は、以上に述べた実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内で種々の構成または実施形態を採ることができる。   The present invention is not limited to the embodiments described above, and various configurations or embodiments can be adopted without departing from the gist of the present invention.

以上の実施形態に関し、さらに以下の付記を開示する。
(付記1)
画像上の少なくとも二点に対応する解像度の状況を示す解像度情報を、前記画像に基づきそれぞれ算出する解像度算出部と、
前記少なくとも二点以外の前記画像上の一点に対応する解像度情報を、前記少なくとも二点のそれぞれに対応する前記解像度情報と、前記少なくとも二点および前記一点の前記画像上の位置とに基づき算出する補間部と、
前記一点に対応する前記解像度情報に応じて、画像の前記一点を含む領域を補正するためのフィルタを算出するフィルタ算出部と、
を有することを特徴とする画像処理装置。
(付記2)
前記解像度情報は、前記画像の各点に対応する解像度に応じた解像度値、前記解像度の異方性を示す異方性度、および前記解像度の異方性に対応する角度を有し、
前記解像度値、前記異方性度、及び前記角度は、前記少なくとも2点のそれぞれに対して、少なくとも2つの方向のそれぞれにおいて間隔及び幅の異なる線を順次等距離の位置に備えた模様を含む被写体を撮影した画像における、前記模様に対応する輝度値の振幅が同一の点の分布が形成する楕円の大きさ、楕円率、前記画像における前記楕円の角度に対応することを特徴とする付記1に記載の画像処理装置。
(付記3)
前記補間部は、前記一点に対応する前記角度を、前記一点の画像上の位置に基づき幾何学的に算出することを特徴とする付記2に記載の画像処理装置。
(付記4)
前記角度は、前記画像上の前記異方性度が最も等方的になる点と、前記フィルタの算出位置とを結ぶ方向であることを特徴とする付記2または付記3のいずれかに記載の画像処理装置。
(付記5)
前記フィルタ算出部は、前記角度に応じた重み係数を決定することを特徴とする付記2から付記4のいずれかに記載の画像処理装置。
(付記6)
前記重み係数は、前記角度の方向と前記角度の方向に直交する方向との前記解像度の差が最小となるように決定されることを特徴とする付記3に記載の画像処理装置。
(付記7)
前記フィルタが、第1の有限個の要素を有し、前記楕円よりも前記要素の数に対応する範囲が大きい場合に、前記フィルタを、前記第1の有限個より少ない第2の有限個の要素を有する複数のフィルタに分割して画像に畳み込むことで補正を行うことを特徴とする付記2から付記6のいずれかに記載の画像処理装置。
(付記8)
画像上の少なくとも二点に対応する解像度の状況を示す解像度情報を、前記画像に基づきそれぞれ算出し、
前記少なくとも二点以外の前記画像上の一点に対応する解像度情報を、前記少なくとも二点のそれぞれに対応する前記解像度情報と、前記少なくとも二点および前記一点の前記画像上の位置とに基づき算出し、
前記解像度情報に応じて、画像の前記一点を含む領域を補正するためのフィルタを算出する、
ことを特徴とする画像処理方法。
(付記9)
前記解像度情報は、前記画像の各点における解像度に応じた解像度値、前記解像度の異方性を示す異方性度、および前記解像度の異方性に対応する角度を有し、
前記画像に基づき算出される前記解像度値、前記異方性度、及び前記角度は、前記少なくとも2点のそれぞれに対して、少なくとも2つの方向のそれぞれにおいて間隔及び幅の異なる線を順次等距離の位置に備えた模様を含む被写体を撮影した画像における、前記模様に対応する輝度値の振幅が同一の点の分布が形成する楕円の大きさ、楕円率、前記画像における前記楕円の角度に対応することを特徴とする付記8に記載の画像処理方法。
(付記10)
前記一点に対応する前記角度は、前記一点の画像上の位置に基づき幾何学的に算出されることを特徴とする付記9に記載の画像処理方法。
(付記11)
前記角度は、前記画像上の前記異方性度が最も等方的になる点と、前記フィルタの算出位置とを結ぶ方向であることを特徴とする付記9または付記10のいずれかに記載の画像処理方法。
(付記12)
前記フィルタは、前記角度に応じた重み係数を決定することにより算出されることを特徴とする付記9から付記11のいずれかに記載の画像処理方法。
(付記13)
前記重み係数は、前記角度の方向と前記角度の方向に直交する方向との前記解像度の差が最小となるように決定されることを特徴とする付記12に記載の画像処理方法。
(付記14)
前記フィルタが、第1の有限個の要素を有し、前記楕円よりも前記要素の数に対応する範囲が大きい場合に、前記フィルタを、前記第1の有限個より少ない第2の有限個の要素を有する複数のフィルタに分割して画像に畳み込むことで補正を行うことを特徴とする付記9から付記14のいずれかに記載の画像処理方法。
(付記15)
画像上の少なくとも二点に対応する解像度の状況を示す解像度情報を、前記画像に基づきそれぞれ算出し、
前記少なくとも二点以外の前記画像上の一点に対応する解像度情報を、前記少なくとも二点のそれぞれに対応する前記解像度情報と、前記少なくとも二点および前記一点の前記画像上の位置とに基づき算出し、
前記解像度情報に応じて、画像の前記一点を含む領域を補正するためのフィルタを算出する、
処理をコンピュータに実行させるプログラム。
Regarding the above embodiment, the following additional notes are disclosed.
(Appendix 1)
Resolution information indicating resolution information corresponding to at least two points on the image, respectively, based on the image;
Resolution information corresponding to one point on the image other than the at least two points is calculated based on the resolution information corresponding to each of the at least two points and the position of the at least two points and the one point on the image. An interpolation unit;
A filter calculating unit that calculates a filter for correcting a region including the one point of the image according to the resolution information corresponding to the one point;
An image processing apparatus comprising:
(Appendix 2)
The resolution information has a resolution value corresponding to the resolution corresponding to each point of the image, an anisotropy indicating the anisotropy of the resolution, and an angle corresponding to the anisotropy of the resolution,
The resolution value, the degree of anisotropy, and the angle include a pattern in which lines with different intervals and widths are sequentially provided at equidistant positions in each of at least two directions with respect to each of the at least two points. Supplementary note 1, which corresponds to the size, ellipticity, and angle of the ellipse formed by the distribution of points having the same amplitude of luminance values corresponding to the pattern in the image of the subject. An image processing apparatus according to 1.
(Appendix 3)
The image processing apparatus according to appendix 2, wherein the interpolation unit geometrically calculates the angle corresponding to the one point based on a position on the image of the one point.
(Appendix 4)
The angle is a direction connecting a point at which the anisotropy degree on the image is most isotropic and a calculation position of the filter, according to any one of appendix 2 and appendix 3. Image processing device.
(Appendix 5)
The image processing apparatus according to any one of Supplementary Note 2 to Supplementary Note 4, wherein the filter calculation unit determines a weighting factor according to the angle.
(Appendix 6)
The image processing apparatus according to appendix 3, wherein the weighting factor is determined such that a difference in resolution between the direction of the angle and a direction orthogonal to the direction of the angle is minimized.
(Appendix 7)
If the filter has a first finite number of elements, and the range corresponding to the number of elements is greater than the ellipse, the filter may be reduced to a second finite number less than the first finite number. The image processing apparatus according to any one of appendix 2 to appendix 6, wherein correction is performed by dividing the filter into a plurality of filters having elements and convolving the image.
(Appendix 8)
Resolution information indicating the resolution status corresponding to at least two points on the image is calculated based on the image,
Resolution information corresponding to one point on the image other than the at least two points is calculated based on the resolution information corresponding to each of the at least two points and the position of the at least two points and the one point on the image. ,
Calculating a filter for correcting a region including the one point of the image according to the resolution information;
An image processing method.
(Appendix 9)
The resolution information has a resolution value corresponding to the resolution at each point of the image, an anisotropy indicating the anisotropy of the resolution, and an angle corresponding to the anisotropy of the resolution,
The resolution value, the degree of anisotropy, and the angle calculated on the basis of the image are sequentially equidistant from each other at least in two directions with respect to each of the at least two points. Corresponding to the size of the ellipse formed by the distribution of points having the same amplitude of the luminance value corresponding to the pattern, the ellipticity, and the angle of the ellipse in the image in the image obtained by photographing the subject including the pattern provided at the position The image processing method according to appendix 8, wherein
(Appendix 10)
The image processing method according to claim 9, wherein the angle corresponding to the one point is geometrically calculated based on a position of the one point on the image.
(Appendix 11)
The angle is a direction connecting a point where the degree of anisotropy on the image is most isotropic and a calculation position of the filter, The appendix 9 or appendix 10, characterized in that Image processing method.
(Appendix 12)
12. The image processing method according to any one of appendix 9 to appendix 11, wherein the filter is calculated by determining a weighting factor according to the angle.
(Appendix 13)
13. The image processing method according to claim 12, wherein the weighting factor is determined so that a difference in resolution between the direction of the angle and a direction orthogonal to the direction of the angle is minimized.
(Appendix 14)
If the filter has a first finite number of elements, and the range corresponding to the number of elements is greater than the ellipse, the filter may be reduced to a second finite number less than the first finite number. The image processing method according to any one of appendix 9 to appendix 14, wherein correction is performed by dividing the filter into a plurality of filters having elements and convolving the image.
(Appendix 15)
Resolution information indicating the resolution status corresponding to at least two points on the image is calculated based on the image,
Resolution information corresponding to one point on the image other than the at least two points is calculated based on the resolution information corresponding to each of the at least two points and the position of the at least two points and the one point on the image. ,
Calculating a filter for correcting a region including the one point of the image according to the resolution information;
A program that causes a computer to execute processing.

1 光学系
2 撮像素子
3 AFE
4 画像処理部
5 後処理部
6 駆動制御装置
7 制御装置
8 画像メモリ
9 表示部
10 係数分析部
11 レンズ
11a レンズ
11b レンズ
11c レンズ
12 絞り
13 補間部
15 画像処理部
20 補正用被写体
25 チャート
31 A/Dコンバータ
32 タイミングジェネレータ
35 補間位置特定部
36 補間元特定部
37 解像度情報補間部
41 RAWメモリ
43 フィルタ制御部
45 フィルタ処理部
51 楕円
53 PSF
55 補正用画像
57 解像度情報例
59 フィルタ算出位置配置例
100 撮像装置
101 解像度算出部
102 フィルタ算出部
103 フィルタメモリ
109 フィルタ算出例
121 調整部
122 画像補正部
123 係数決定部
125 フィルタテーブル
127 解像度情報テーブル
1 Optical System 2 Image Sensor 3 AFE
4 Image processing unit 5 Post processing unit 6 Drive control unit 7 Control unit 8 Image memory 9 Display unit 10 Coefficient analysis unit 11 Lens 11a Lens 11b Lens 11c Lens 12 Aperture 13 Interpolation unit 15 Image processing unit 20 Correction subject 25 Chart 31 A / D converter 32 Timing generator 35 Interpolation position specifying unit 36 Interpolation source specifying unit 37 Resolution information interpolation unit 41 RAW memory 43 Filter control unit 45 Filter processing unit 51 Ellipse 53 PSF
55 Image for Correction 57 Resolution Information Example 59 Filter Calculation Position Arrangement Example 100 Imaging Device 101 Resolution Calculation Unit 102 Filter Calculation Unit 103 Filter Memory 109 Filter Calculation Example 121 Adjustment Unit 122 Image Correction Unit 123 Coefficient Determination Unit 125 Filter Table 127 Resolution Information Table

Claims (8)

画像上の少なくとも二点に対応する解像度の状況を示す解像度情報を、前記画像に基づきそれぞれ算出する解像度算出部と、
前記少なくとも二点以外の前記画像上の一点に対応する解像度情報を、前記少なくとも二点のそれぞれに対応する前記解像度情報と、前記少なくとも二点および前記一点の前記画像上の位置とに基づき算出する補間部と、
前記一点に対応する前記解像度情報に応じて、画像の前記一点を含む領域を補正するためのフィルタを算出するフィルタ算出部と、
を有し、
前記解像度情報は、前記画像の各点に対応する解像度に応じた解像度値、前記解像度の異方性を示す異方性度、および前記解像度の異方性に対応する角度を有し、
前記解像度値、前記異方性度、及び前記角度は、前記少なくとも二点のそれぞれに対して、少なくとも2つの方向のそれぞれにおいて間隔及び幅の異なる線を順次等距離の位置に備えた模様を含む被写体を撮影した画像における、前記模様に対応する輝度値の振幅が同一の点の分布が形成する楕円の大きさ、楕円率、前記画像における前記楕円の角度に対応する、
ことを特徴とする画像処理装置。
Resolution information indicating resolution information corresponding to at least two points on the image, respectively, based on the image;
Resolution information corresponding to one point on the image other than the at least two points is calculated based on the resolution information corresponding to each of the at least two points and the position of the at least two points and the one point on the image. An interpolation unit;
A filter calculating unit that calculates a filter for correcting a region including the one point of the image according to the resolution information corresponding to the one point;
I have a,
The resolution information has a resolution value corresponding to the resolution corresponding to each point of the image, an anisotropy indicating the anisotropy of the resolution, and an angle corresponding to the anisotropy of the resolution,
The resolution value, the degree of anisotropy, and the angle include a pattern in which lines having different intervals and widths are sequentially arranged at equal distances in each of at least two directions with respect to each of the at least two points. Corresponding to the size of the ellipse formed by the distribution of points having the same amplitude of the luminance value corresponding to the pattern, the ellipticity, and the angle of the ellipse in the image in the image obtained by photographing the subject,
An image processing apparatus.
前記補間部は、前記一点に対応する前記角度を、前記一点の画像上の位置に基づき幾何学的に算出することを特徴とする請求項に記載の画像処理装置。 The image processing apparatus according to claim 1 , wherein the interpolation unit geometrically calculates the angle corresponding to the one point based on a position on the image of the one point. 前記角度は、前記画像上の前記異方性度が最も等方的になる点と、前記フィルタの算出位置とを結ぶ方向であることを特徴とする請求項または請求項のいずれかに記載の画像処理装置。 Said angle, the point at which the degree of anisotropy on the image is most isotropically, to claim 1 or claim 2, characterized in that a direction connecting the calculated position of the filter The image processing apparatus described. 前記フィルタ算出部は、前記角度に応じた重み係数を決定することを特徴とする請求項から請求項のいずれかに記載の画像処理装置。 The filter calculation unit, the image processing apparatus according to any one of claims 1 to 3, characterized in that determining the weighting coefficients corresponding to said angle. 前記重み係数は、前記角度の方向と前記角度の方向に直交する方向との前記解像度の差が最小となるように決定されることを特徴とする請求項に記載の画像処理装置。 The image processing apparatus according to claim 4 , wherein the weighting factor is determined so that a difference in resolution between the direction of the angle and a direction orthogonal to the direction of the angle is minimized. 前記フィルタが、第1の有限個の要素を有し、前記楕円よりも前記要素の数に対応する範囲が大きい場合に、前記フィルタを、前記第1の有限個より少ない第2の有限個の要素を有する複数のフィルタに分割して画像に畳み込むことで補正を行うことを特徴とする請求項から請求項のいずれかに記載の画像処理装置。 If the filter has a first finite number of elements, and the range corresponding to the number of elements is greater than the ellipse, the filter may be reduced to a second finite number less than the first finite number. the image processing apparatus according to claim 5 is divided into a plurality of filters to be corrected by convolving the image from claim 1, wherein having elements. 画像上の少なくとも二点に対応する解像度の状況を示す解像度情報を、前記画像に基づきそれぞれ算出し、
前記少なくとも二点以外の前記画像上の一点に対応する解像度情報を、前記少なくとも二点のそれぞれに対応する前記解像度情報と、前記少なくとも二点および前記一点の前記画像上の位置とに基づき算出し、
前記解像度情報に応じて、画像の前記一点を含む領域を補正するためのフィルタを算出
前記解像度情報は、前記画像の各点に対応する解像度に応じた解像度値、前記解像度の異方性を示す異方性度、および前記解像度の異方性に対応する角度を有し、
前記解像度値、前記異方性度、及び前記角度は、前記少なくとも二点のそれぞれに対して、少なくとも2つの方向のそれぞれにおいて間隔及び幅の異なる線を順次等距離の位置に備えた模様を含む被写体を撮影した画像における、前記模様に対応する輝度値の振幅が同一の点の分布が形成する楕円の大きさ、楕円率、前記画像における前記楕円の角度に対応する、
ことを特徴とする画像処理方法。
Resolution information indicating the resolution status corresponding to at least two points on the image is calculated based on the image,
Resolution information corresponding to one point on the image other than the at least two points is calculated based on the resolution information corresponding to each of the at least two points and the position of the at least two points and the one point on the image. ,
Depending on the resolution information, and calculates the filter for correcting a region including the one point of the image,
The resolution information has a resolution value corresponding to the resolution corresponding to each point of the image, an anisotropy indicating the anisotropy of the resolution, and an angle corresponding to the anisotropy of the resolution,
The resolution value, the degree of anisotropy, and the angle include a pattern in which lines having different intervals and widths are sequentially arranged at equal distances in each of at least two directions with respect to each of the at least two points. Corresponding to the size of the ellipse formed by the distribution of points having the same amplitude of the luminance value corresponding to the pattern, the ellipticity, and the angle of the ellipse in the image in the image obtained by photographing the subject,
An image processing method.
画像上の少なくとも二点に対応する解像度の状況を示す解像度情報を、前記画像に基づきそれぞれ算出し、
前記少なくとも二点以外の前記画像上の一点に対応する解像度情報を、前記少なくとも二点のそれぞれに対応する前記解像度情報と、前記少なくとも二点および前記一点の前記画像上の位置とに基づき算出し、
前記解像度情報に応じて、画像の前記一点を含む領域を補正するためのフィルタを算出する、
処理をコンピュータに実行させ
前記解像度情報は、前記画像の各点に対応する解像度に応じた解像度値、前記解像度の異方性を示す異方性度、および前記解像度の異方性に対応する角度を有し、
前記解像度値、前記異方性度、及び前記角度は、前記少なくとも二点のそれぞれに対して、少なくとも2つの方向のそれぞれにおいて間隔及び幅の異なる線を順次等距離の位置に備えた模様を含む被写体を撮影した画像における、前記模様に対応する輝度値の振幅が同一の点の分布が形成する楕円の大きさ、楕円率、前記画像における前記楕円の角度に対応する、
ことを特徴とするプログラム。
Resolution information indicating the resolution status corresponding to at least two points on the image is calculated based on the image,
Resolution information corresponding to one point on the image other than the at least two points is calculated based on the resolution information corresponding to each of the at least two points and the position of the at least two points and the one point on the image. ,
Calculating a filter for correcting a region including the one point of the image according to the resolution information;
Let the computer execute the process ,
The resolution information has a resolution value corresponding to the resolution corresponding to each point of the image, an anisotropy indicating the anisotropy of the resolution, and an angle corresponding to the anisotropy of the resolution,
The resolution value, the degree of anisotropy, and the angle include a pattern in which lines having different intervals and widths are sequentially arranged at equal distances in each of at least two directions with respect to each of the at least two points. Corresponding to the size of the ellipse formed by the distribution of points having the same amplitude of the luminance value corresponding to the pattern, the ellipticity, and the angle of the ellipse in the image in the image obtained by photographing the subject,
A program characterized by that .
JP2013220416A 2013-10-23 2013-10-23 Image processing apparatus, image processing method, and program Active JP6255892B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013220416A JP6255892B2 (en) 2013-10-23 2013-10-23 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013220416A JP6255892B2 (en) 2013-10-23 2013-10-23 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2015082242A JP2015082242A (en) 2015-04-27
JP6255892B2 true JP6255892B2 (en) 2018-01-10

Family

ID=53012804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013220416A Active JP6255892B2 (en) 2013-10-23 2013-10-23 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP6255892B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6546353B2 (en) 2016-09-14 2019-07-17 富士フイルム株式会社 Evaluation system and evaluation method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5633218B2 (en) * 2010-07-13 2014-12-03 富士通株式会社 Image processing apparatus and image processing program
JP2012256118A (en) * 2011-06-07 2012-12-27 Canon Inc Image restoration device and method thereof
JP5274623B2 (en) * 2011-07-04 2013-08-28 キヤノン株式会社 Image processing apparatus, imaging apparatus, image processing program, and image processing method
JP5809865B2 (en) * 2011-07-19 2015-11-11 株式会社 日立産業制御ソリューションズ Image processing apparatus and image processing method
JP5821740B2 (en) * 2012-03-27 2015-11-24 富士通株式会社 Image correction device

Also Published As

Publication number Publication date
JP2015082242A (en) 2015-04-27

Similar Documents

Publication Publication Date Title
JP5983373B2 (en) Image processing apparatus, information processing method, and program
US9167216B2 (en) Image processing apparatus, image capture apparatus and image processing method
CN102930506B (en) Image processing apparatus, image processing method, and image pickup apparatus
US10062153B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and storage medium
US10250782B2 (en) Camera module, electronic device, and method of operating the same using pre-estimated lens-customized point spread function (PSF)
US20160371567A1 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for estimating blur
JP5451704B2 (en) Image processing apparatus, image processing method, program, and image processing system
JP2015216576A (en) Image processing apparatus, image processing method, imaging apparatus, electronic apparatus, and program
US20150161771A1 (en) Image processing method, image processing apparatus, image capturing apparatus and non-transitory computer-readable storage medium
JP5949201B2 (en) Image processing apparatus and program
US11830173B2 (en) Manufacturing method of learning data, learning method, learning data manufacturing apparatus, learning apparatus, and memory medium
JP6255892B2 (en) Image processing apparatus, image processing method, and program
JP6020123B2 (en) Image processing apparatus, image processing method, and program
JP6415108B2 (en) Image processing method, image processing apparatus, imaging apparatus, image processing program, and storage medium
JP2013033496A (en) Image processing apparatus, image pickup apparatus, image processing method, and program
JP6306811B2 (en) Image processing apparatus, information processing method, and program
JP5344647B2 (en) Image processing method, image processing apparatus, and image processing program
JP6579934B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and storage medium
JP2017123532A (en) Image processing device, imaging device, image processing method, image processing program and recording medium
WO2021124596A1 (en) Image processing device, image processing method, program, recording medium, and image capturing device
JP2013055622A (en) Image processing apparatus, image processing method, information recording medium, and program
JP2017163491A (en) Information processing device, optical device, information processing method, information processing program, and recording medium
JP6566780B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
PH12016000250A1 (en) Camera module, electronic device, and method of operating the same
JP2015043530A (en) Image processing system and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160705

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170510

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170530

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170712

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: 20171107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171120

R150 Certificate of patent or registration of utility model

Ref document number: 6255892

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150