JPWO2011132279A1 - Image processing apparatus, method, and recording medium - Google Patents

Image processing apparatus, method, and recording medium Download PDF

Info

Publication number
JPWO2011132279A1
JPWO2011132279A1 JP2012511453A JP2012511453A JPWO2011132279A1 JP WO2011132279 A1 JPWO2011132279 A1 JP WO2011132279A1 JP 2012511453 A JP2012511453 A JP 2012511453A JP 2012511453 A JP2012511453 A JP 2012511453A JP WO2011132279 A1 JPWO2011132279 A1 JP WO2011132279A1
Authority
JP
Japan
Prior art keywords
image
blur
colors
correction
raw
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
JP2012511453A
Other languages
Japanese (ja)
Inventor
信彦 田村
信彦 田村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Publication of JPWO2011132279A1 publication Critical patent/JPWO2011132279A1/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/61Noise processing, e.g. detecting, correcting, reducing or removing noise the noise originating only from the lens unit, e.g. flare, shading, vignetting or "cos4"
    • H04N25/611Correction of chromatic aberration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/12Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with one sensor only
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/843Demosaicing, e.g. interpolating colour pixel values
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N2209/00Details of colour television systems
    • H04N2209/04Picture signal generators
    • H04N2209/041Picture signal generators using solid-state devices
    • H04N2209/042Picture signal generators using solid-state devices having a single pick-up sensor
    • H04N2209/045Picture signal generators using solid-state devices having a single pick-up sensor using mosaic colour filter
    • H04N2209/046Colour interpolation to calculate the missing colour values
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/10Circuitry of solid-state image sensors [SSIS]; Control thereof for transforming different wavelengths into image signals
    • H04N25/11Arrangement of colour filter arrays [CFA]; Filter mosaics
    • H04N25/13Arrangement of colour filter arrays [CFA]; Filter mosaics characterised by the spectral characteristics of the filter elements
    • H04N25/134Arrangement of colour filter arrays [CFA]; Filter mosaics characterised by the spectral characteristics of the filter elements based on three different wavelength filter elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

撮像光学系のぼけ補正の際にデモザイクによって撮像画像のぼけ特性が変わる結果、良好なぼけ補正が行えない。RAWデータを入力し、複数の色それぞれに対して、RAWデータで示されるRAW画像のぼけを補正するための補正係数を取得し、複数の色それぞれに対して取得された補正係数に基づいてRAWデータで示されるRAW画像のぼけを補正し、補正画像を取得し、取得された複数の補正画像をデモザイク処理し、出力画像データを生成する。As a result of the blur characteristics of the captured image being changed by demosaicing when blur correction of the imaging optical system is performed, good blur correction cannot be performed. RAW data is input, a correction coefficient for correcting blur of the RAW image indicated by the RAW data is acquired for each of a plurality of colors, and the RAW data is acquired based on the correction coefficients acquired for each of the plurality of colors. The blur of the RAW image indicated by the data is corrected, a corrected image is acquired, the plurality of acquired corrected images are demosaiced, and output image data is generated.

Description

本発明は、撮影画像のぼけを補正する画像回復処理に関する。   The present invention relates to an image restoration process for correcting blur of a captured image.

デジタルカメラ、デジタルビデオカメラなどの撮像装置において、被写体からの光は、レンズ等で構成される撮像光学系を介して、CCDやCMOS等の複数の素子を有するセンサに入射される。センサにおいて、撮像光学系を通った光は電気信号に変換される。この電気信号に対して、A/D変換処理やデモザイク処理などの画像化するために必要な処理を施すことで、撮影画像を得る事ができる。   In an imaging apparatus such as a digital camera or a digital video camera, light from a subject is incident on a sensor having a plurality of elements such as a CCD and a CMOS through an imaging optical system including a lens. In the sensor, light passing through the imaging optical system is converted into an electrical signal. A captured image can be obtained by performing processing necessary for imaging such as A / D conversion processing and demosaic processing on the electric signal.

さて、この撮影画像の画質は撮像光学系の影響を受ける。一般的に、高性能なレンズを使用した場合は、ぼけの小さい、くっきりとした画像を得ることが出来る。逆に、性能が良くないレンズを使用した場合に得られる撮像画像はぼけている。例として、星空を撮影した場合、ぼけの小さいレンズを用いて撮影した画像は、星の一つ一つがくっきりとした点のようになる。逆に、ぼけの大きいレンズを用いて撮影した画像は、星が一点ではなく広がりをもってぼけている。   Now, the image quality of the captured image is affected by the imaging optical system. In general, when a high-performance lens is used, a clear image with small blur can be obtained. Conversely, the captured image obtained when using a lens with poor performance is blurred. As an example, when shooting a starry sky, an image shot using a lens with a small blur is like a point where each star is clear. Conversely, in an image taken using a lens with a large blur, the stars are blurred with a spread rather than a single point.

以下、撮像光学系に起因する撮像画像のぼけを補正する画像処理方法を説明する。この方法では、点像分布関数(PSF:Point Spread Function)に基づいて撮像画像のぼけを補正する。このPSFは、被写体の一点がどの様にぼけるかを表したものである。例えば、暗黒下で体積が非常に小さい発光体(点光源)を撮影した場合のセンサ面上での光の2次元的分布が、かかる撮像光学系のPSFに該当する。   Hereinafter, an image processing method for correcting blurring of a captured image caused by the imaging optical system will be described. In this method, blurring of a captured image is corrected based on a point spread function (PSF). This PSF represents how one point of the subject is blurred. For example, a two-dimensional distribution of light on the sensor surface when a light emitting body (point light source) having a very small volume is photographed in the dark corresponds to the PSF of the imaging optical system.

ぼけの小さい理想的な撮像光学系ではPSFは一点であり、ぼけの大きい撮像光学系ではPSFは小さな一点ではなく、ある程度の広がりを持っている。   In an ideal imaging optical system with small blur, the PSF is one point, and in an imaging optical system with large blur, the PSF is not a small point but has a certain extent.

このPSFに係るデータを用いてぼけを補正する方法に、逆フィルタによる方法がある。以下、逆フィルタの構成方法について説明する。ぼけを生じさせない理想的な撮像光学系を用いて撮影した撮影画像をf(x,y)とする。x,yは撮像画像の二次元上の位置を示す変数であり、f(x,y)は位置x,yでの画素値を表している。一方で、ぼけを生じさせる撮像光学系で撮影した撮影画像をg(x,y)とする。また、前記のぼけを生じさせる撮像光学系のPSFをh(x、y)とする。このh(x、y)は、例えば、レンズの特性、撮影パラメータ(絞り径、物***置、ズーム位置など)、センサのカラーフィルターの透過率などによって決定される。また、点光源を撮像した場合のセンサ面上での光の二次元分布を測定することによってh(x、y)を決定しても良い。f(x、y),g(x、y),h(x、y)には次の関係が成り立つ。
g(x,y)=h(x,y)*f(x,y) ・・・(1)
*はコンボリューション(畳込積分)を意味している。ぼけを補正することは、ぼけを生じさせる撮像光学系で撮影した撮像画像g(x、y)と、かかる撮像光学系のPSFであるh(x、y)とから、理想的な撮像光学系で取得したf(x、y)を推定することと言い換えることもできる。
As a method for correcting blur using data related to the PSF, there is a method using an inverse filter. Hereinafter, a configuration method of the inverse filter will be described. A captured image captured using an ideal imaging optical system that does not cause blur is defined as f (x, y). x and y are variables indicating the two-dimensional position of the captured image, and f (x, y) represents the pixel value at the position x and y. On the other hand, a photographed image photographed with an imaging optical system that causes blurring is denoted by g (x, y). Further, the PSF of the imaging optical system that causes the blur is h (x, y). This h (x, y) is determined by, for example, lens characteristics, photographing parameters (diaphragm diameter, object position, zoom position, etc.), transmittance of a color filter of the sensor, and the like. Alternatively, h (x, y) may be determined by measuring a two-dimensional light distribution on the sensor surface when a point light source is imaged. The following relationship holds for f (x, y), g (x, y), and h (x, y).
g (x, y) = h (x, y) * f (x, y) (1)
* Means convolution (convolution integration). The correction of blur is an ideal imaging optical system based on a captured image g (x, y) captured by the imaging optical system that causes blur and h (x, y) that is a PSF of the imaging optical system. In other words, f (x, y) obtained in (1) can be estimated.

実面で表現されている式1をフーリエ変換して空間周波数面での表示形式に変換すると、以下の式のように周波数ごとの積の形式になる。
G(u,v)=H(u,v)・F(u,v) ・・・(2)
H(u,v)はPSFであるh(x、y)をフーリエ変換したものであり、光学伝達関数(OTF:Optical Transfer Function)と呼ばれている。u,vは2次元周波数面での座標、即ち周波数を示す。G(u,v)はg(x、y)のフーリエ変換したもの(フーリエ表示)であり、F(u,v)はf(x、y)のフーリエ変換したものである。
When Formula 1 expressed in the actual plane is Fourier-transformed and converted into a display format on the spatial frequency plane, a product format for each frequency is obtained as shown in the following formula.
G (u, v) = H (u, v) · F (u, v) (2)
H (u, v) is a Fourier transform of h (x, y), which is a PSF, and is called an optical transfer function (OTF: Optical Transfer Function). u and v represent coordinates on a two-dimensional frequency plane, that is, frequencies. G (u, v) is a Fourier transform of g (x, y) (Fourier display), and F (u, v) is a Fourier transform of f (x, y).

ぼけのある撮影画像から、ぼけのない理想的な画像を得るためには、以下のように両辺をHで除算すればよい。
G(u,v)/H(u,v)=F(u,v) ・・・(3)
このF(u,v)を逆フーリエ変換して実面に戻すことで、ぼけのない理想的な画像f(x,y)を回復画像として得ることができる。
In order to obtain an ideal image without blur from a blurred photographed image, both sides may be divided by H as follows.
G (u, v) / H (u, v) = F (u, v) (3)
An ideal image f (x, y) without blur can be obtained as a restored image by performing inverse Fourier transform on this F (u, v) and returning it to the actual surface.

ここで、式3におけるHの逆数(H−1)を逆フーリエ変換したものをRとすると、以下の式のように実面での画像に対するコンボリューションを行うことで同様にぼけのない画像が得られる。
g(x,y)*R(x,y)=f(x,y) ・・・(4)
このR(x,y)を逆フィルタと呼ぶ。実際には、H(u,v)が0になる周波数(u,v)が存在する場合がある。H(u,v)が0となる周波数においては、式(3)においてゼロでの除算が発生し、計算が不能となる。
Here, if the inverse of H (H −1 ) in Equation 3 is inverse Fourier transformed, and R is R, an image without blur is similarly obtained by performing convolution on the actual image as in the following equation. can get.
g (x, y) * R (x, y) = f (x, y) (4)
This R (x, y) is called an inverse filter. In practice, there may be a frequency (u, v) at which H (u, v) becomes zero. At a frequency at which H (u, v) is 0, division by zero occurs in equation (3), making calculation impossible.

また、通常、OTFは高周波ほど値が小さくなるため、その逆数である逆フィルタR(x,y)は高周波ほど値が大きくなる。従って、逆フィルタを用いてぼけのある撮影画像にコンボリューション処理を行うと、撮影画像の高周波成分が強調されることとなる。実際の撮像画像ではノイズも含まれており、かつ、ノイズは一般的に高周波であるため、逆フィルタではノイズを強調してしまう場合がある。   In general, since the value of OTF decreases as the frequency increases, the inverse filter R (x, y), which is the reciprocal thereof, increases in value as the frequency increases. Therefore, when a convolution process is performed on a blurred photographed image using an inverse filter, the high frequency component of the photographed image is enhanced. In an actual captured image, noise is also included, and since noise is generally high frequency, the inverse filter may emphasize noise.

以上のようなゼロでの除算が発生してしまうことによる計算の不能を解消したり、高周波ノイズを強調しすぎないように、逆フィルタR(x,y)を式変形したウィナーフィルタが提案されている。以降では、逆フィルタやウィナーフィルタ等のぼけの補正で用いるフィルタを画像回復フィルタと呼ぶ。   There has been proposed a Wiener filter in which the inverse filter R (x, y) is modified so as not to eliminate the inability to calculate due to the occurrence of division by zero as described above or to emphasize high-frequency noise too much. ing. Hereinafter, a filter used for blur correction such as an inverse filter or a Wiener filter is referred to as an image restoration filter.

さて、デジタルカメラやデジタルビデオカメラなどの撮像装置の多くは、CCDやCMOS等の複数の素子を有するセンサの前に特定の複数の色からなるカラーフィルタを配置し、色情報を取得している。この方式を単版式と呼ぶ。単版式デジタルカメラ、単版式デジタルビデオカメラに用いる典型的なカラーフィルタ配列としてベイヤー配列がある。単版式の撮像装置の場合、特定の色のカラーフィルタに対応する素子からは他の色の信号を得ることはできない。そのため、他の色の信号は近隣の素子からの信号からの補間によって求めている。この補間処理をデモザイク処理(デモザイキング処理)と呼ぶ。以降ではデモザイク処理前の画像をRAWデータと呼ぶ。   Many imaging devices such as digital cameras and digital video cameras acquire color information by arranging a color filter composed of a plurality of specific colors in front of a sensor having a plurality of elements such as a CCD and a CMOS. . This method is called a single plate type. There is a Bayer array as a typical color filter array used for a single digital camera and a single digital video camera. In the case of a monolithic imaging apparatus, signals of other colors cannot be obtained from elements corresponding to a color filter of a specific color. Therefore, signals of other colors are obtained by interpolation from signals from neighboring elements. This interpolation processing is called demosaicing processing (demosaicing processing). Hereinafter, an image before demosaic processing is referred to as RAW data.

特開2002−199410JP2002-199410

絞り径やズーム位置などの撮影状態に応じてOTFは変動する。従って、画像回復処理に用いる画像回復フィルタも、撮影状態に応じて変更する必要がある。撮像装置によって取得された画像データに対して、画質向上のために、ガンマ処理や色変換処理などの各種画像処理が施されるが、画像回復処理とその他の処理の順序によって、画像回復処理の効果が低減する場合がある。   The OTF varies depending on the shooting state such as the aperture diameter and zoom position. Therefore, the image restoration filter used for the image restoration process also needs to be changed according to the shooting state. Various image processing such as gamma processing and color conversion processing is performed on the image data acquired by the imaging device in order to improve image quality. Depending on the order of image recovery processing and other processing, image recovery processing The effect may be reduced.

例えば、画像回復処理の前に、色変換処理を施すと、実質的に入力画像のぼけ特性が変化する。特にRチャネルがぼけるような撮像光学系で撮影された画像を色変換処理すると、チャネル間で画像が混合され、Rチャネル以外のG、Bチャネルの画像もぼける。その結果、G,Bチャネルに対する光学特性から想定されるぼけ量に基づき画像回復処理を行なえば、回復が不足することになる。   For example, if color conversion processing is performed before image restoration processing, the blur characteristics of the input image substantially change. In particular, when color conversion processing is performed on an image captured by an imaging optical system that blurs the R channel, the images are mixed between the channels, and the G and B channel images other than the R channel are also blurred. As a result, if the image restoration process is performed based on the amount of blur assumed from the optical characteristics for the G and B channels, the restoration is insufficient.

また、通常、撮像光学系は高周波での応答が小さくなる傾向がある。換言すれば、細やかな被写体ほどぼける。しかし、デモザイク後では撮影画像に含まれる高周波の応答が高くなってしまう場合がある。この現象はモアレ現象と呼ばれている。つまり、デモザイク後では撮像光学系のぼけ特性が実質的に変わってしまう。   In general, the imaging optical system tends to have a low response at high frequencies. In other words, the more detailed the subject, the more blurred. However, after the demosaic, the high frequency response included in the captured image may become high. This phenomenon is called a moire phenomenon. That is, the blur characteristic of the imaging optical system is substantially changed after demosaicing.

これらの現象を鑑みずにデモザイク後の画像に対して撮像光学系のぼけ特性を用いてぼけ補正を行うと、デモザキング後の画像においてすでに応答の高い高周波成分をさらに高くしてしまう。その結果、ぼけ補正後の補正画像ではエッジの周辺に波のような紋様が発生する(リンギング等のアーチファクト)。   If the blur correction is performed on the demosaiced image using the blur characteristic of the imaging optical system without considering these phenomena, the high-frequency component that has already been highly responsive in the demosaked image is further increased. As a result, a wave-like pattern is generated around the edge in the corrected image after blur correction (artifact such as ringing).

特許文献1は、画像回復処理を、色変換処理よりも前に適用することで、効果的な画像回復処理ができるとする。しかし、特許文献1による画像回復処理(画像劣化補正処理)はデモザイクされた後の画像に対してなされる。   Patent Document 1 assumes that an effective image restoration process can be performed by applying the image restoration process before the color conversion process. However, the image restoration process (image deterioration correction process) according to Patent Document 1 is performed on the demosaiced image.

以上の通り、本願発明の解決しようとする課題は、撮像光学系のぼけ補正の際にデモザイクによって撮像画像のぼけ特性が変わる結果、良好なぼけ補正が行なえない事である。   As described above, the problem to be solved by the present invention is that the blur characteristic of the captured image is changed by the demosaic at the time of blur correction of the imaging optical system, and as a result, good blur correction cannot be performed.

上記の課題を解決するために、本発明の画像処理装置は、複数の色を有するカラーフィルターとセンサとからなる撮像装置に入射される光を、前記カラーフィルターを介して前記センサでサンプリングすることにより得られるデータに基づいて取得される、前記複数の色それぞれに対応するRAWデータを入力する入力手段と、前記複数の色それぞれに対して、前記RAWデータで示されるRAW画像のぼけを補正するための補正係数を取得する取得手段と、前記複数の色それぞれに対して、前記取得手段で取得された補正係数に基づいて、前記RAWデータで示されるRAW画像のぼけを補正し、補正画像を取得する補正手段と、前記補正手段により取得された複数の補正画像をデモザイク処理し、出力画像データを生成するデモザイク手段と、を有する。   In order to solve the above-described problems, the image processing apparatus of the present invention samples light incident on an imaging device including a color filter having a plurality of colors and a sensor with the sensor via the color filter. Input means for inputting RAW data corresponding to each of the plurality of colors obtained based on the data obtained by the above, and correcting blur of the RAW image indicated by the RAW data for each of the plurality of colors An acquisition means for acquiring a correction coefficient for correcting the blur of the RAW image indicated by the RAW data based on the correction coefficient acquired by the acquisition means for each of the plurality of colors, A correction unit for acquiring, and a demosaic hand for demosaicing a plurality of correction images acquired by the correction unit to generate output image data And, with a.

本発明によれば、撮像光学系により生じる撮像画像中のぼけに対して、良好なぼけの補正を行うことができる。   ADVANTAGE OF THE INVENTION According to this invention, favorable correction | amendment of blur can be performed with respect to the blur in the picked-up image produced by an imaging optical system.

実施例1にかかる撮像装置の構成図1 is a configuration diagram of an image pickup apparatus according to a first embodiment. 実施例1にかかる処理のフロー図Flow chart of processing according to embodiment 1 実施例1におけるセンサのカラーフィルターの配列の一例Example of sensor color filter array in Example 1 実施例1にかかるカラープレーン分割、ゼロ挿入の一例を示す図FIG. 10 is a diagram illustrating an example of color plane division and zero insertion according to the first embodiment. 実施例1にかかるぼけ補正処理のフロー図Flow chart of blur correction processing according to embodiment 1 実施例1の機能を実現する装置構成の一例An example of a device configuration for realizing the functions of the first embodiment 実施例1にかかる周波数特性を表す図The figure showing the frequency characteristic concerning Example 1. 実施例1にかかる2次元での周波数特性を表す図The figure showing the frequency characteristic in two dimensions concerning Example 1 実施例1のデモザイクに用いるフィルタの一例Example of filter used for demosaic of embodiment 1 実施例1のデモザイクを説明する図The figure explaining the demosaic of Example 1

[実施例1]
以下、実施例1の撮像光学系により生ずる撮像画像のぼけを補正する撮像装置を説明する。
[Example 1]
Hereinafter, an imaging apparatus that corrects blurring of a captured image caused by the imaging optical system according to the first embodiment will be described.

図1は、本実施例の撮像装置の基本構成を示している。不図示の被写体から撮像装置に入射される光を撮像光学系101を介してセンサ102で結像する。センサ102で結像された光(像)が電気信号に変換され、A/Dコンバータ103でデジタル信号に変換される。このデジタル信号は、RAWデータとして画像処理部104に入力される。なお、センサ102は、受光面上に結像された像による光信号を、位置対応する画素ごとに電気信号に変換する光電変換素子により構成される。また、センサ102は、その受光面上の画素に図3に示す市松模様の配列で配置されたRGBフィルタにより色分解を行う機能を有している。図3のRGBフィルタの配置方法や色分解はあくまで一例であり、例えばCMYやその他の色分解を行うフィルタについても本発明が適用できることは言うまでもない。   FIG. 1 shows a basic configuration of the imaging apparatus of the present embodiment. Light that enters the imaging apparatus from a subject (not shown) is imaged by the sensor 102 via the imaging optical system 101. Light (image) imaged by the sensor 102 is converted into an electric signal, and converted into a digital signal by the A / D converter 103. This digital signal is input to the image processing unit 104 as RAW data. The sensor 102 includes a photoelectric conversion element that converts an optical signal based on an image formed on the light receiving surface into an electrical signal for each pixel corresponding to the position. In addition, the sensor 102 has a function of performing color separation on the pixels on the light receiving surface using an RGB filter arranged in a checkered pattern arrangement shown in FIG. The RGB filter arrangement method and color separation in FIG. 3 are merely examples, and it goes without saying that the present invention can be applied to, for example, CMY and other filters that perform color separation.

画像処置部104は、RAWデータに対してぼけ補正を行う画像回復部104aと、ぼけ補正がなされたRAWデータに対しデモザキングを行うデモザイク部104bを含む。
RAWデータに対するぼけ補正処理では、まず状態検知部107から、撮影時(入射された光をセンサ102がサンプリングした際)における撮像装置の撮像状態情報(ズーム位置の状態や、絞り径の状態)を得る。
The image processing unit 104 includes an image restoration unit 104a that performs blur correction on the RAW data, and a demosaic unit 104b that performs demosaicing on the RAW data that has been subjected to blur correction.
In the blur correction process for the RAW data, first, the state detection unit 107 obtains the image pickup state information (the state of the zoom position and the state of the aperture diameter) of the image pickup apparatus at the time of shooting (when the sensor 102 samples the incident light). obtain.

状態検知部107は、システムコントローラ110から撮影状態情報を得ても良いし、撮像光学系制御部106から得ても良い。   The state detection unit 107 may obtain shooting state information from the system controller 110 or may be obtained from the imaging optical system control unit 106.

次に、撮像状態情報に応じた補正係数を記憶部108から取得し、画像処理部104に入力されたRAWデータで示されるRAW画像に対してぼけ補正処理を行う。   Next, a correction coefficient corresponding to the imaging state information is acquired from the storage unit 108, and blur correction processing is performed on the RAW image indicated by the RAW data input to the image processing unit 104.

記憶部108は、撮像状態情報それぞれに対応する画像回復フィルタの補正係数を記憶している。なお、記憶部108に記憶されている撮像状態それぞれに対応する補正係数は、撮像装置の撮像光学系の光学特性によって決定される。また、記憶部108におけるデータ量削減の目的で、画像回復フィルタをモデル化し、そのモデルパラメータを係数として記憶しておいても良い。この場合、後述する画像回復処理の際に、適宜、このモデルパラメータの係数に基づいて画像回復フィルタを生成する。   The storage unit 108 stores the correction coefficient of the image restoration filter corresponding to each of the imaging state information. Note that the correction coefficient corresponding to each imaging state stored in the storage unit 108 is determined by the optical characteristics of the imaging optical system of the imaging apparatus. For the purpose of reducing the amount of data in the storage unit 108, an image restoration filter may be modeled and the model parameters may be stored as coefficients. In this case, an image restoration filter is appropriately generated based on the coefficient of the model parameter at the time of image restoration processing described later.

ぼけ補正がなされたRAW画像を示すRAWデータに対してデモザキング部104bによってデモザイク処理を行う。   Demosaking unit 104b performs demosaic processing on RAW data indicating a RAW image that has been subjected to blur correction.

なお、前記の画像回復フィルタの構成方法及び画像処理部104の処理内容の詳細は後述する。画像処理部104により撮像光学系101のぼけが補正された補正画像データは画像記録媒体109に保存されたり、表示部105により表示される。   The details of the method for configuring the image restoration filter and the processing contents of the image processing unit 104 will be described later. The corrected image data in which the blur of the imaging optical system 101 is corrected by the image processing unit 104 is stored in the image recording medium 109 or displayed on the display unit 105.

<画像処理部104の処理フロー>
図2に画像処理部104に関する処理のフローを示す。
ステップS101ではA/Dコンバータ103でデジタル信号化されたRAWデータを取得する。RAWデータは撮像光学系101の特性を忠実に反映するよう、輝度に対して線形である事が望ましい。しかし、センサ102やA/Dコンバータ103が非線形特性を有する場合など輝度に対して非線形な値を有するRAWデータが取得される場合がある。その際はハードウェアの非線形特性をキャンセルして、輝度に対して線形となるような処理がステップS101でデータ取得に伴って施される事が望ましい。また、欠落画素の補償など画像特性を大きく変更しない範囲で多少の非線形処理が施されてもよい。
<Processing Flow of Image Processing Unit 104>
FIG. 2 shows a processing flow relating to the image processing unit 104.
In step S101, the RAW data converted into a digital signal by the A / D converter 103 is acquired. The RAW data is desirably linear with respect to luminance so as to faithfully reflect the characteristics of the imaging optical system 101. However, there are cases where RAW data having a non-linear value with respect to luminance is acquired, such as when the sensor 102 or the A / D converter 103 has non-linear characteristics. In this case, it is desirable to perform processing that cancels the non-linear characteristics of the hardware and becomes linear with respect to luminance in accordance with data acquisition in step S101. Further, some non-linear processing may be performed within a range in which image characteristics such as missing pixel compensation are not significantly changed.

ステップS102では、記憶部108から撮影状態情報に対応した画像回復フィルタの係数(又はモデルパラメータの係数)を取得する。画像回復フィルタの係数はRGB各カラーによって異なる。これは、RGB各カラープレーンごとに、ぼけ特性が異なるためである。この点については、後述する。   In step S102, the coefficient of the image restoration filter (or the coefficient of the model parameter) corresponding to the shooting state information is acquired from the storage unit. The coefficient of the image restoration filter is different for each color of RGB. This is because the blur characteristics are different for each RGB color plane. This point will be described later.

ステップS103では、RGB各カラープレーンについて、画像回復フィルタを用いてRAWデータに対して撮像光学系のぼけを補正する処理を行う。ぼけ補正処理の詳細は後述する。   In step S103, for each of the RGB color planes, processing for correcting blur of the imaging optical system is performed on the RAW data using an image restoration filter. Details of the blur correction process will be described later.

ステップS104ではぼけ補正がなされたRAWデータに対してデモザイク処理を行う。デモザイク処理の詳細は後述する。   In step S104, demosaic processing is performed on the RAW data that has been subjected to blur correction. Details of the demosaic process will be described later.

<ぼけ補正処理の詳細>
ぼけ補正処理の詳細を図5のフローチャートを用いて説明する。
ステップS201では、図4に示すカラーフィルターの配列に従い、入力されたRAWデータを各色フィルタ毎に独立したRAWデータ(各色フィルタ毎に独立したカラープレーン)に分割する。単版式の場合、各カラープレーンで値を持たない画素が存在する。例えば、Rプレーン画像においてG、Bに相当する画素位置でのRの値は不明である。そこで、ステップS202では、図4に示すように値を持たない画素にゼロを割り当てる。
<Details of blur correction processing>
The details of the blur correction process will be described with reference to the flowchart of FIG.
In step S201, the input raw data is divided into independent raw data for each color filter (independent color plane for each color filter) in accordance with the color filter arrangement shown in FIG. In the case of the single plate type, there is a pixel having no value in each color plane. For example, the value of R at the pixel positions corresponding to G and B in the R plane image is unknown. Therefore, in step S202, zero is assigned to pixels having no value as shown in FIG.

ステップS203では、カラープレーン毎に画像回復フィルタを適用することにより補正画像を取得する。具体的には、ゼロ挿入された各カラープレーンのRAWデータと各カラープレーンの画像回復フィルタとの間でコンボリューション演算を行う。なお画像回復フィルタは、後述するように各カラープレーンごとに異なる。   In step S203, a corrected image is acquired by applying an image restoration filter for each color plane. Specifically, a convolution operation is performed between the raw data of each color plane with zero insertion and the image restoration filter of each color plane. The image restoration filter is different for each color plane as will be described later.

ステップS204では、コンボリューション後の各カラープレーンのRAWデータにステップS202と同様にゼロ挿入を行う。この処理は、ステップS202においてゼロ挿入された画素はコンボリューション後に0とは異なる値を有する場合があるため、本ステップであらためてゼロ挿入を行う。   In step S204, zero insertion is performed on the RAW data of each color plane after convolution as in step S202. In this process, since the pixel in which zero insertion is performed in step S202 may have a value different from 0 after convolution, zero insertion is performed again in this step.

ステップS205ではステップS104でゼロ挿入した各カラープレーンのRAWデータを単一プレーンの出力画像データとして合成する。ステップS205のカラープレーン合成が行われた時点での画像データは、図3に示すデモザイクが行われていないRAWデータの形式となる。   In step S205, the raw data of each color plane zero-inserted in step S104 is combined as single plane output image data. The image data at the time when the color plane synthesis in step S205 is performed is in the RAW data format in which the demosaic is not performed as shown in FIG.

<画像回復フィルタ構成方法>
画像回復部104aにおいて用いられる画像回復フィルタの構成法を説明する。説明のためベイヤー配列を例にとり、画像回復フィルタの構成法をRプレーンについて述べる。配列としてはRプレーンもBプレーンも垂直水平方向で一画素おきにサンプリングするため同様の議論はBプレーンについても成立する。ステップS201において、カラープレーン分割されたRプレーンの画像gは次式で表される。
=m×(h*f) ・・・(5)
ここで、fは被写体像fのR成分、hはRプレーンに対応するPSF、mは、マスク関数(Rフィルタの位置で1、G及びBフィルタの位置で0となる関数)である。
<Image recovery filter configuration method>
A configuration method of the image restoration filter used in the image restoration unit 104a will be described. For the sake of explanation, the configuration method of the image restoration filter will be described with respect to the R plane, taking a Bayer array as an example. As the arrangement, both the R plane and the B plane are sampled every other pixel in the vertical and horizontal directions, and the same argument holds for the B plane. In step S201, the color plane divided R plane image g R is expressed by the following equation.
g R = m R × (h R * f R) ··· (5)
Here, f R is an R component of the subject image f, h R is a PSF corresponding to the R plane, and m R is a mask function (a function that becomes 1 at the R filter position and 0 at the G and B filter positions). is there.

ステップS203において、Rプレーン用の画像回復フィルタを適用後の画像g’は次式で表される。
’=R*{m×(h*f)} ・・・(6)
ここで、Rは、Rプレーン用の画像回復フィルタである。
ステップS204において、マスク処理後の画像G”次式で表される。
”=m×[R*{m×(h*f)}] ・・・(7)
画像G”が、被写体像fをマスク関数mでマスクした画像m×fに一致すれば、撮像光学系101によるぼけ(画像劣化)が回復していることとなる。そこで、g”とm×fの差分が最小になるように、Rプレーンの画像回復フィルタRを数学的に計算する。Bプレーン、Gプレーンについても同様に、Bプレーン用の画像回復フィルタR,Rを求めることができる。図7を用いて、画像回復フィルタの構成方法を説明する。
In step S203, the image g R ′ after application of the image restoration filter for the R plane is expressed by the following equation.
g R ′ = R R * {m R × (h R * f R )} (6)
Here, R R is an image restoration filter for the R plane.
In step S204, represented by image G R "the following equation after the mask processing.
G R "= m R × [ R R * {m R × (h R * f R)}] ··· (7)
If the image G R ″ coincides with the image m R × f R obtained by masking the subject image f with the mask function m R , the blur (image deterioration) due to the imaging optical system 101 is recovered. The R- plane image restoration filter RR is mathematically calculated so that the difference between R ″ and m R × f R is minimized. Similarly, the image restoration filters R B and R G for the B plane can be obtained for the B plane and the G plane. A configuration method of the image restoration filter will be described with reference to FIG.

図7(a)はカラーフィルタ配列を考慮しない場合の撮像光学系のOTFである。これはカラーフィルタを全て取り払った場合の撮像光学系の周波数特性を意味していると考えれば分かりやすい。センサでサンプリングが行われるため、ナイキスト周波数以上の周波数は存在しない。   FIG. 7A shows an OTF of the imaging optical system when the color filter arrangement is not taken into consideration. This is easy to understand if it is considered to mean the frequency characteristics of the imaging optical system when all the color filters are removed. Since sampling is performed by the sensor, there is no frequency higher than the Nyquist frequency.

逆フィルタではこの図7(a)の逆数をとって図7(b)に示すような回復フィルタを構成する。一般的には、撮像光学系のOTFは高周波ほど小さいため、回復フィルタは高周波ほど強調する作用を持つ。さて、カラーフィルタ配列によって、例えばRでは一画素おきにサンプリングがなされる。するとサンプリング後の撮像光学系のOTFは、Rのナイキスト周波数に関して図7(c)のように撮像光学系のOTFが折り返った形になる。回復フィルタの周波数特性は図7(c)の逆数であるから図7(d)のようにRのナイキストでピークをもつ形になる。   In the inverse filter, the inverse of this FIG. 7A is taken to constitute a recovery filter as shown in FIG. 7B. In general, since the OTF of the imaging optical system is smaller as the frequency is higher, the recovery filter has an effect of enhancing the higher frequency. Now, for example, in R, sampling is performed every other pixel by the color filter array. Then, the OTF of the imaging optical system after sampling has a shape in which the OTF of the imaging optical system is folded with respect to the Nyquist frequency of R as shown in FIG. Since the frequency characteristic of the recovery filter is the reciprocal of FIG. 7C, it has a peak at the Nyquist of R as shown in FIG. 7D.

ここでカラーフィルタ配列によるサンプリングを考慮せずに、図7(b)の回復フィルタを実際のぼけ特性である図7(c)のOTFに適用した場合を考える。すると、得られる画像は図7(e)のような高周波が強調されすぎた画像になってしまう。つまり、デモザイク前にぼけ補正をする際には、カラーフィルタ配列から導かれる各色のナイキスト周波数を考慮した回復フィルタを用いる必要がある。   Here, a case is considered in which the recovery filter of FIG. 7B is applied to the OTF of FIG. 7C, which is an actual blur characteristic, without considering sampling by the color filter array. Then, the obtained image becomes an image in which the high frequency is excessively emphasized as shown in FIG. That is, when blur correction is performed before demosaicing, it is necessary to use a recovery filter that takes into account the Nyquist frequency of each color derived from the color filter array.

説明の簡単のために一次元で解説を行ったが、実際にはフィルタ配列は二次元であるため、二次元的にナイキスト周波数による折り返りを考慮する必要がある。二次元の処理について、図8を用いて説明する。カラーフィルタ配列を考慮しない場合のOTFを図8(a)に示す。縦軸横軸はそれぞれ縦方向、横方向の周波数を意味している。また、周波数応答を等高線で表示する。等高線上では周波数応答は等しいとする。センサでサンプリングが行われるため、縦方向横方向ともナイキスト周波数以上の周波数は存在しない。逆フィルタは図8(a)の各周波数についてOTFの逆数をとり、逆フーリエ変換をすることで求める事が出来る。Rプレーンでの折り返りを考慮した場合の周波数応答を図8(b)に示す。すると図8(a)のフィルタ配列を考慮しない場合に比べて、図8(b)では折り返りによって高周波の応答が高くなっている事が分かる。   In order to simplify the explanation, the explanation was given in one dimension. However, since the filter array is actually two-dimensional, it is necessary to consider the aliasing due to the Nyquist frequency two-dimensionally. Two-dimensional processing will be described with reference to FIG. FIG. 8A shows the OTF when the color filter arrangement is not taken into consideration. The vertical axis and the horizontal axis mean the frequency in the vertical direction and the horizontal direction, respectively. The frequency response is displayed with contour lines. The frequency response is assumed to be equal on the contour lines. Since sampling is performed by the sensor, there is no frequency higher than the Nyquist frequency in both the vertical and horizontal directions. The inverse filter can be obtained by taking the inverse of OTF for each frequency in FIG. 8A and performing inverse Fourier transform. FIG. 8B shows a frequency response when turning back in the R plane is considered. Then, compared with the case where the filter arrangement of FIG. 8A is not considered, it can be seen that the response of high frequency is increased by folding in FIG. 8B.

本実施例の画像回復フィルタ構成法は図8(b)の周波数特性の逆数をとってフーリエ変換を行い回復フィルタを求める事が特徴である。フィルタ配列によってサンプリグされた後のRの周波数特性は図8(b)であるから、フィルタ配列を考慮せずに図8(a)の逆数を図8(b)に掛け合わせると高周波が過剰に強調されてしまう。従来法によって強調されすぎた高周波はリンギング等のアーチファクトの発生要因となってしまう。本発明ではサンプリング後の周波数特性の逆数をとるため、高周波が強調されすぎることはない。フィルタ配列によって画像回復フィルタの構成法を変える必要がある事を述べる。図8(c)にベイヤー配列でサンプリングした後のGプレーンの周波数特性を示す。図8(c)のGプレーン周波数特性と図8(b)のRプレーン周波数特性を比べると、折り返りの様子が異なる事が分かる。つまり、Rプレーンでは周波数面上で中央の四角形の形で折り返りが発生していたのに対し、Gプレーンではひし形の形で折り返りが発生している。従って、本発明で折り返りを考慮して回復フィルタを求める際、折り返りの方法は各フィルタの配置によって変わるため、回復フィルタはフィルタ配列によって構成方法を変える必要がある。   The image restoration filter construction method of the present embodiment is characterized in that a restoration filter is obtained by performing Fourier transform by taking the reciprocal of the frequency characteristic shown in FIG. 8B. Since the frequency characteristic of R after being sampled by the filter array is FIG. 8 (b), if the inverse of FIG. 8 (a) is multiplied by FIG. 8 (b) without considering the filter array, the high frequency becomes excessive. It will be emphasized. The high frequency emphasized too much by the conventional method becomes a cause of occurrence of artifacts such as ringing. Since the present invention takes the reciprocal of the frequency characteristic after sampling, the high frequency is not overemphasized. It will be described that it is necessary to change the construction method of the image restoration filter depending on the filter arrangement. FIG. 8C shows the frequency characteristic of the G plane after sampling with the Bayer array. Comparing the G plane frequency characteristics of FIG. 8C and the R plane frequency characteristics of FIG. 8B, it can be seen that the folding is different. In other words, the R plane is folded in the form of a central square on the frequency plane, whereas the G plane is folded in the form of a rhombus. Therefore, when obtaining a recovery filter in consideration of aliasing in the present invention, since the aliasing method varies depending on the arrangement of each filter, it is necessary to change the configuration method of the recovery filter depending on the filter arrangement.

<デモザイクの詳細>
ぼけ補正後のRAWデータに対してデモザイクを行う詳細を述べる。
まずは簡単な線形演算によるデモザイクを説明する。説明のためベイヤー配列を例にとる。RGBカラープレーンのそれぞれにおけるRAWデータは、値を持たない画素を有する。値を持たない画素に対して0挿入を行った後の各カラープレーンの状態を図4に示す。線形演算によるデモザイクでは図9に示す各フィルタを各カラープレーンにコンボリューション処理を行えば良い。具体的にはR、Bプレーンについては図9(a)に示すフィルタ、Gプレーンについては図9(b)に示すフィルタを用いればよい。
<Details of demosaic>
Details of performing demosaicing on the RAW data after blur correction will be described.
First, demosaic by simple linear calculation will be described. Take Bayer array as an example for illustration. The RAW data in each of the RGB color planes has pixels that have no value. FIG. 4 shows the state of each color plane after zero insertion has been performed on a pixel having no value. In the demosaic by linear operation, the convolution process may be performed for each filter shown in FIG. 9 on each color plane. Specifically, the filter shown in FIG. 9A may be used for the R and B planes, and the filter shown in FIG. 9B may be used for the G plane.

この処理によって画素が補間される様子を図10に示す。図10(a)はデモザイク処理前のGプレーンの状態の例であって図10(a)中央部は不明な画素であるため0挿入がなされている。図10(b)にコンボリューション後の状態を示す。図10(a)において不明であった画素に対して上下左右の画素の平均が割り当てられている事が分かる。R、Bプレーンについても同様にコンボリューション後に不明な画素が周囲の画素によって補間される。   FIG. 10 shows how pixels are interpolated by this processing. FIG. 10A shows an example of the state of the G plane before demosaic processing. Since the center of FIG. 10A is an unknown pixel, 0 insertion is performed. FIG. 10B shows a state after convolution. It can be seen that the average of the upper, lower, left, and right pixels is assigned to the pixels that are unknown in FIG. Similarly, for the R and B planes, unknown pixels after convolution are interpolated by surrounding pixels.

次に、非線形処理を含むデモザイク処理の例として適応的なデモザイク処理を述べる。適応的なデモザイク処理では前述のように単純に周囲の平均をとるのではなく、上下、左右あるいは対角方向で周囲の画素値の差分をとり、変化の少ない方向の画素を用いて不明な画素値を計算する。変化のゆるやかな方向の画素値を用いたほうが、より信頼性のある補間が行えるためである。本発明ではデモザイクの前にぼけ補正を行うが、仮に適応的な処理の後にぼけ補正をすることを考えると以下のような問題が発生する。撮像光学系の一例としてレンズを挙げると、レンズの中には特定方向には大きくぼけるが、それとは垂直な方向にはぼけが少ない特性をもつものがある。そのようなレンズを用いて撮影した画像に対して適応的なデモザイクを行うと、より変化の少ない方向、すなわちぼけが大きい方向で補間を行いがちになる。ぼけが大きい方向で平均処理に類する演算を行うため、元来ぼけが大きかった方向でさらにぼける結果になる。そのような画像に対してぼけ補正を行った場合、前述した折り返りの問題の他に、デモザイクによるぼけが補正しきれないという問題がある。さらに、例えばレンズの特性が横方向にぼける場合であっても、被写体が縦縞など横方向にくっきりとしたものあると、方向判定の結果は縦方向となる場合もある。従って、デモザイクでぼけた分だけを、後から他の処理によって鮮鋭化するという処理を行うにしても、画像の場所ごとにどのような方向判定を行ったかによって処理を切り替える必要がある。本発明ではデモザイク前にぼけを補正するため、上記のような煩雑な問題を回避することができるのである。   Next, adaptive demosaic processing will be described as an example of demosaic processing including nonlinear processing. In adaptive demosaic processing, instead of simply taking the average of the surroundings as described above, the difference between the surrounding pixel values is taken in the vertical, horizontal, and diagonal directions, and the unknown pixels are used using the pixels in the direction with little change. Calculate the value. This is because more reliable interpolation can be performed by using pixel values in a direction in which the change is gentle. In the present invention, blur correction is performed before demosaicing, but the following problems arise when considering blur correction after adaptive processing. When taking a lens as an example of the imaging optical system, there is a lens that has a characteristic of being largely blurred in a specific direction but less blurred in a direction perpendicular thereto. When adaptive demosaicing is performed on an image shot using such a lens, interpolation tends to be performed in a direction with less change, that is, in a direction where blur is large. Since an operation similar to the averaging process is performed in the direction where the blur is large, the result is further blurred in the direction where the blur was originally large. When blur correction is performed on such an image, in addition to the above-described problem of aliasing, there is a problem that blur due to demosaic cannot be corrected. Further, for example, even when the lens characteristics are blurred in the horizontal direction, if the subject is sharp in the horizontal direction such as vertical stripes, the result of the direction determination may be in the vertical direction. Therefore, even if the process of sharpening only the part blurred by the demosaic by another process is performed later, it is necessary to switch the process depending on what direction determination is performed for each location of the image. In the present invention, blurring is corrected before demosaicing, so that the above complicated problems can be avoided.

次に非線形処理を含むデモザイクの例として、色間の相関を用いるデモザイクを述べる。図3から明らかなようにベイヤー配列の場合にはR,Bの画素に比べてGの画素数が多い。換言すると、Gプレーンのほうがより解像度が高く、R、Bプレーンに比べて細かな画像情報を取得できる。さらにGプレーンは、R、Bプレーンとも相関が高いことが知られている。高度なデモザイクではGプレーンの情報を積極的に利用してR、Bプレーンにおいて不明な画素の補間を行う。例えば不明なRの値を補間するために、近隣画素のRの値を用いるだけでなく、近隣のGの画素値も用いて不明なRの画素値を決定する。そのためRプレーンの画像のぼけ特性にGプレーンの画像のぼけ特性が混入することになる。   Next, demosaic using correlation between colors will be described as an example of demosaic including non-linear processing. As apparent from FIG. 3, in the case of the Bayer array, the number of G pixels is larger than that of R and B pixels. In other words, the resolution of the G plane is higher, and finer image information can be acquired compared to the R and B planes. Further, it is known that the G plane has a high correlation with the R and B planes. In advanced demosaic, G-plane information is actively used to interpolate unknown pixels in the R and B planes. For example, in order to interpolate an unknown R value, an unknown R pixel value is determined using not only the neighboring R value but also the neighboring G pixel value. Therefore, the blur characteristic of the G plane image is mixed with the blur characteristic of the R plane image.

仮に、撮像光学系がG、Bプレーンに比べRプレーンのぼけが大きい特性を有する場合を考える。すると、本来ぼけが大きいRプレーンの画像がぼけの少ないGプレーンの画像情報を用いる事で多少なりともぼけが低減される事が分かる。つまりデモザイク後の画像のぼけ特性は、必ずしも撮像光学系のぼけ特性を反映しているとは言えない。   Assume that the imaging optical system has a characteristic in which the blur of the R plane is larger than that of the G and B planes. Then, it can be seen that the blur is reduced to some extent by using the image information of the G plane with little blur for the image of the R plane that is essentially blurry. That is, the blur characteristic of the image after demosaicing does not necessarily reflect the blur characteristic of the imaging optical system.

この点を鑑みずに撮影光学系のPSFから求めた回復フィルタによってぼけ補正を行うと、補正画像に望ましくないアーチファクトを発生させてしまう。先の例ではRプレーンが撮像光学系のぼけ特性から予想されるほどぼけていないため、ぼけ補正を行うと過補正となってしまい、リンギング等のアーチファクトを発生させる要因となる。本発明では、デモザイク前のRAWデータに対してぼけ補正を行うことで上記の問題を回避している。   If blur correction is performed using the recovery filter obtained from the PSF of the photographing optical system without considering this point, an undesirable artifact is generated in the corrected image. In the previous example, the R plane is not as blurry as expected from the blur characteristics of the imaging optical system. Therefore, when blur correction is performed, overcorrection occurs, causing artifacts such as ringing. In the present invention, the above-described problem is avoided by performing blur correction on the RAW data before demosaicing.

以上、デモザイク前にぼけ補正を行うことで、デモザキングによって画像のぼけ特性が影響を受ける前に、撮像光学系に起因するぼけを小さくするように補正することができる。   As described above, by performing blur correction before demosaicing, it is possible to perform correction so as to reduce blur caused by the imaging optical system before the blur characteristics of the image are affected by demosaking.

[実施例2]
本発明の目的は前述した実施例の機能を実現するソフトウエアのプログラムコードを記録した記録媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUまたはMPU)が実行することによっても、達成される。装置構成の一例を図6に示す。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することとなり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
[Example 2]
An object of the present invention is to supply a recording medium on which a program code of software for realizing the functions of the above-described embodiments is recorded to a system or apparatus, and that is executed by a computer (or CPU or MPU) of the system or apparatus. Is also achieved. An example of the apparatus configuration is shown in FIG. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.

具体的には、上記のシステムあるいはコンピュータは、入力装置又はネットワークを介して図2に示すステップS101のRAWデータを取得する。また、S102に対応する光学撮像系の補正係数を記録媒体やネットワークなどを介してコンピュータに提供する。そして、上記のシステムあるいはコンピュータの演算装置により画像回復処理ならびにデモザイク処理・その他の処理を行えばよい。   Specifically, the system or computer described above acquires RAW data in step S101 shown in FIG. 2 via an input device or a network. In addition, the correction coefficient of the optical imaging system corresponding to S102 is provided to the computer via a recording medium or a network. Then, image restoration processing, demosaic processing, and other processing may be performed by the above-described system or computer arithmetic device.

プログラムコードを供給するためのコンピュータ読取可能な記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROM、DVDなどを用いることができる。   Examples of computer-readable storage media for supplying the program code include flexible disks, hard disks, optical disks, magneto-optical disks, CD-ROMs, CD-Rs, magnetic tapes, nonvolatile memory cards, ROMs, DVDs, etc. Can be used.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施例の機能が実現されるだけでない。つまり、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOperating System(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれる。   Further, the functions of the above-described embodiments are not only realized by executing the program code read by the computer. That is, the operating system (OS) operating on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments may be realized by the processing. included.

さらに、記憶媒体から読み出されたコードが、コンピュータに挿入された機能拡張ユニットの処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Furthermore, it goes without saying that the case where the functions of the above-described embodiment are realized by the processing of the function expansion unit inserted into the computer when the code read from the storage medium is included.

本発明は上記実施の形態に制限されるものではなく、本発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、本発明の範囲を公にするために以下の請求項を添付する。   The present invention is not limited to the above-described embodiment, and various changes and modifications can be made without departing from the spirit and scope of the present invention. Therefore, in order to make the scope of the present invention public, the following claims are attached.

Claims (8)

複数の色を有するカラーフィルターとセンサとからなる撮像装置に入射される光を、前記カラーフィルターを介して前記センサでサンプリングすることにより得られるデータに基づいて取得される、前記複数の色それぞれに対応するRAWデータを入力する入力手段と、
前記複数の色それぞれに対して、前記RAWデータで示されるRAW画像のぼけを補正するための補正係数を取得する取得手段と、
前記複数の色それぞれに対して、前記取得手段で取得された補正係数に基づいて、前記RAWデータで示されるRAW画像のぼけを補正し、補正画像を取得する補正手段と、
前記補正手段により取得された複数の補正画像をデモザイク処理し、出力画像データを生成するデモザイク手段と、
を有することを特徴とする画像処理装置。
For each of the plurality of colors acquired based on data obtained by sampling light incident on an imaging device including a color filter having a plurality of colors and a sensor with the sensor via the color filter. Input means for inputting corresponding RAW data;
Acquisition means for acquiring a correction coefficient for correcting blur of a RAW image indicated by the RAW data for each of the plurality of colors;
Correction means for correcting a blur of the RAW image indicated by the RAW data and acquiring a corrected image based on the correction coefficient acquired by the acquisition means for each of the plurality of colors;
Demosaic processing for demosaic processing a plurality of correction images acquired by the correction means, and generating output image data;
An image processing apparatus comprising:
前記補正手段は、前記複数の色それぞれに対して、前記取得手段で取得された補正係数と前記カラーフィルターの配列とに基づいて、前記RAWデータで示されるRAW画像のぼけを補正し、補正画像を取得することを特徴とする請求項1に記載の画像処理装置。   The correction unit corrects a blur of the RAW image indicated by the RAW data based on the correction coefficient acquired by the acquisition unit and the arrangement of the color filters for each of the plurality of colors, thereby correcting the corrected image. The image processing apparatus according to claim 1, further comprising: 前記補正手段は、前記補正係数により生成される画像回復フィルタによりRAW画像のぼけを補正し、補正画像を取得することを特徴とする請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the correction unit corrects a blur of a RAW image by an image restoration filter generated by the correction coefficient, and acquires a corrected image. 前記デモザイク手段は、前記複数の補正画像に対して線形、又は非線形のデモザイク処理することを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the demosaic unit performs linear or non-linear demosaic processing on the plurality of corrected images. 前記補正手段は、前記複数の色それぞれに対して、前記RAWデータで示されるRAW画像のナイキスト周波数における周波数応答を高めることを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。   5. The image processing according to claim 1, wherein the correction unit enhances a frequency response at a Nyquist frequency of a RAW image indicated by the RAW data for each of the plurality of colors. apparatus. 前記補正係数は、前記撮像装置の光学特性に基づいて決定されることを特徴とする請求項1乃至5のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the correction coefficient is determined based on optical characteristics of the imaging apparatus. 複数の色を有するカラーフィルターとセンサとからなる撮像装置に入射される光を、前記カラーフィルターを介して前記センサでサンプリングすることにより得られるデータに基づいて取得される、前記複数の色それぞれに対応するRAWデータを入力する入力手段と、
前記複数の色それぞれに対して、前記RAWデータで示されるRAW画像のぼけを補正するための補正係数を取得する取得工程と、
前記複数の色それぞれに対して、前記取得工程で取得された補正係数に基づいて、前記RAWデータで示されるRAW画像のぼけを補正し、補正画像を取得する補正工程と、
前記補正工程で取得された複数の補正画像をデモザイク処理し、出力画像データを生成するデモザイク工程と、
を有することを特徴とする画像処理方法。
For each of the plurality of colors acquired based on data obtained by sampling light incident on an imaging device including a color filter having a plurality of colors and a sensor with the sensor via the color filter. Input means for inputting corresponding RAW data;
An acquisition step of acquiring a correction coefficient for correcting blur of a RAW image indicated by the RAW data for each of the plurality of colors;
For each of the plurality of colors, based on the correction coefficient acquired in the acquisition step, correcting the blur of the RAW image indicated by the RAW data, and acquiring a correction image;
A demosaic process for demosaicing a plurality of corrected images acquired in the correction process to generate output image data;
An image processing method comprising:
コンピュータを、
複数の色を有するカラーフィルターとセンサとからなる撮像装置に入射される光を、前記カラーフィルターを介して前記センサでサンプリングすることにより得られるデータに基づいて取得される、前記複数の色それぞれに対応するRAWデータを入力する入力手段と、
前記複数の色それぞれに対して、前記RAWデータで示されるRAW画像のぼけを補正するための補正係数を取得する取得手段と、
前記複数の色それぞれに対して、前記取得手段で取得された補正係数に基づいて、前記RAWデータで示されるRAW画像のぼけを補正し、補正画像を取得する補正手段と、
前記補正手段により取得された複数の補正画像をデモザイク処理し、出力画像データを生成するデモザイク手段と、
として機能させるためのプログラムを記録したコンピュータ読取可能な記録媒体。
Computer
For each of the plurality of colors acquired based on data obtained by sampling light incident on an imaging device including a color filter having a plurality of colors and a sensor with the sensor via the color filter. Input means for inputting corresponding RAW data;
Acquisition means for acquiring a correction coefficient for correcting blur of a RAW image indicated by the RAW data for each of the plurality of colors;
Correction means for correcting a blur of the RAW image indicated by the RAW data and acquiring a corrected image based on the correction coefficient acquired by the acquisition means for each of the plurality of colors;
Demosaic processing for demosaic processing a plurality of correction images acquired by the correction means, and generating output image data;
The computer-readable recording medium which recorded the program for functioning as.
JP2012511453A 2010-04-21 2010-04-21 Image processing apparatus, method, and recording medium Pending JPWO2011132279A1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/057083 WO2011132279A1 (en) 2010-04-21 2010-04-21 Image processing device, method, and recording medium

Publications (1)

Publication Number Publication Date
JPWO2011132279A1 true JPWO2011132279A1 (en) 2013-07-18

Family

ID=44815511

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012511453A Pending JPWO2011132279A1 (en) 2010-04-21 2010-04-21 Image processing apparatus, method, and recording medium

Country Status (4)

Country Link
US (1) US8629917B2 (en)
JP (1) JPWO2011132279A1 (en)
CN (1) CN102860012B (en)
WO (1) WO2011132279A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6363889B2 (en) * 2014-07-01 2018-07-25 キヤノン株式会社 Image pickup device, image pickup apparatus, and control method thereof
CN105578160A (en) * 2015-12-23 2016-05-11 天津天地伟业数码科技有限公司 Fine definition demosaicking interpolation method based on FPGA platform
KR20190049197A (en) * 2017-11-01 2019-05-09 한국전자통신연구원 Method of upsampling based on maximum resolution image and compositing rgb image, and an apparatus operating the same
JP2019169000A (en) * 2018-03-23 2019-10-03 キヤノン株式会社 Image processing apparatus, image processing method, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008211679A (en) * 2007-02-27 2008-09-11 Kyocera Corp Imaging apparatus and method thereof
JP2009516256A (en) * 2005-11-10 2009-04-16 ディー−ブルアー テクノロジーズ リミティド Image enhancement in the mosaic domain
JP2009089082A (en) * 2007-09-28 2009-04-23 Kyocera Corp Image restoration apparatus and its method
JP2010087614A (en) * 2008-09-29 2010-04-15 Toshiba Corp Image processing apparatus, image processing method and program

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7133569B1 (en) * 2000-07-31 2006-11-07 Polaroid Corporation Aliasing artifact attenuation system
JP2002199410A (en) 2000-12-25 2002-07-12 Canon Inc Imaging device, compensating processing method for deteriorated image and storage medium
JP2006005477A (en) * 2004-06-15 2006-01-05 Canon Inc Imaging device, imaging method, and program
US7728844B2 (en) * 2004-07-09 2010-06-01 Nokia Corporation Restoration of color components in an image model
JP4700445B2 (en) * 2005-09-01 2011-06-15 オリンパス株式会社 Image processing apparatus and image processing program
JP4661922B2 (en) * 2008-09-03 2011-03-30 ソニー株式会社 Image processing apparatus, imaging apparatus, solid-state imaging device, image processing method, and program
JP2010199650A (en) * 2009-02-23 2010-09-09 Fujitsu Semiconductor Ltd Image processing apparatus and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009516256A (en) * 2005-11-10 2009-04-16 ディー−ブルアー テクノロジーズ リミティド Image enhancement in the mosaic domain
JP2008211679A (en) * 2007-02-27 2008-09-11 Kyocera Corp Imaging apparatus and method thereof
JP2009089082A (en) * 2007-09-28 2009-04-23 Kyocera Corp Image restoration apparatus and its method
JP2010087614A (en) * 2008-09-29 2010-04-15 Toshiba Corp Image processing apparatus, image processing method and program

Also Published As

Publication number Publication date
WO2011132279A1 (en) 2011-10-27
CN102860012B (en) 2015-06-03
US20110261236A1 (en) 2011-10-27
CN102860012A (en) 2013-01-02
US8629917B2 (en) 2014-01-14

Similar Documents

Publication Publication Date Title
JP5326943B2 (en) Image processing apparatus, image processing method, and program
US9049356B2 (en) Image processing method, image processing apparatus and image processing program
JP5188651B2 (en) Image processing apparatus and imaging apparatus using the same
JP2011055038A5 (en)
US8982234B2 (en) Information processing apparatus and method
KR20110029001A (en) Image porcessing method and apparatus in the bayer image
US10075640B2 (en) Motion compensation for image sensor with a block based analog-to-digital converter
JP2013055623A (en) Image processing apparatus, image processing method, information recording medium, and program
JP5398750B2 (en) The camera module
WO2011132279A1 (en) Image processing device, method, and recording medium
JP2012204856A (en) Image processing method and camera module
US20080012964A1 (en) Image processing apparatus, image restoration method and program
JP5455728B2 (en) Imaging apparatus, image processing apparatus, and image processing method
JP2012003454A (en) Image processing apparatus, imaging device and image processing program
JP2010141661A (en) Image processing device
JP2009047734A (en) Imaging apparatus and image processing program
KR101243285B1 (en) Apparatus and method for reconstructing color image based on multi-spectrum using Bayer Color Filter Array camera
JP7337555B2 (en) Image processing device, imaging device, image processing method, program, and storage medium
JP7183015B2 (en) Image processing device, image processing method, and program
JP2013055622A (en) Image processing apparatus, image processing method, information recording medium, and program
JP4478981B2 (en) Color noise reduction method and color imaging apparatus
JP2012156714A (en) Program, image processing device, image processing method, and imaging device
EP4332834A1 (en) Method and camera device for generating a moiré-corrected image file
JP2015109562A (en) Image processing device, imaging device, control method, and program
JP2015185917A (en) Image processing apparatus, image processing method, and imaging device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140707

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150127