JP2018088587A - Image processing method and image processing apparatus - Google Patents

Image processing method and image processing apparatus Download PDF

Info

Publication number
JP2018088587A
JP2018088587A JP2016230127A JP2016230127A JP2018088587A JP 2018088587 A JP2018088587 A JP 2018088587A JP 2016230127 A JP2016230127 A JP 2016230127A JP 2016230127 A JP2016230127 A JP 2016230127A JP 2018088587 A JP2018088587 A JP 2018088587A
Authority
JP
Japan
Prior art keywords
image
color component
image processing
correction
optical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016230127A
Other languages
Japanese (ja)
Other versions
JP2018088587A5 (en
Inventor
佐藤 新
Arata Sato
新 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016230127A priority Critical patent/JP2018088587A/en
Publication of JP2018088587A publication Critical patent/JP2018088587A/en
Publication of JP2018088587A5 publication Critical patent/JP2018088587A5/ja
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processing method and an image processing apparatus capable of correcting optical deterioration of a captured image with high accuracy.SOLUTION: An image processing method includes an input data acquisition step of acquiring a captured image having multiple color components, and the optical characteristics of an imaging optical system used for shooting of the captured image, a selection step of selecting the reference color component from the color component, by using at least one of the optical characteristics or the edge information of each color component of the captured image, a reference acquisition step of acquiring a reference image based on the reference color component, and a correction step of correction optical deterioration in the color component, so as to reduce difference of the width of edge in the color component and the width of edge in the reference image, by using the reference image and the optical characteristics.SELECTED DRAWING: Figure 2

Description

本発明は、画像処理方法および画像処理装置に関する。   The present invention relates to an image processing method and an image processing apparatus.

被写体の1点から射出された光は、撮像光学系を通ると撮像光学系の回折や収差の影響によって1点に収束することができず、微小な広がりを持つ。このような微小な広がりを持った分布を点像強度分布関数(Point Spread Function:PSF)と呼ぶ。撮像光学系を用いた撮像により生成された撮影画像は、理想的な被写体像にPSFが畳み込まれた画像であるため、撮影画像には光学的劣化(ぼけ)が生じる。   When the light emitted from one point of the subject passes through the image pickup optical system, it cannot converge to one point due to the influence of diffraction and aberration of the image pickup optical system, and has a minute spread. A distribution having such a minute spread is called a point spread function (PSF). Since the captured image generated by imaging using the imaging optical system is an image in which PSF is convolved with an ideal subject image, optical degradation (blur) occurs in the captured image.

非特許文献1には、画像処理によって撮影画像の光学的劣化を補正する技術が開示されている。非特許文献1に開示された画像処理方法では、PSFを用いて、以下の式(1)の損失関数Lと正則化関数Rを最小化する解を求める最適化問題として画像補正処理を行う。   Non-Patent Document 1 discloses a technique for correcting optical deterioration of a captured image by image processing. In the image processing method disclosed in Non-Patent Document 1, image correction processing is performed using PSF as an optimization problem for obtaining a solution that minimizes the loss function L and the regularization function R in the following equation (1).

損失関数Lと正則化関数Rはそれぞれ、以下の式(2)および式(3)により表される。   The loss function L and the regularization function R are represented by the following formulas (2) and (3), respectively.

式(2)および式(3)において、iは光学的劣化がない画像の各画素を成分とする列ベクトル、jは撮影画像の各画素を成分とする列ベクトル、BはPSFの畳み込みを表す行列である。cは、画像の構成成分(画像成分)であり、一般的なカラー画像では、RGB(Red、Green、Blue)の3つの成分である。lは、撮影画像を構成する成分の中で、光学的劣化の小さい画像成分(リファレンス色成分)を表している。H1,2は1次微分(縦方向と横方向)、H3,4,5は2次微分(縦方向、横方向、およびそのクロスターム)、λおよびβは重み係数である。i・iにおける・は、アダマール積を示す。
In Expressions (2) and (3), i is a column vector whose component is each pixel of an image without optical degradation, j is a column vector whose component is each pixel of the captured image, and B is a convolution of PSF. It is a matrix. c is a component of the image (image component). In a general color image, c is three components of RGB (Red, Green, Blue). l represents an image component (reference color component) having a small optical deterioration among components constituting the captured image. H 1 and 2 are primary differentials (vertical and horizontal directions), H 3 , 4 and 5 are secondary differentials (vertical and horizontal directions and their cross terms), and λ and β are weighting factors. In i c · i l , represents a Hadamard product.

はL2ノルム、
Is the L2 norm,

はL1ノルムである。ベクトルx=(x、x、…、x)として、
Is the L1 norm. As vector x = (x 1 , x 2 ,..., X n ),

を絶対値とする場合、L2ノルム
L2 norm when the absolute value is

およびL1ノルム
And L1 norm

はそれぞれ、以下の式(4)および(5)で定義される。 Are defined by the following equations (4) and (5), respectively.

式(2)では、原画像iに対して既知であるPSFを与えた劣化画像Biと実際の撮影画像jとの差分を取っている。ノイズがない場合、原画像iが正確に推定されていれば式(2)の値は0となる。式(3)の第1項は、原画像iの1次微分値のL1ノルムを計算することで、自然(一般的)な被写体を撮像して得られる自然画像全体のうちエッジが占める割合が疎(スパース)となる特性を反映している。式(3)の第2項は、画像成分lと補正対象である画像成分cのエッジの位置および幅が合致することで値が小さくなる正則化項である。式(3)の第2項では、画像成分cの1次微分で得られる画素勾配値と画像成分lの画素値との積であるH・iと、画像成分lの1次微分で得られる画素勾配値と画像成分cの画素値との積であるH・iとの差を計算している。式(1)を最小化する原画像iを推定する方法は、非特許文献1で詳しく説明されている。 In Expression (2), the difference between the deteriorated image Bi given the PSF known to the original image i and the actual captured image j is taken. When there is no noise, the value of Expression (2) is 0 if the original image i is accurately estimated. The first term of the expression (3) calculates the L1 norm of the primary differential value of the original image i, so that the ratio of the edge to the entire natural image obtained by imaging a natural (general) subject is calculated. Reflects the characteristics of sparseness. The second term of Expression (3) is a regularization term that decreases in value when the position and width of the edge of the image component l and the image component c to be corrected match. In the second term of Equation (3), H a i c · i l which is the product of the pixel gradient value obtained by the first derivative of the image component c and the pixel value of the image component l, and the first order of the image component l The difference between the pixel gradient value obtained by differentiation and the pixel value of the image component c is calculated as H a i l · ic . A method for estimating the original image i that minimizes the expression (1) is described in detail in Non-Patent Document 1.

また、特許文献1には、ノイズ除去のためにG成分(リファレンス色成分)のエッジ情報を用いてR成分とB成分のエッジ情報を補正する方法が開示されている。   Patent Document 1 discloses a method of correcting edge information of an R component and a B component using edge information of a G component (reference color component) for noise removal.

特許第5198192号公報Japanese Patent No. 5198192

Felix Heide, et al., “High−QualityComputational Imaging Through Simple Lenses”, ACM Transactions on Graphics (presented at SIGGRAPH 2013)Felix Heide, et al. , “High-Quality Computational Imaging Through Simple Lenses”, ACM Transactions on Graphics (presented at SIGGRAPH 2013)

しかしながら、非特許文献1および特許文献1に開示された方法では、像高、絞りまたは焦点距離などの変化によって、撮像光学系で色成分間の性能の関係が変化するため、充分な補正効果が得られない場合がある。例えば、撮影画像全体に対して同一の色成分をリファレンス色成分とする場合、補正対象である色成分よりも光学的劣化の大きい色成分がリファレンス色成分となる像高(撮影画像の位置)が存在する場合がある。補正対象である色成分よりも光学的劣化の大きい色成分をリファレンス色成分として補正処理を行うと、補正効果が低減する。   However, in the methods disclosed in Non-Patent Document 1 and Patent Document 1, the performance relationship between color components changes in the imaging optical system due to changes in image height, aperture, focal length, etc., so that a sufficient correction effect is obtained. It may not be obtained. For example, when the same color component is used as the reference color component for the entire photographed image, the image height (position of the photographed image) in which the color component having a greater optical deterioration than the color component to be corrected becomes the reference color component May exist. When the correction process is performed using a color component having a larger optical deterioration than the color component to be corrected as a reference color component, the correction effect is reduced.

このような課題に鑑みて、本発明は、撮影画像の光学的劣化を高精度に補正可能な画像処理方法および画像処理装置を提供すること目的とする。   In view of such a problem, an object of the present invention is to provide an image processing method and an image processing apparatus capable of correcting optical degradation of a captured image with high accuracy.

本発明の一側面としての画像処理方法は、複数の色成分を有する撮影画像と、前記撮影画像の撮影に用いた撮像光学系の光学特性と、を取得する入力データ取得工程と、前記光学特性、または前記撮影画像の色成分ごとのエッジ情報の少なくとも一方を用いて、前記色成分からリファレンス色成分を選択する選択工程と、前記リファレンス色成分に基づいて、リファレンス画像を取得するリファレンス取得工程と、前記リファレンス画像と前記光学特性とを用いて、前記色成分におけるエッジの幅と前記リファレンス画像におけるエッジの幅との差異が低減するように、前記色成分における光学的劣化を補正する補正工程と、を有することを特徴とする。   An image processing method according to one aspect of the present invention includes an input data acquisition step for acquiring a captured image having a plurality of color components, and optical characteristics of an imaging optical system used for capturing the captured image, and the optical characteristics. Or a selection step of selecting a reference color component from the color component using at least one of edge information for each color component of the photographed image, and a reference acquisition step of acquiring a reference image based on the reference color component; A correction step of correcting optical deterioration in the color component so that a difference between an edge width in the color component and an edge width in the reference image is reduced using the reference image and the optical characteristic; It is characterized by having.

また、本発明の他の側面としての画像処理装置は、複数の色成分を有する撮影画像と、前記撮影画像の撮影に用いた撮像光学系の光学特性と、を取得する入力データ取得部と、前記光学特性、または前記撮影画像の色成分ごとのエッジ情報の少なくとも一方を用いて、前記色成分からリファレンス色成分を選択する選択部と、前記リファレンス色成分に基づいて、リファレンス画像を生成するリファレンス取得部と、前記リファレンス画像と前記光学特性を用いて、前記色成分におけるエッジの幅と前記リファレンス画像におけるエッジの幅との差異が低減するように、前記色成分における光学的劣化を補正する補正部と、を有することを特徴とする。   An image processing apparatus according to another aspect of the present invention includes an input data acquisition unit that acquires a captured image having a plurality of color components and optical characteristics of an imaging optical system used for capturing the captured image. A selection unit that selects a reference color component from the color component using at least one of the optical characteristics or edge information for each color component of the photographed image, and a reference that generates a reference image based on the reference color component Correction that corrects optical deterioration in the color component so that the difference between the edge width in the color component and the edge width in the reference image is reduced using the acquisition unit, the reference image, and the optical characteristics And a portion.

本発明によれば、撮影画像の光学的劣化を高精度に補正可能な画像処理方法および画像処理装置を提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the image processing method and image processing apparatus which can correct | amend the optical degradation of a picked-up image with high precision can be provided.

実施例1の撮像装置のブロック図である。1 is a block diagram of an imaging apparatus according to Embodiment 1. FIG. 実施例1の補正処理を示すフローチャートである。3 is a flowchart illustrating a correction process according to the first exemplary embodiment. 実施例1のリファレンス色成分の選択の説明図である。6 is an explanatory diagram of selection of a reference color component in Embodiment 1. FIG. 実施例2の画像処理システムの外観図である。FIG. 3 is an external view of an image processing system according to a second embodiment. 実施例2の画像処理システムのブロック図である。6 is a block diagram of an image processing system according to Embodiment 2. FIG. 実施例2の補正処理を示すフローチャートである。10 is a flowchart illustrating a correction process according to the second embodiment. 実施例2の撮像光学系のレンズ断面図である。6 is a lens cross-sectional view of an image pickup optical system of Example 2. FIG. 実施例2の撮像光学系のMTF曲線である。6 is an MTF curve of the imaging optical system of Example 2. FIG. 実施例2の撮像光学系および撮像素子の白色光源に対するPSFの断面図である。It is sectional drawing of PSF with respect to the white light source of the imaging optical system of Example 2, and an image pick-up element. 実施例2の補正前後の撮影画像の部分領域におけるRの画素値の断面図である。FIG. 10 is a cross-sectional view of R pixel values in a partial region of a captured image before and after correction according to the second exemplary embodiment.

以下、本発明の実施例について、図面を参照しながら詳細に説明する。各図において、同一の部材については同一の参照番号を付し、重複する説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In each figure, the same members are denoted by the same reference numerals, and redundant description is omitted.

まず、本実施形態の説明で用いる用語について説明する。
「光学的劣化」
光学的劣化とは、撮像光学系に起因する画像の劣化であり、撮像光学系が有する諸収差に起因する像ぼけや光学系が有限な径を持つことに起因する回折ぼけである。光学的劣化は、撮像光学系の点光源に対する応答を表す関数である点像強度分布関数(PSF)や、PSFのFourier変換によって得られる光学伝達関数(OTF:Optical Transfer Function)などで表現できる。
「撮影状態」
撮影状態とは、例えば、撮像光学系の撮像時における焦点距離、絞り値および合焦した被写体距離などである。
「撮像光学系の光学特性」
撮像光学系の光学特性とは、撮像光学系に起因する光学的劣化を表すOTFやPSFなどであり、撮影状態によって異なる。光学特性は、撮像光学系の設計値などからコンピュータによるシミュレーションであらかじめ算出しておくことが望ましい。コンピュータシミュレーションによる撮像光学系の光学特性の算出は、想定する光源の分光特性および撮像素子の各画素のカラーフィルタの分光透過率特性を用いて、同一の分光透過率特性(同一のカラーフィルタ)を有する画素ごとに行うことが好ましい。撮像光学系の光学特性は、撮影状態と撮像素子のフィルタの分光透過率特性の組み合わせの数だけ必要となる。また、同一の撮影状態かつ同一の分光透過率特性でも像高に応じた収差や回折の変化が無視できない場合は、像高ごとに光学特性情報を生成しておく必要がある。また、光学特性として、コンピュータシミュレーションの算出結果ではなく、波面計測などから求めた計測結果を用いても構わない。
「画像のエッジ情報」
画像のエッジ情報とは、画像内のエッジの位置、強さおよび幅などに関する情報である。エッジ情報は、画像の空間微分値(差分値)を算出するなどして取得することができる。
First, terms used in the description of the present embodiment will be described.
"Optical degradation"
The optical degradation is image degradation caused by the imaging optical system, and is image blur caused by various aberrations of the imaging optical system or diffraction blur caused by the optical system having a finite diameter. The optical degradation can be expressed by a point image intensity distribution function (PSF) that is a function representing a response to a point light source of the imaging optical system, an optical transfer function (OTF: Optical Transfer Function) obtained by Fourier transform of the PSF, or the like.
"Shooting state"
The shooting state is, for example, a focal length, an aperture value, a focused subject distance, and the like during imaging by the imaging optical system.
"Optical characteristics of imaging optics"
The optical characteristics of the imaging optical system are OTF, PSF, and the like that indicate optical degradation caused by the imaging optical system, and differ depending on the shooting state. The optical characteristics are preferably calculated in advance by computer simulation from the design values of the imaging optical system. The calculation of the optical characteristics of the imaging optical system by computer simulation uses the spectral characteristics of the assumed light source and the spectral transmittance characteristics of the color filters of each pixel of the imaging device to obtain the same spectral transmittance characteristics (same color filters). This is preferably performed for each pixel. The optical characteristics of the imaging optical system are required by the number of combinations of the imaging state and the spectral transmittance characteristics of the filter of the imaging element. Also, if aberrations and diffraction changes corresponding to the image height cannot be ignored even in the same shooting state and the same spectral transmittance characteristic, it is necessary to generate optical characteristic information for each image height. Further, as the optical characteristics, a measurement result obtained from wavefront measurement or the like may be used instead of a computer simulation calculation result.
"Image edge information"
Image edge information is information about the position, strength, width, and the like of edges in an image. The edge information can be acquired by calculating a spatial differential value (difference value) of the image.

以下、本実施形態の具体的な実施例について説明する。   Hereinafter, specific examples of the present embodiment will be described.

図1を参照して、本実施例の撮像装置200の構成について説明する。図1は、撮像装置のブロック図である。撮像装置200は、撮像光学系201、撮像素子202、A/D変換部203、画像処理部204、表示部205、撮像光学系制御部206、状態検出部207、記憶部208、画像記録媒体209、およびシステムコントローラ210を有する。なお、撮像光学系201は、撮像装置200に対して着脱可能に取り付けられてもよい。   With reference to FIG. 1, the structure of the imaging device 200 of a present Example is demonstrated. FIG. 1 is a block diagram of the imaging apparatus. The imaging apparatus 200 includes an imaging optical system 201, an imaging element 202, an A / D conversion unit 203, an image processing unit 204, a display unit 205, an imaging optical system control unit 206, a state detection unit 207, a storage unit 208, and an image recording medium 209. And a system controller 210. Note that the imaging optical system 201 may be detachably attached to the imaging device 200.

撮像光学系201は、被写体からの光をCCDセンサやCMOSセンサなどにより構成される撮像素子202上に結像する。撮像光学系201は、絞り201aを備える。絞り201aは、絞り開口径を増減させることで、撮像素子202に入射する被写体からの光の光量を調節する。また、撮像光学系201は、フォーカス機能やズーム機能を有してもよい。撮像素子202は、RGBのベイヤー配列の画素を有する。ただし、複数の色成分(分光分布。可視光域に限らない)を有していれば、他の構成でもよい。A/D変換部203は、撮像素子202からのアナログ信号をデジタル信号に変換する。画像処理部204は、入力データ取得部204a、選択部204b、リファレンス取得部204c、および補正部204dを有する。画像処理部204は、A/D変換されたデジタル信号(撮影画像)に対して光学的劣化の補正処理(画像処理)を行う。画像処理部204は、補正処理を行う場合、記憶部208から撮像光学系201の光学特性を読み出して使用する。補正された画像は、表示部205に表示されるか、画像記録媒体209に保存される。表示部205は液晶モニタや有機ELモニタなどから構成され、画像記録媒体209は磁気ディスク、光ディスク、およびフラッシュメモリなどの記録媒体である。撮像光学系制御部206は、撮像光学系201の制御、例えば、絞り値、フォーカスおよびズームの制御を行う。状態検出部207は、撮像光学系制御部206から撮像光学系201の撮影状態を取得する。状態検出部207が取得した撮影状態は、画像処理部204が補正処理を行う場合に使用される。システムコントローラ210は、各部材に指令を行い、上述した動作を実行させる。   The imaging optical system 201 forms an image of light from a subject on an imaging element 202 configured by a CCD sensor, a CMOS sensor, or the like. The imaging optical system 201 includes a diaphragm 201a. The aperture 201a adjusts the amount of light from the subject incident on the image sensor 202 by increasing or decreasing the aperture diameter of the aperture. Further, the imaging optical system 201 may have a focus function and a zoom function. The image sensor 202 has pixels with an RGB Bayer array. However, as long as it has a plurality of color components (spectral distribution, not limited to the visible light range), other configurations may be used. The A / D conversion unit 203 converts an analog signal from the image sensor 202 into a digital signal. The image processing unit 204 includes an input data acquisition unit 204a, a selection unit 204b, a reference acquisition unit 204c, and a correction unit 204d. The image processing unit 204 performs optical deterioration correction processing (image processing) on the A / D converted digital signal (captured image). The image processing unit 204 reads and uses the optical characteristics of the imaging optical system 201 from the storage unit 208 when performing correction processing. The corrected image is displayed on the display unit 205 or stored in the image recording medium 209. The display unit 205 includes a liquid crystal monitor and an organic EL monitor, and the image recording medium 209 is a recording medium such as a magnetic disk, an optical disk, and a flash memory. The imaging optical system control unit 206 performs control of the imaging optical system 201, for example, control of an aperture value, focus, and zoom. The state detection unit 207 acquires the shooting state of the imaging optical system 201 from the imaging optical system control unit 206. The shooting state acquired by the state detection unit 207 is used when the image processing unit 204 performs correction processing. The system controller 210 instructs each member to execute the above-described operation.

以下、図2を参照して、画像処理部204が実行する光学的劣化の補正処理について説明する。図2は、画像処理部204が実行する光学的劣化の補正処理を示すフローチャートである。コンピュータおよび画像処理装置としての画像処理部204は、記憶部208に格納されたコンピュータプログラムである画像処理プログラムを実行して画像処理を行う。また、画像処理部204をハードウェア回路として実装し、ハードウェア回路により画像処理を行ってもよい。   Hereinafter, the optical deterioration correction process executed by the image processing unit 204 will be described with reference to FIG. FIG. 2 is a flowchart showing optical deterioration correction processing executed by the image processing unit 204. An image processing unit 204 as a computer and an image processing apparatus executes an image processing program by executing an image processing program that is a computer program stored in the storage unit 208. Further, the image processing unit 204 may be mounted as a hardware circuit, and image processing may be performed by the hardware circuit.

ステップS101では、入力データ取得部204aは、撮影画像(A/D変換部203によりA/D変換されたデジタル信号)を取得する。本実施例の撮影画像は、RGBのベイヤー配列画像である。したがって、同一の位置の画素には、単一の色成分しか存在しない。以下で説明する処理は、同一の画素に複数の色成分が存在する前提で行われるため、RGBの各色成分に対してバイリニア補間などで欠損している画素の情報を補間して生成する。RGBそれぞれに対して2倍の画素サイズでダウンサンプリングを行うことで、同一画素に複数の色成分が含まれるようにしてもよい。   In step S101, the input data acquisition unit 204a acquires a captured image (digital signal that has been A / D converted by the A / D conversion unit 203). The photographed image of the present embodiment is an RGB Bayer array image. Therefore, only a single color component exists in the pixels at the same position. Since the processing described below is performed on the premise that a plurality of color components exist in the same pixel, the information of the missing pixel is interpolated and generated by bilinear interpolation for each color component of RGB. A plurality of color components may be included in the same pixel by performing downsampling with a pixel size twice that of RGB.

ステップS102では、入力データ取得部204aは、撮影画像を複数の部分領域に分割し、そのうちの1つの部分領域を取得する。部分領域は、1画素でもよいし、複数の画素が含まれてもよい。   In step S102, the input data acquisition unit 204a divides the captured image into a plurality of partial areas, and acquires one of the partial areas. The partial area may be one pixel or a plurality of pixels.

ステップS103では、入力データ取得部204aは、ステップS102で取得した部分領域に対応する光学特性が取得可能かどうかを判定する。取得可能と判定した場合はステップS104に進み、取得不可能と判定した場合はステップS106に進む。部分領域に対応する光学特性は、撮像光学系201の絞り値、焦点距離、撮影距離(合焦距離)、色成分、像高(撮影画像に対する部分領域の位置)、および部分領域に存在する被写体の合焦距離に対する相対距離をパラメータとして決定される。記憶部208には、複数のパラメータに対する撮像光学系201の光学特性が記憶されている。部分領域に対応するパラメータの組み合わせの光学特性が記憶部208に記憶されている場合、または記憶された複数の光学特性から内挿によって部分領域に対応する光学特性が生成可能である場合、入力データ取得部204aは光学特性を取得可能と判定する。それ以外の場合、入力データ取得部204aは光学特性を取得不可能と判定する。本実施例では、記憶部208は、合焦面における光学特性のみを記憶している。そのため、部分領域が非合焦面(部分領域に存在する被写体の合焦距離に対する相対距離が、被写界深度の範囲外)である場合、対応する光学特性が内挿で生成できず、取得不可能と判定される。合焦面と非合焦面の判定には、被写体空間の距離マップが使用される。距離マップは、例えば、複数枚の画像の撮影により取得される。異なる合焦距離の画像を複数枚撮影し、画像内の各位置に対して、撮影した複数の画像のうち最もコントラストが高い画像がその位置に合焦した画像と判定することで、距離マップを生成することができる。また、撮像光学系201の瞳を分割する方法を用いて距離マップを取得してもよい。例えば、撮像素子202の受光部に撮像光学系201の射出瞳が複数の画素にわたって結像されるように、撮像素子202上にマイクロレンズアレイを配置することで、撮像光学系201の瞳が分割できる。瞳分割によって複数の視差画像が取得できるため、距離マップを取得することができる。   In step S103, the input data acquisition unit 204a determines whether the optical characteristic corresponding to the partial region acquired in step S102 can be acquired. If it is determined that acquisition is possible, the process proceeds to step S104. If it is determined that acquisition is impossible, the process proceeds to step S106. The optical characteristics corresponding to the partial area include the aperture value, focal length, shooting distance (focusing distance), color component, image height (position of the partial area with respect to the shot image) of the imaging optical system 201, and subject existing in the partial area. The relative distance to the in-focus distance is determined as a parameter. The storage unit 208 stores optical characteristics of the imaging optical system 201 with respect to a plurality of parameters. When the optical characteristics of the combination of parameters corresponding to the partial areas are stored in the storage unit 208, or when the optical characteristics corresponding to the partial areas can be generated by interpolation from a plurality of stored optical characteristics, the input data The acquisition unit 204a determines that the optical characteristic can be acquired. In other cases, the input data acquisition unit 204a determines that the optical characteristics cannot be acquired. In the present embodiment, the storage unit 208 stores only the optical characteristics on the in-focus surface. Therefore, if the partial area is an out-of-focus plane (the relative distance to the in-focus distance of the subject existing in the partial area is outside the range of the depth of field), the corresponding optical characteristics cannot be generated by interpolation and acquired. Determined impossible. A distance map of the subject space is used to determine the in-focus surface and the out-of-focus surface. The distance map is acquired, for example, by photographing a plurality of images. A plurality of images with different in-focus distances are taken, and for each position in the image, a distance map is determined by determining that an image having the highest contrast among the plurality of taken images is an image focused on that position. Can be generated. Further, the distance map may be acquired using a method of dividing the pupil of the imaging optical system 201. For example, the pupil of the imaging optical system 201 is divided by arranging a microlens array on the imaging element 202 so that the exit pupil of the imaging optical system 201 is imaged over a plurality of pixels in the light receiving unit of the imaging element 202. it can. Since a plurality of parallax images can be acquired by pupil division, a distance map can be acquired.

また、入力データ取得部204aは、ステップS103の判定を行う場合に撮像光学系201の製造誤差を考慮してもよい。記憶部208に記憶されている複数のパラメータに対する撮像光学系201の光学特性は、撮像光学系201の設計値から算出された光学特性である。したがって、製造誤差により、実際の撮像光学系201が有する光学特性と、記憶部208に記憶された光学特性は乖離している場合がある。製造誤差の大きさは、例えば、以下のような方法で見積もることができる。まず、撮影画像の各位置に対してエッジを検出し、色成分間のエッジの相対位置を算出することで倍率色収差を求める。次に、求めた倍率色収差と、撮像光学系201の設計値から求められる倍率色収差を比較することで製造誤差の大小を判定できる。また、撮像光学系201が光軸に対して回転対称な系で構成されている場合、撮影画像から求めた倍率色収差が画像中心に対してどの程度回転対称からずれているかによっても、製造誤差の大小を判定できる。入力データ取得部204aは、製造誤差が所定値以下の場合、部分領域に対応する光学特性を取得可能と判定し、所定値より大きい場合、取得不可能と判定する。なお、所定値以上の場合、取得不可能と判定してもよい。   Further, the input data acquisition unit 204a may consider a manufacturing error of the imaging optical system 201 when performing the determination in step S103. The optical characteristics of the imaging optical system 201 with respect to a plurality of parameters stored in the storage unit 208 are optical characteristics calculated from design values of the imaging optical system 201. Therefore, the optical characteristics of the actual imaging optical system 201 may be different from the optical characteristics stored in the storage unit 208 due to manufacturing errors. The magnitude of the manufacturing error can be estimated by the following method, for example. First, the chromatic aberration of magnification is obtained by detecting an edge for each position of the photographed image and calculating the relative position of the edge between the color components. Next, the magnitude of the manufacturing error can be determined by comparing the obtained lateral chromatic aberration with the lateral chromatic aberration obtained from the design value of the imaging optical system 201. Further, when the imaging optical system 201 is configured as a rotationally symmetric system with respect to the optical axis, a manufacturing error may vary depending on how much the lateral chromatic aberration obtained from the captured image is deviated from the rotational symmetry with respect to the image center. Can judge large and small. The input data acquisition unit 204a determines that the optical characteristic corresponding to the partial region can be acquired when the manufacturing error is equal to or smaller than the predetermined value, and determines that the optical characteristic corresponding to the partial region cannot be acquired when the manufacturing error is larger than the predetermined value. Note that if it is equal to or greater than a predetermined value, it may be determined that acquisition is impossible.

ステップS104では、入力データ取得部204aは、部分領域に対応する光学特性を取得する。本実施例では、入力データ取得部204aは、記憶部208から光学特性を取得するが、ネットワーク上からダウンロードして取得してもよい。撮影画像はRGBの色成分を有しているため、入力データ取得部204aはRGBそれぞれに対応する光学特性を取得する。   In step S104, the input data acquisition unit 204a acquires optical characteristics corresponding to the partial region. In the present embodiment, the input data acquisition unit 204a acquires the optical characteristics from the storage unit 208, but may download and acquire it from the network. Since the captured image has RGB color components, the input data acquisition unit 204a acquires optical characteristics corresponding to RGB.

ステップS105では、選択部204bは、光学特性と部分領域のエッジ情報とを用いてリファレンス色成分を選択する。リファレンス色成分は、他の色成分の光学的劣化を補正する際に参照される色成分であり、最も結像性能が高い色成分を選ぶことが望ましい。ただし、最も結像性能が高い色成分を常にリファレンス色成分とした場合、被写体によっては補正で偽エッジが生成される。   In step S105, the selection unit 204b selects a reference color component using the optical characteristics and edge information of the partial area. The reference color component is a color component that is referred to when correcting optical deterioration of other color components, and it is desirable to select a color component having the highest imaging performance. However, when the color component having the highest imaging performance is always used as the reference color component, a false edge is generated by correction depending on the subject.

図3(a)および図3(b)はそれぞれ、部分領域に存在する被写体に畳み込まれている(部分領域に対応する)撮像光学系201のPSF(光学特性)、および部分領域における画素値を示す図である。実線がR、一点鎖線がG、破線がBの色成分をそれぞれ表す。図3(a)では、G、R、Bの順に結像性能が高い。しかしながら、図3(b)に示されるように、部分領域に存在する被写体は、Gの画素値の変化が少ない被写体である。Gをリファレンス色成分に選択し、部分領域のGをリファレンス画像としてRとBの画像を補正すると、Gにはエッジが存在しないため、RとBのエッジのぼけが良好に補正されず、逆にぼける場合もある。そのため、リファレンス色成分として、部分領域内にエッジが存在し、かつ最も結像性能の良い色成分を選択すればよい。図3の例では、Rをリファレンス色成分とする。ただし、Rをリファレンス画像としてGの画像を補正すると、Gに偽エッジが発生してしまう。そこで、リファレンス色成分より結像性能の高い色成分に対しては、後の補正工程でリファレンス画像に合わせる効果を弱める処理を行う。   FIGS. 3A and 3B respectively show the PSF (optical characteristics) of the imaging optical system 201 convoluted with a subject existing in the partial area (corresponding to the partial area), and pixel values in the partial area. FIG. The solid line represents the R color component, the alternate long and short dash line represents the G color component, and the broken line represents the B color component. In FIG. 3A, the imaging performance is high in the order of G, R, and B. However, as shown in FIG. 3B, the subject existing in the partial area is a subject with little change in the G pixel value. When G is selected as a reference color component and R and B images are corrected using G in the partial area as a reference image, the edges of R and B are not corrected well because G does not have an edge. May be blurred. Therefore, a color component having an edge in the partial region and having the best imaging performance may be selected as the reference color component. In the example of FIG. 3, R is a reference color component. However, if the G image is corrected using R as a reference image, a false edge occurs in G. Therefore, for a color component having higher imaging performance than the reference color component, processing for weakening the effect of matching with the reference image is performed in a later correction step.

なお、全ての色成分でエッジが存在しない場合、結像性能からリファレンス色成分を決定する。結像性能を表す指標(性能値)として、例えば、PSFのピーク値、PSFの半値幅、PSFの分散、または所定の空間周波数におけるMTF(Modulation Transfer Function:変調伝達関数)の値などを用いればよい。性能値は性能が高いほど、大きい値を示す。したがって、PSFのピーク値やMTFの値を用いる場合はそのままの値を性能値として用いることができ、PSFの半値幅や分散を用いる場合は例えば逆数を性能値として用いることができる。部分領域内にエッジがあるか否かは、例えば部分領域を縦横それぞれで空間微分を取り、微分の絶対値が閾値以上になる箇所が存在するかで判定すればよい。また、絶対値が閾値以上になる微分値が、さらに第二の閾値以上、連続して空間的に配置されているか(エッジの幅が第二の閾値以上か)、などで判定してもよい。また、部分領域の各色成分をFourier変換し、所定の空間周波数の強度が第三の閾値以上あるかで判定してもよい。   If no edge exists in all color components, the reference color component is determined from the imaging performance. As an index (performance value) representing imaging performance, for example, a PSF peak value, a half width of PSF, a dispersion of PSF, or a value of MTF (Modulation Transfer Function) at a predetermined spatial frequency may be used. Good. The higher the performance value, the larger the performance value. Therefore, when the PSF peak value or MTF value is used, the value as it is can be used as the performance value, and when the half width or dispersion of the PSF is used, for example, the reciprocal can be used as the performance value. Whether or not there is an edge in the partial area may be determined, for example, by taking a spatial differentiation in the vertical and horizontal directions of the partial area and determining whether there is a place where the absolute value of the differentiation is greater than or equal to a threshold value. Further, it may be determined whether the differential value whose absolute value is equal to or greater than the threshold value is further spatially arranged more than the second threshold value (whether the edge width is equal to or greater than the second threshold value). . Alternatively, each color component of the partial region may be subjected to Fourier transform, and it may be determined whether the intensity of a predetermined spatial frequency is greater than or equal to a third threshold value.

なお、エッジ情報を取得する際には、事前に倍率色収差補正が施されていることが望ましい。倍率色収差があると、所定の色成分で部分領域内にエッジがないと判定された場合、被写体に色成分のエッジ情報が実際にないのか、倍率色収差によってエッジの色成分が部分領域外にずれたのか、区別できない。したがって、高精度にリファレンス色成分を決定するためには、部分領域(または、部分領域を取得する前の撮影画像)に対して倍率色収差を補正した後、エッジ情報を取得することが望ましい。   In addition, when acquiring edge information, it is desirable that magnification chromatic aberration correction is performed in advance. If there is chromatic aberration of magnification, if it is determined that there is no edge in the partial area with the specified color component, the color component of the edge will be shifted outside the partial area due to chromatic aberration of magnification whether the subject actually has no edge information of the color component. I can't tell if it was. Therefore, in order to determine the reference color component with high accuracy, it is desirable to obtain edge information after correcting the chromatic aberration of magnification for a partial region (or a captured image before obtaining the partial region).

ステップS106では、入力データ取得部204aは、記憶部208に記憶された光学特性(または、内挿で生成される光学特性)の中で、最も部分領域に作用している光学特性と近い光学特性を取得する。本実施例では、合焦面の光学特性のみを記憶部208に記憶しているため、部分領域が非合焦面の場合も合焦面の光学特性を取得する。製造誤差が発生して光学特性が取得できない場合も、設計値で求められた同じ撮影状態と像高の光学特性を取得する。なお、ステップS106の処理は、ステップS109の処理の前であれば、どこで実行してもよい。   In step S106, the input data acquisition unit 204a has an optical characteristic closest to the optical characteristic acting on the partial region among the optical characteristics stored in the storage unit 208 (or optical characteristics generated by interpolation). To get. In this embodiment, since only the optical characteristics of the in-focus surface are stored in the storage unit 208, the optical characteristics of the in-focus surface are acquired even when the partial area is a non-in-focus surface. Even when a manufacturing error occurs and the optical characteristics cannot be acquired, the optical characteristics of the same shooting state and image height obtained by the design values are acquired. Note that the process in step S106 may be executed anywhere before the process in step S109.

ステップS107では、選択部204bは、部分領域のエッジ情報のみからリファレンス色成分を選択する。エッジの強さ(画素値の空間微分の絶対値)やエッジの幅などを指標として、最も先鋭なエッジを有する色成分をリファレンス色成分とする。全ての色成分でエッジが存在しない場合、Gをリファレンス色成分とする。RまたはBをリファレンス色成分としてもよい。   In step S107, the selection unit 204b selects the reference color component only from the edge information of the partial area. The color component having the sharpest edge is used as a reference color component with the strength of the edge (absolute value of the spatial differentiation of the pixel value), the width of the edge, etc. as indices. When no edge exists in all color components, G is set as a reference color component. R or B may be a reference color component.

ステップS108では、リファレンス取得部204cは、リファレンス色成分に基づいてリファレンス画像を取得する。部分領域のリファレンス色成分をそのままリファレンス画像としてもよいし、部分領域のリファレンス色成分に対して光学的劣化の補正を施した画像をリファレンス画像としてもよい。リファレンス画像の生成に用いる光学的劣化の補正は、例えば、Wienerフィルタや式(1)で表される最適化処理などで実行することができる。式(1)を用いる場合、例えば、損失関数には式(2)を、正則化関数には式(3)の第1項を使用すればよい。補正に使用するPSF(またはOTF)は、ステップS104またはステップS106で取得した光学特性のリファレンス色成分である。また、光学的劣化の補正を行った画像をリファレンス画像とする場合、ステップS108の処理を行う前にあらかじめ光学特性を用いて撮影画像全体の光学的劣化を補正した画像を生成しておけばよい。そして、生成した画像から部分領域に該当する部分を抽出する(抽出するのはリファレンス色成分のみ)ことで、リファレンス画像を取得してもよい。   In step S108, the reference acquisition unit 204c acquires a reference image based on the reference color component. The reference color component of the partial area may be used as it is as a reference image, or an image obtained by correcting optical degradation for the reference color component of the partial area may be used as the reference image. The optical deterioration correction used for generating the reference image can be executed by, for example, a Wiener filter or an optimization process represented by Expression (1). When using Expression (1), for example, Expression (2) may be used for the loss function, and the first term of Expression (3) may be used for the regularization function. The PSF (or OTF) used for correction is the reference color component of the optical characteristics acquired in step S104 or step S106. In addition, when an image subjected to optical degradation correction is used as a reference image, an image in which optical degradation of the entire captured image is corrected using optical characteristics may be generated in advance before performing the process of step S108. . Then, the reference image may be acquired by extracting a portion corresponding to the partial region from the generated image (only the reference color component is extracted).

ステップS109では、補正部204dは、リファレンス画像と光学特性とを用いて、部分領域のリファレンス色成分を除く色成分に対して、光学的劣化の補正を行う。この際、補正される色成分のエッジの幅と、リファレンス画像のエッジの幅との差異が低減するように補正が行われる。具体的には、式(2)の損失関数と式(3)の正則化関数とを用いた式(1)の最適化問題を解くことで、補正を行うことができる。補正に使用するPSF(またははOTF)は、ステップS104またはステップS106で取得した光学特性の補正対象としている色成分に対応している。   In step S109, the correction unit 204d corrects optical degradation for the color components excluding the reference color component in the partial region using the reference image and the optical characteristics. At this time, the correction is performed so that the difference between the edge width of the color component to be corrected and the edge width of the reference image is reduced. Specifically, the correction can be performed by solving the optimization problem of Expression (1) using the loss function of Expression (2) and the regularization function of Expression (3). The PSF (or OTF) used for correction corresponds to the color component that is the correction target of the optical characteristics acquired in step S104 or step S106.

また、各色成分に対して倍率色収差補正を行った後、光学的劣化を補正することが望ましい。補正はリファレンス画像のエッジに合わせるように行われるため、倍率色収差によって色ごとにエッジ位置がずれていると、偽エッジ生成の原因となる。   In addition, it is desirable to correct optical deterioration after correcting chromatic aberration of magnification for each color component. Since the correction is performed so as to match the edge of the reference image, if the edge position is shifted for each color due to the chromatic aberration of magnification, a false edge is generated.

また、リファレンス色成分と補正対象の色成分の光学特性とに基づいて、補正に対するリファレンス画像の重みを決定すればよい。エッジ情報を用いてリファレンス色成分を決定し、かつ補正対象の色成分の性能値がリファレンス色成分よりも高い場合、補正対象の色成分は光学的劣化によってエッジがぼけているのではなく、もともと被写体にその色のエッジがないことを意味する。したがって、リファレンス画像に合わせて補正を行うと、偽エッジが生成されるため、補正に対するリファレンス画像の重みを下げてもよいし、重みをゼロ(補正時にリファレンス画像を使用しない)にしてもよい。例えば、式(3)の正則化関数を用いて補正を行う場合、βが補正に対するリファレンス画像の重みである。同様に、全ての色成分でエッジがないと判定された部分領域に対しては、補正に対するリファレンス画像の重みを下げてもよいし、リファレンス画像を補正に使用しなくてもよい。リファレンス画像は、エッジの補正効果向上を目的に使用するため、エッジがない領域では参照する必要がない。   Further, the weight of the reference image for correction may be determined based on the reference color component and the optical characteristics of the color component to be corrected. When the reference color component is determined using edge information, and the performance value of the correction target color component is higher than the reference color component, the correction target color component is not originally blurred due to optical deterioration, and is originally This means that the subject has no edge of that color. Accordingly, when correction is performed in accordance with the reference image, a false edge is generated. Therefore, the weight of the reference image for correction may be lowered, or the weight may be zero (the reference image is not used during correction). For example, when correction is performed using the regularization function of Expression (3), β is the weight of the reference image for correction. Similarly, for a partial region determined to have no edge in all color components, the weight of the reference image for correction may be lowered, or the reference image may not be used for correction. Since the reference image is used for the purpose of improving the edge correction effect, it is not necessary to refer to the reference image in an area where there is no edge.

なお、部分領域の全ての色成分でエッジがない場合、リファレンス色成分の選択、およびリファレンス画像の取得を行わずに各色成分における光学的劣化を補正してもよい。   If there is no edge in all the color components of the partial area, the optical degradation in each color component may be corrected without selecting the reference color component and acquiring the reference image.

ステップS110では、補正部204dは、所定の部分領域を全て補正したかどうかを判定する。所定の部分領域は任意であり、例えば撮影画像全体でもよい。所定の部分領域を全て補正した場合はステップS111に進み、補正していない場合はステップS102に戻り、新たな部分領域を取得して補正を行う。   In step S110, the correction unit 204d determines whether or not all the predetermined partial areas have been corrected. The predetermined partial area is arbitrary, and may be the entire captured image, for example. If all the predetermined partial areas have been corrected, the process proceeds to step S111. If not corrected, the process returns to step S102 to acquire and correct a new partial area.

ステップS111では、補正部204dは、カラー画像を生成する。カラー画像とは、光学的劣化が補正された部分領域を配列した画像である。ステップS110において、所定の部分領域が撮影画像全体だった場合、カラー画像は撮影画像全体で光学的劣化が補正された画像である。補正部104dは、必要に応じてデモザイキング処理、ホワイトバランス調整、シェーディング補正、およびγ補正などの処理を実行してカラー画像を生成する。   In step S111, the correction unit 204d generates a color image. A color image is an image in which partial areas in which optical degradation is corrected are arranged. In step S110, when the predetermined partial area is the entire captured image, the color image is an image in which optical degradation is corrected in the entire captured image. The correction unit 104d generates a color image by performing processing such as demosaicing processing, white balance adjustment, shading correction, and γ correction as necessary.

以上説明したように、本実施例の撮像装置200は、撮影画像の光学的劣化を高精度に補正することができる。   As described above, the imaging apparatus 200 according to the present embodiment can correct optical degradation of a captured image with high accuracy.

図4は、本発明の光学的劣化の補正処理を実行する画像処理装置1003を含む画像処理システムの外観図である。図5は、画像処理システムのブロック図である。   FIG. 4 is an external view of an image processing system including an image processing apparatus 1003 that executes the optical deterioration correction process of the present invention. FIG. 5 is a block diagram of the image processing system.

撮像装置1001の構成は、図1を参照して説明した実施例1の撮像装置200の構成と同様である。実施例1では、撮像装置200に内蔵された画像処理部204が光学的劣化の補正処理を行う。一方、本実施例では、撮像装置200とは異なる装置である画像処理装置1003が光学的劣化の補正処理を実行する。画像処理装置1003は、記憶部1003a、入力データ取得部1003b、選択部1003c、リファレンス取得部1003d、および補正部1003eを備える。画像処理装置1003は、撮像装置1001から撮影画像を取得し、記憶部1003aに記憶された撮像装置1001の撮像光学系の光学特性を用いて光学的劣化の補正処理を実行する。表示部1002は、画像処理装置1003により補正された撮影画像を表示する。   The configuration of the imaging apparatus 1001 is the same as the configuration of the imaging apparatus 200 of Example 1 described with reference to FIG. In the first embodiment, the image processing unit 204 built in the imaging apparatus 200 performs optical deterioration correction processing. On the other hand, in the present embodiment, the image processing apparatus 1003, which is an apparatus different from the imaging apparatus 200, executes optical deterioration correction processing. The image processing apparatus 1003 includes a storage unit 1003a, an input data acquisition unit 1003b, a selection unit 1003c, a reference acquisition unit 1003d, and a correction unit 1003e. The image processing apparatus 1003 acquires a captured image from the imaging apparatus 1001 and executes optical deterioration correction processing using the optical characteristics of the imaging optical system of the imaging apparatus 1001 stored in the storage unit 1003a. A display unit 1002 displays the captured image corrected by the image processing apparatus 1003.

以下、図6を参照して、画像処理装置1003が実行する光学的劣化の補正処理について説明する。図6は、画像処理装置1003が実行する光学的劣化の補正処理を示すフローチャートである。実施例1と同様の処理については、説明を省略する。   Hereinafter, with reference to FIG. 6, the optical deterioration correction process executed by the image processing apparatus 1003 will be described. FIG. 6 is a flowchart showing optical deterioration correction processing executed by the image processing apparatus 1003. The description of the same processing as in the first embodiment is omitted.

ステップS201では、入力データ取得部1003bは、撮像装置1001から撮影画像を取得する。撮影画像は、複数の色成分を有する。   In step S <b> 201, the input data acquisition unit 1003 b acquires a captured image from the imaging device 1001. The captured image has a plurality of color components.

ステップS202では、入力データ取得部1003bは、撮影画像から部分領域を取得する。   In step S202, the input data acquisition unit 1003b acquires a partial region from the captured image.

ステップS203では、入力データ取得部1003bは、部分領域に対応する光学特性を記憶部1003aから取得する。入力データ取得部1003bは、撮影画像に付随したExif情報から取得できる撮影時の撮像装置1001の撮影状態と、撮影画像に対する部分領域の位置とに基づいて、部分領域に対応する光学特性を特定する。   In step S203, the input data acquisition unit 1003b acquires the optical characteristics corresponding to the partial area from the storage unit 1003a. The input data acquisition unit 1003b specifies the optical characteristics corresponding to the partial area based on the shooting state of the imaging device 1001 at the time of shooting that can be acquired from the Exif information attached to the shot image and the position of the partial area with respect to the shot image. .

ステップS204では、選択部1003cは、光学特性に基づいてリファレンス色成分を選択する。選択部1003cは、性能値が最も高い色成分をリファレンス色成分として選択する。本実施例では、光学特性はOTFであり、選択部1003cはOTFの絶対値であるMTFから性能値を取得する。図7は、撮像装置1001の撮像光学系のレンズ断面図であり、図8は撮像光学系のMTFを空間周波数に対してプロットしたグラフである。GのMTFは、RとBのMTFに対して全周波数で高くなっている。したがって、選択部1003cは、Gをリファレンス色成分として選択する。また、選択部1003cは、PSFから性能値を決定してもよい。図9は、撮像光学系および撮像素子の白色光源に対するPSFの断面図である。図9(a)〜図9(c)はそれぞれ、R、GおよびBに対するPSFの断面図である。これらの図におけるPSFのピーク値や半値幅に基づいて、Gが最も性能が高いことが判定できる。   In step S204, the selection unit 1003c selects a reference color component based on the optical characteristics. The selection unit 1003c selects the color component having the highest performance value as the reference color component. In this embodiment, the optical characteristic is OTF, and the selection unit 1003c acquires the performance value from the MTF that is the absolute value of the OTF. FIG. 7 is a lens cross-sectional view of the imaging optical system of the imaging apparatus 1001, and FIG. 8 is a graph plotting the MTF of the imaging optical system against the spatial frequency. The G MTF is higher at all frequencies than the R and B MTFs. Therefore, the selection unit 1003c selects G as a reference color component. The selection unit 1003c may determine a performance value from the PSF. FIG. 9 is a cross-sectional view of the PSF with respect to the white light source of the imaging optical system and the imaging device. 9A to 9C are cross-sectional views of the PSF with respect to R, G, and B, respectively. Based on the PSF peak value and half-value width in these figures, it can be determined that G has the highest performance.

ステップS205では、リファレンス取得部1003dは、リファレンス画像を取得する。リファレンス取得部1003dは、部分領域のG成分をそのままリファレンス画像として取得してもよいし、Gの光学特性を用いて光学的劣化を補正した画像をリファレンス画像として取得してもよい。   In step S205, the reference acquisition unit 1003d acquires a reference image. The reference acquisition unit 1003d may acquire the G component of the partial region as it is as a reference image, or may acquire an image in which optical degradation is corrected using G optical characteristics as a reference image.

ステップS206では、補正部1003eは、リファレンス画像と光学特性とを用いて、部分領域のリファレンス色成分以外の色成分に対して、光学的劣化の補正を行う。図10は、補正前後の撮影画像の部分領域におけるRの画素値の断面図である。光学的劣化のない被写体(正解画像)に対して、図9(a)に示される撮像光学系のRに対するPSFが畳み込まれた撮影画像が補正前の撮影画像である。リファレンス画像を用いて補正を行うことで、図10に示される補正後の撮影画像のように画素値が補正される。   In step S206, the correction unit 1003e corrects optical degradation for color components other than the reference color component in the partial region using the reference image and the optical characteristics. FIG. 10 is a cross-sectional view of an R pixel value in a partial region of a captured image before and after correction. A photographed image in which a PSF for R of the imaging optical system shown in FIG. 9A is convoluted with respect to a subject (correct image) without optical deterioration is a photographed image before correction. By performing the correction using the reference image, the pixel value is corrected as in the corrected captured image shown in FIG.

ステップS207では、補正部1003eは、所定の部分領域を全て補正したかどうかを判定する。所定の部分領域を全て補正した場合はステップS208に進み、補正していない場合はステップS202に戻り、新たな部分領域を取得して補正を行う。   In step S207, the correction unit 1003e determines whether or not all the predetermined partial areas have been corrected. If all the predetermined partial areas have been corrected, the process proceeds to step S208. If not corrected, the process returns to step S202 to acquire and correct a new partial area.

ステップS208では、補正部1003eは、補正された部分領域を配列してカラー画像を生成する。   In step S208, the correction unit 1003e generates a color image by arranging the corrected partial areas.

以上説明したように、本実施例の画像処理システムは、撮影画像の光学的劣化を高精度に補正することができる。   As described above, the image processing system of the present embodiment can correct optical degradation of a captured image with high accuracy.

なお、実施例1および実施例2で説明した光学的劣化の補正処理はそれぞれ、実施例2のシステムおよび実施例1の撮像装置で実施することができる。   The optical deterioration correction processing described in the first and second embodiments can be performed by the system of the second embodiment and the imaging apparatus of the first embodiment, respectively.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

204 画像処理部(画像処理装置)
204a 入力データ取得部
204b 選択部
204c リファレンス取得部
204d 補正部
204 Image processing unit (image processing apparatus)
204a Input data acquisition unit 204b Selection unit 204c Reference acquisition unit 204d Correction unit

Claims (15)

複数の色成分を有する撮影画像と、前記撮影画像の撮影に用いた撮像光学系の光学特性と、を取得する入力データ取得工程と、
前記光学特性、または前記撮影画像の色成分ごとのエッジ情報の少なくとも一方を用いて、前記色成分からリファレンス色成分を選択する選択工程と、
前記リファレンス色成分に基づいて、リファレンス画像を取得するリファレンス取得工程と、
前記リファレンス画像と前記光学特性とを用いて、前記色成分におけるエッジの幅と前記リファレンス画像におけるエッジの幅との差異が低減するように、前記色成分における光学的劣化を補正する補正工程と、を有することを特徴とする画像処理方法。
An input data acquisition step for acquiring a captured image having a plurality of color components, and optical characteristics of an imaging optical system used for capturing the captured image;
A selection step of selecting a reference color component from the color component using at least one of the optical characteristics or edge information for each color component of the captured image;
A reference acquisition step for acquiring a reference image based on the reference color component;
Using the reference image and the optical characteristics, a correction step of correcting optical deterioration in the color component so that a difference between an edge width in the color component and an edge width in the reference image is reduced; An image processing method comprising:
前記選択工程は、前記撮影画像を分割した複数の部分領域のそれぞれに対して、前記リファレンス色成分を選択することを特徴とする請求項1に記載の画像処理方法。   The image processing method according to claim 1, wherein the selecting step selects the reference color component for each of a plurality of partial regions obtained by dividing the captured image. 前記選択工程は、前記撮像光学系における前記色成分ごとの性能値を前記光学特性から取得し、前記性能値に基づいて前記リファレンス色成分を選択することを特徴とする請求項1または2に記載の画像処理方法。   The said selection process acquires the performance value for every said color component in the said imaging optical system from the said optical characteristic, The said reference color component is selected based on the said performance value, The Claim 1 or 2 characterized by the above-mentioned. Image processing method. 前記性能値は、点像強度分布関数のピーク値、半値幅、および分散、または所定の空間周波数における変調伝達関数の値のうち、いずれかを含むことを特徴とする請求項3に記載の画像処理方法。   The image according to claim 3, wherein the performance value includes any one of a peak value, a half-value width, and a dispersion of a point spread function, or a value of a modulation transfer function at a predetermined spatial frequency. Processing method. 前記選択工程は、前記エッジ情報を用いて前記リファレンス色成分を選択し、
前記補正工程は、補正が行われる色成分と前記リファレンス色成分の前記光学特性とに基づいて、補正に対する前記リファレンス画像の重みを決定することを特徴とする請求項1から4のいずれか1項に記載の画像処理方法。
The selection step selects the reference color component using the edge information,
5. The weight of the reference image for correction is determined based on a color component to be corrected and the optical characteristic of the reference color component in the correction step. An image processing method described in 1.
前記選択工程は、前記エッジ情報を用いて前記リファレンス色成分を選択し、
前記補正工程は、前記撮像光学系における色成分の性能値を前記光学特性から取得し、前記リファレンス色成分の性能値より補正が行われる色成分の性能値が大きい場合、補正に対する前記リファレンス画像の重みを小さくする、または前記リファレンス画像を補正に使用しないことを特徴とする請求項1から5のいずれか1項に記載の画像処理方法。
The selection step selects the reference color component using the edge information,
The correction step acquires the performance value of the color component in the imaging optical system from the optical characteristics, and when the performance value of the color component to be corrected is larger than the performance value of the reference color component, The image processing method according to claim 1, wherein a weight is reduced or the reference image is not used for correction.
前記選択工程は、倍率色収差補正が行われた前記エッジ情報を用いることを特徴とする請求項1から6のいずれか1項に記載の画像処理方法。   The image processing method according to claim 1, wherein the selection step uses the edge information that has been subjected to magnification chromatic aberration correction. 前記補正工程は、倍率色収差補正が行われた前記色成分に対して、前記光学的劣化の補正を行うことを特徴とする請求項1から7のいずれか1項に記載の画像処理方法。   8. The image processing method according to claim 1, wherein the correction step corrects the optical deterioration with respect to the color component that has been subjected to magnification chromatic aberration correction. 9. 前記補正工程で用いられる前記光学特性は、前記色成分に対応した前記撮像光学系の点像強度分布関数であることを特徴とする請求項1から8のいずれか1項に記載の画像処理方法。   The image processing method according to claim 1, wherein the optical characteristic used in the correction step is a point image intensity distribution function of the imaging optical system corresponding to the color component. . 前記エッジ情報は、エッジの強度、または幅を含むことを特徴とする請求項1から9のいずれか1項に記載の画像処理方法。 The image processing method according to claim 1, wherein the edge information includes edge strength or width. 前記光学特性は、前記撮影画像を撮影した際の撮影距離、前記撮像光学系の絞り値、または焦点距離のうちいずれかを用いて決定されることを特徴とする請求項1から10のいずれか1項に記載の画像処理方法。   11. The optical characteristic according to claim 1, wherein the optical characteristic is determined using any one of a photographing distance when the photographed image is photographed, an aperture value of the imaging optical system, and a focal length. 2. The image processing method according to item 1. 複数の色成分を有する撮影画像と、前記撮影画像の撮影に用いた撮像光学系の光学特性と、を取得する入力データ取得部と、
前記光学特性、または前記撮影画像の色成分ごとのエッジ情報の少なくとも一方を用いて、前記色成分からリファレンス色成分を選択する選択部と、
前記リファレンス色成分に基づいて、リファレンス画像を生成するリファレンス取得部と、
前記リファレンス画像と前記光学特性を用いて、前記色成分におけるエッジの幅と前記リファレンス画像におけるエッジの幅との差異が低減するように、前記色成分における光学的劣化を補正する補正部と、を有することを特徴とする画像処理装置。
An input data acquisition unit that acquires a captured image having a plurality of color components, and optical characteristics of an imaging optical system used for capturing the captured image;
A selection unit that selects a reference color component from the color component using at least one of the optical characteristics or edge information for each color component of the captured image;
A reference acquisition unit that generates a reference image based on the reference color component;
A correction unit that corrects optical deterioration in the color component so that a difference between an edge width in the color component and an edge width in the reference image is reduced using the reference image and the optical characteristics; An image processing apparatus comprising:
被写体空間の像を結像する撮像光学系と、
異なる色成分を有する複数の画素を有し、前記像を撮影画像として取得する撮像素子と、
請求項12に記載の画像処理装置と、を有することを特徴とする撮像装置。
An imaging optical system that forms an image of the subject space;
An image sensor having a plurality of pixels having different color components and acquiring the image as a captured image;
An image processing apparatus comprising: the image processing apparatus according to claim 12.
コンピュータに請求項1から11のいずれか1項に記載の画像処理方法を実行させることを特徴とする画像処理プログラム。   An image processing program for causing a computer to execute the image processing method according to any one of claims 1 to 11. 請求項14に記載の画像処理プログラムを記録したコンピュータが読み取り可能な記録媒体。
A computer-readable recording medium on which the image processing program according to claim 14 is recorded.
JP2016230127A 2016-11-28 2016-11-28 Image processing method and image processing apparatus Pending JP2018088587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016230127A JP2018088587A (en) 2016-11-28 2016-11-28 Image processing method and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016230127A JP2018088587A (en) 2016-11-28 2016-11-28 Image processing method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2018088587A true JP2018088587A (en) 2018-06-07
JP2018088587A5 JP2018088587A5 (en) 2020-01-09

Family

ID=62494660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016230127A Pending JP2018088587A (en) 2016-11-28 2016-11-28 Image processing method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP2018088587A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020184735A (en) * 2019-05-09 2020-11-12 株式会社デンソー Verification method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020184735A (en) * 2019-05-09 2020-11-12 株式会社デンソー Verification method
JP7268471B2 (en) 2019-05-09 2023-05-08 株式会社デンソー Method of verification

Similar Documents

Publication Publication Date Title
US8754957B2 (en) Image processing apparatus and method
JP5681954B2 (en) Imaging apparatus and imaging system
RU2523028C2 (en) Image processing device, image capturing device and image processing method
EP3093818B1 (en) Image processing apparatus that performs image restoration processing, method of controlling the same, and storage medium
US8824824B2 (en) Image processing apparatus, imaging apparatus, image processing method, and recording medium storing program
JP5709911B2 (en) Image processing method, image processing apparatus, image processing program, and imaging apparatus
KR101368715B1 (en) Image processing apparatus, image processing method, and storage medium
US8849055B2 (en) Image processing apparatus and method
KR20190089922A (en) Digital calibration of optical system aberrations
US20160080727A1 (en) Depth measurement apparatus, imaging apparatus, and depth measurement method
JP2014027570A (en) Image processing method, image processing program, image processor and imaging device
US10291899B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for generating restored image
US20150161771A1 (en) Image processing method, image processing apparatus, image capturing apparatus and non-transitory computer-readable storage medium
JP5730036B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program.
JP2012156715A (en) Image processing device, imaging device, image processing method, and program
JP2014150423A (en) Imaging device, image processing device, image processing method, image processing program, and storage medium
JP5425135B2 (en) Image processing method, image processing apparatus, imaging apparatus, and image processing program
JP6682184B2 (en) Image processing method, image processing program, image processing device, and imaging device
JP2018088587A (en) Image processing method and image processing apparatus
JP6436840B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP7009219B2 (en) Image processing method, image processing device, image pickup device, image processing program, and storage medium
JP2017050662A (en) Image processing system, imaging apparatus, and image processing program
JP6486076B2 (en) Image processing apparatus and image processing method
JP2015119428A (en) Image processing method, image processor, imaging device, image processing program, and storage medium
JP2015198380A (en) Image processing system, imaging apparatus, image processing program, and image processing method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191121

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200528

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200707

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20210105