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

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

Info

Publication number
JP6435560B1
JP6435560B1 JP2018043672A JP2018043672A JP6435560B1 JP 6435560 B1 JP6435560 B1 JP 6435560B1 JP 2018043672 A JP2018043672 A JP 2018043672A JP 2018043672 A JP2018043672 A JP 2018043672A JP 6435560 B1 JP6435560 B1 JP 6435560B1
Authority
JP
Japan
Prior art keywords
pixel
image
code
tap
color component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018043672A
Other languages
Japanese (ja)
Other versions
JP2019161376A (en
Inventor
奥村 明弘
明弘 奥村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realop
Original Assignee
Realop
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 Realop filed Critical Realop
Priority to JP2018043672A priority Critical patent/JP6435560B1/en
Priority to PCT/JP2018/041564 priority patent/WO2019176161A1/en
Application granted granted Critical
Publication of JP6435560B1 publication Critical patent/JP6435560B1/en
Publication of JP2019161376A publication Critical patent/JP2019161376A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Abstract

【課題】ベイヤー配列の色フィルタアレイが配置された撮像素子から出力された画像から、各色成分の高画質の画像を生成する。
【解決手段】高解像G生成部35は、ベイヤー配列の色フィルタアレイが配置されたイメージセンサから出力された第1の画像から1つの注目画素を選択する注目画素選択部と、第1の画像のG成分の画素であって複数の画素からなるコードタップを選択するGコードタップ選択部61と、選択されたコードタップのGコードを演算するGコード演算部63と、コード毎に複数のG係数を記憶し、演算されたGコードに基づいて複数のG係数を出力するG係数記憶部64と、第1の画像のG成分の画素であって複数の画素からなるフィルタタップを選択するGフィルタタップ選択部62と、選択されたフィルタタップの各画素値と、出力された複数のG係数とに基づいて、注目画素毎に対応する出力画素の画素値を演算するG積和演算部65とを備える。
【選択図】図11
A high-quality image of each color component is generated from an image output from an image sensor in which a color filter array in a Bayer array is arranged.
A high-resolution G generation unit includes a target pixel selection unit that selects one target pixel from a first image output from an image sensor in which a color filter array having a Bayer array is arranged; A G code tap selection unit 61 that selects a code tap composed of a plurality of pixels that is a G component pixel of the image, a G code calculation unit 63 that calculates the G code of the selected code tap, and a plurality of codes for each code A G coefficient storage unit 64 that stores the G coefficient and outputs a plurality of G coefficients based on the calculated G code, and selects a filter tap that is a G component pixel of the first image and includes a plurality of pixels G product-tap calculation unit 62 that calculates the pixel value of the output pixel corresponding to each pixel of interest based on each pixel value of the selected filter tap and a plurality of output G coefficients 65 Equipped with a.
[Selection] Figure 11

Description

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

カメラの小型化、軽量化のために、3枚のイメージセンサを用いた3板式カメラではなく、1枚のイメージセンサを用いた単板式カメラが採用されている。   In order to reduce the size and weight of the camera, a single-plate camera using one image sensor is employed instead of a three-plate camera using three image sensors.

単板式カメラのイメージセンサの光入射面には、1画素毎に割り当てられた色フィルタアレイからなる色コーディングフィルタが設置される。これにより、このイメージセンサは、色コーディングフィルタにより色コーディングされた色成分の信号を1画素毎に生成する。色コーディングフィルタを構成する色フィルタアレイとして、例えば、R(赤),G(緑),B(青)の3原色フィルタアレイがある。   A color coding filter including a color filter array assigned to each pixel is installed on the light incident surface of the image sensor of the single-plate camera. As a result, the image sensor generates a color component signal color-coded by the color coding filter for each pixel. As a color filter array constituting the color coding filter, for example, there are three primary color filter arrays of R (red), G (green), and B (blue).

単板式カメラは、イメージセンサにより1画素毎に1つの色成分の信号を得て、各画素が持っている色成分の信号以外の色信号を線形補間処理により生成する。これにより、単板式カメラは、3板式カメラにより得られる画像に近い画像を得る。   The single-plate camera obtains one color component signal for each pixel by an image sensor, and generates a color signal other than the color component signal possessed by each pixel by linear interpolation processing. Thereby, the single plate type camera obtains an image close to the image obtained by the three plate type camera.

色コーディングフィルタを構成する色フィルタアレイとして、ベイヤー配列の3原色色フィルタアレイが用いられることが多い。ベイヤー配列では、Gの色フィルタが市松状に配置され、残った部分にRとBの各色フィルタが一列毎に交互に配置される。   As the color filter array constituting the color coding filter, a Bayer array three primary color filter array is often used. In the Bayer array, the G color filters are arranged in a checkered pattern, and the R and B color filters are alternately arranged in a row in the remaining portion.

イメージセンサの各画素には、R,G,Bの3原色のいずれか1つの色のフィルタが配置される。各画素は、配置されたフィルタの色に対応する画像信号のみを出力する。   Each pixel of the image sensor is provided with a filter of one of the three primary colors R, G, and B. Each pixel outputs only an image signal corresponding to the color of the arranged filter.

すなわち、Rの色フィルタが配置された画素からは、R成分の画像信号が出力されるが、G成分およびB成分の画像信号は出力されない。同様に、G成分の画素からは、G成分の画像信号のみが出力され、R成分およびB成分の画像信号は出力されない。B成分の画素からは、B成分の画像信号のみが出力され、R成分およびG成分の画像信号は出力されない。   That is, the R component image signal is output from the pixel in which the R color filter is arranged, but the G component and B component image signals are not output. Similarly, only the G component image signal is output from the G component pixel, and the R component and B component image signals are not output. From the B component pixel, only the B component image signal is output, and the R component and G component image signals are not output.

そこで、従来、不足する色成分を補間する技術であるDLMMSE法が開示されている(非特許文献1参照)。DLMMSE法では、まず、水平・垂直の2方向において、イメージセンサからの入力画像の各画素位置の補間色差が求められて、注目している画素の位置の近傍の5画素の統計量が算出される。   Therefore, conventionally, a DLMMSE method, which is a technique for interpolating insufficient color components, has been disclosed (see Non-Patent Document 1). In the DLMMSE method, first, the interpolated color difference of each pixel position of the input image from the image sensor is obtained in two directions, horizontal and vertical, and the statistics of five pixels in the vicinity of the position of the pixel of interest are calculated. The

算出された統計量を用いて、注目している画素の方向性(水平方向または垂直方向)が検出され、その検出結果に応じて、水平色差と垂直色差とが混合(按分)されることで、色差(R−G、B−G)が求められる。   By using the calculated statistics, the directionality (horizontal or vertical direction) of the pixel of interest is detected, and the horizontal color difference and the vertical color difference are mixed (prorated) according to the detection result. The color difference (RG, BG) is obtained.

このようにして求められた色差(R−G、B−G)に基づいて、G画素の画像信号、R画素の画像信号、およびB画素の画像信号がそれぞれ求められ、出力画像として生成される。   Based on the color differences (RG, BG) thus determined, an image signal for the G pixel, an image signal for the R pixel, and an image signal for the B pixel are respectively obtained and generated as an output image. .

また、3板式カメラのCCD出力に相当する画像信号を単板式カメラのCCDイメージセンサで得られるようにする技術が開示されている(特許文献1参照)。特許文献1の技術は、入力画像における注目画素に対応する画素およびその周辺の画素値を変数とし、予め学習により得られた係数を用いた積和演算により出力画像の注目画素の画素値を予測する。   In addition, a technique is disclosed in which an image signal corresponding to a CCD output of a three-plate camera is obtained by a CCD image sensor of a single-plate camera (see Patent Document 1). The technique of Patent Document 1 predicts a pixel value of a pixel of interest in an output image by a product-sum operation using a coefficient corresponding to the pixel of interest in an input image and its surrounding pixel values as variables and obtained in advance through learning. To do.

また、複数の色成分により構成される色フィルタアレイを有するイメージセンサの出力から、画質を劣化させることなく、各色成分の画像信号を得る技術が開示されている(特許文献2参照)。   Further, a technique for obtaining an image signal of each color component from an output of an image sensor having a color filter array composed of a plurality of color components without degrading image quality is disclosed (see Patent Document 2).

特許文献2の技術は、単板式画素部から出力される第1の画像から指定領域を選択し、その指定領域の各々の色成分の代表値を算出し、指定領域の画素値から得られる特徴量に基づいて、予め記憶されている係数を読み出す。そして、特許文献2の技術は、 指定領域内の所定の画素に係る画素値を予測タップとし、代表値を用いて予測タップの各色成分の画素値を変換値に変換し、変換値を変数とし、読み出された係数を用いた積和演算により、各色成分の画素のみで構成される画像の各画素値をそれぞれ演算する。   The technique of Patent Document 2 selects a designated area from a first image output from a single-plate pixel unit, calculates a representative value of each color component of the designated area, and is obtained from the pixel value of the designated area Based on the quantity, the coefficient stored in advance is read out. The technique of Patent Document 2 uses a pixel value related to a predetermined pixel in a designated area as a prediction tap, converts a pixel value of each color component of the prediction tap into a conversion value using a representative value, and uses the conversion value as a variable. Then, each pixel value of an image composed only of pixels of each color component is calculated by a product-sum operation using the read coefficient.

また、単板式カメラにより取得された画像信号の偽色や雑音を低減する技術が開示されている(特許文献3)。   In addition, a technique for reducing false color and noise of an image signal acquired by a single-plate camera is disclosed (Patent Document 3).

特許文献3の技術は、ベイヤー配列の単板式画素部から出力される画像信号により構成される第1の画像から、参照エリアを設定するとともに、参照エリアの領域を変化させて、参照エリア内の画素の画素値から得られる統計量を評価して、第1の画像内の注目位置の方向性を検出することで、注目位置の方向性をより高い精度で検出する。これにより、ナイキスト周波数に近い高周波成分を含む入力画像が入力された場合でも、参照エリアを広げることで、正確な方向性を検出して、確実に偽色や雑音を低減する。   The technique of Patent Document 3 sets a reference area from a first image configured by an image signal output from a single-plate pixel unit with a Bayer array, and changes the area of the reference area to change the reference area. By evaluating the statistic obtained from the pixel value of the pixel and detecting the direction of the target position in the first image, the direction of the target position is detected with higher accuracy. As a result, even when an input image including a high frequency component close to the Nyquist frequency is input, the reference area is widened to detect an accurate directionality and reliably reduce false colors and noise.

特開2000−308079公報JP 2000-308079 A 特開2014−200008公報JP2014-200008 特開2014−200033公報JP, 2014-200033, A

DLMMSE algorithm from L. Zhang and X. Wu, “Color demosaicking via directional linear minimum mean square-error estimation,” IEEE Trans. on Image Processing, vol. 14, no. 12, pp. 2167-2178, 2005.DLMMSE algorithm from L. Zhang and X. Wu, “Color demosaicking via directional linear minimum mean square-error estimation,” IEEE Trans. On Image Processing, vol. 14, no. 12, pp. 2167-2178, 2005.

非特許文献1の技術は、色差(R−G、B−G)に基づいて、すなわち、R画素やB画素の情報を用いてG画素の画像信号を生成する。このため、G画素の画像信号に予測誤差が生じるため、ジッパーノイズが発生して画質が劣化する問題がある。   The technique of Non-Patent Document 1 generates an image signal of G pixels based on color differences (RG, BG), that is, using information on R pixels and B pixels. For this reason, since a prediction error occurs in the image signal of G pixel, there is a problem that zipper noise occurs and the image quality deteriorates.

特許文献1の技術では、イメージセンサにおけるR、G、Bのそれぞれに対応する画素値が、そのまま、予測演算の変数であるタップとして用いられる。   In the technique of Patent Document 1, pixel values corresponding to R, G, and B in the image sensor are used as taps that are variables for prediction calculation as they are.

しかしながら、R、G、Bの各画素値は、もともと相関が小さいため、例えば、注目画素周辺の複数の画素値をタップとして入力しても、予測演算において、十分な効果を発揮することができなかった。例えば、R、G、Bの各画素値の変化にほとんど相関がみられない領域などにおいて予測演算により画素値が生成されると、ジッパーノイズ、偽色、色にじみ、リンギングなどの画質劣化が顕著に発生する問題がある。   However, since the R, G, and B pixel values are originally low in correlation, for example, even if a plurality of pixel values around the target pixel are input as taps, a sufficient effect can be exhibited in the prediction calculation. There wasn't. For example, when a pixel value is generated by a prediction calculation in a region where there is almost no correlation between changes in R, G, and B pixel values, image quality degradation such as zipper noise, false color, color blur, and ringing is significant. There is a problem that occurs.

特許文献2の技術でも、G画素の画素値の予測精度が不足しており、ジッパーノイズを十分に抑えることができない問題がある。   Even in the technique of Patent Document 2, the prediction accuracy of the pixel value of the G pixel is insufficient, and there is a problem that zipper noise cannot be sufficiently suppressed.

また、特許文献3の技術でも、偽色を改善できない場合や、また水平・垂直を閾値で2値判定をおこなっているため、中間レベルがうまく処理できない。規模が大きいなどのデメリットがあった。   Further, even with the technique of Patent Document 3, the intermediate level cannot be processed well because the false color cannot be improved or the binary determination is performed with the horizontal and vertical thresholds. There were disadvantages such as large scale.

本発明は、上述した従来の問題を解決するものである。すなわち、本発明の目的は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された画像から、画質を劣化させることなく、高画質の各色成分の画像を得ることができる画像処理装置、画像処理方法、プログラム及び撮像装置を提供することである。   The present invention solves the above-described conventional problems. That is, an object of the present invention is to obtain an image of each color component with high image quality from an image output from an imaging device in which pixels corresponding to each of a plurality of color components are configured in a predetermined arrangement without degrading the image quality. An image processing apparatus, an image processing method, a program, and an imaging apparatus that can be obtained are provided.

本発明に係る画像処理装置は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第1の画像に対して、前記第1の画像の中の1つの画素を注目画素として選択する注目画素選択部と、前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第1の配列パターンで配列されたコードタップを選択する第1のコードタップ選択部と、前記第1のコードタップ選択部により選択された前記コードタップの特徴量を示すコードを演算する第1のコード演算部と、コード毎に、コード分類型適応フィルタの第1の学習処理によって予め求められた複数の第1のタップ係数を記憶し、前記第1のコード演算部により演算されたコードに基づいて複数の第1のタップ係数を出力する第1の係数記憶部と、前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第2の配列パターンで配列されたフィルタタップを選択する第1のフィルタタップ選択部と、前記第1のフィルタタップ選択部により選択されたフィルタタップの各画素値と、前記第1の係数記憶部から出力された複数の第1のタップ係数と、に基づいて、前記注目画素毎に対応する出力画素の画素値を演算することで、前記第1の色成分の画像を生成する第1の画像生成部と、を備えている。前記第1のタップ係数は、所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1の色成分のみで構成された第1の生徒画像と、前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分のみで構成され、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした第1の教師画像と、を用いた前記第1の学習処理であって、前記第1の生徒画像の各画素と前記第1の教師画像の各画素のマッピングされた正規方程式を解く前記第1の学習処理により算出されたタップ係数である。 The image processing apparatus according to the present invention is configured so that one of the first images is output from a first image output from an imaging device in which pixels corresponding to each of a plurality of color components are configured in a predetermined arrangement. A pixel-of-interest selection unit that selects one pixel as a pixel of interest, and a pixel of a first color component that is a main component of the first image, and the pixel of interest selected by the pixel-of-interest selection unit A first code tap selection unit for selecting a code tap in which a plurality of pixels of the first color component are arranged in a first arrangement pattern; and a feature of the code tap selected by the first code tap selection unit A first code calculation unit for calculating a code indicating a quantity; and a plurality of first tap coefficients obtained in advance by a first learning process of a code classification type adaptive filter for each code; Performed by the code calculation unit A first coefficient storage unit that outputs a plurality of first tap coefficients based on the generated code, and a pixel of a first color component that is a main component of the first image, and the target pixel selection unit A first filter tap selection unit that selects a filter tap in which a plurality of pixels of the first color component are arranged in a second arrangement pattern for the selected pixel of interest; and the first filter tap selection. Based on each pixel value of the filter tap selected by the unit and a plurality of first tap coefficients output from the first coefficient storage unit, the pixel value of the output pixel corresponding to each pixel of interest is calculated. And a first image generation unit that generates an image of the first color component by calculation. The first tap coefficient is composed of only the first color component from an image in which the color component, the arrangement of the color components, and the size of the predetermined subject are the same as the first image. The first student image and the predetermined subject are composed of only the first color component having the same size as the first image, and half pixels in the horizontal direction and the vertical direction with respect to the first student image. The first learning process using the shifted first teacher image, and solving the mapped normal equation of each pixel of the first student image and each pixel of the first teacher image It is a tap coefficient calculated by the first learning process.

本発明に係る画像処理方法は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第1の画像に対して、前記第1の画像の中の1つの画素を注目画素として選択する注目画素選択ステップと、前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択ステップで選択された注目画素に対して、前記第1の色成分の複数の画素が第1の配列パターンで配列されたコードタップを選択する第1のコードタップ選択ステップと、前記第1のコードタップ選択ステップで選択された前記コードタップの特徴量を示すコードを演算する第1のコード演算ステップと、コード毎に、コード分類型適応フィルタの学習処理によって予め求められた複数の第1のタップ係数を記憶する係数記憶部から、前記第1のコード演算ステップで演算されたコードに基づいて複数の第1のタップ係数を読み出す第1の係数読み出しステップと、前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択ステップで選択された注目画素に対して、前記第1の色成分の複数の画素が第2の配列パターンで配列されたフィルタタップを選択する第1のフィルタタップ選択ステップと、前記第1のフィルタタップ選択ステップで選択されたフィルタタップの各画素値と、前記係数読み出しステップで読み出された複数の第1のタップ係数と、に基づいて、前記注目画素毎に対応する出力画素の画素値を演算することで、前記第1の色成分の画像を生成する画像生成ステップと、を備えている。前記第1のタップ係数は、所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1の色成分のみで構成された第1の生徒画像と、前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分のみで構成され、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした第1の教師画像と、を用いた第1の学習処理であって、前記第1の生徒画像の各画素と前記第1の教師画像の各画素のマッピングされた正規方程式を解く前記第1の学習処理により算出されたタップ係数である。 According to an image processing method of the present invention, one of the first images is output from a first image output from an imaging device in which pixels corresponding to a plurality of color components are configured in a predetermined arrangement. A pixel-of-interest selection step of selecting one pixel as a pixel of interest; and a pixel of a first color component that is a main component of the first image, and the pixel of interest selected in the pixel-of-interest selection step A first code tap selection step of selecting a code tap in which a plurality of pixels of the first color component are arranged in a first arrangement pattern; and a feature of the code tap selected in the first code tap selection step A first code calculation step for calculating a code indicating a quantity, and a coefficient storage unit for storing a plurality of first tap coefficients obtained in advance by learning processing of a code classification type adaptive filter for each code A first coefficient reading step of reading a plurality of first tap coefficients based on the code calculated in the first code calculation step; and a pixel of a first color component which is a main component of the first image A first filter tap selection step of selecting a filter tap in which a plurality of pixels of the first color component are arranged in a second arrangement pattern with respect to the attention pixel selected in the attention pixel selection step; , Corresponding to each pixel of interest based on each pixel value of the filter tap selected in the first filter tap selection step and a plurality of first tap coefficients read out in the coefficient reading step An image generation step of generating an image of the first color component by calculating a pixel value of the output pixel. The first tap coefficient is composed of only the first color component from an image in which the color component, the arrangement of the color components, and the size of the predetermined subject are the same as the first image. The first student image and the predetermined subject are composed of only the first color component having the same size as the first image, and half pixels in the horizontal direction and the vertical direction with respect to the first student image. The first learning process using the shifted first teacher image, wherein the first equation for solving the mapped normal equation of each pixel of the first student image and each pixel of the first teacher image 1 is a tap coefficient calculated by one learning process.

本発明に係るプログラムは、コンピュータを、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第1の画像に対して、前記第1の画像の中の1つの画素を注目画素として選択する注目画素選択部と、前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第1の配列パターンで配列されたコードタップを選択する第1のコードタップ選択部と、前記第1のコードタップ選択部により選択された前記コードタップの特徴量を示すコードを演算する第1のコード演算部と、コード毎に、コード分類型適応フィルタの学習処理によって予め求められた複数の第1のタップ係数を記憶し、前記第1のコード演算部により演算されたコードに基づいて複数の第1のタップ係数を出力する第1の係数記憶部と、前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第2の配列パターンで配列されたフィルタタップを選択する第1のフィルタタップ選択部と、前記第1のフィルタタップ選択部により選択されたフィルタタップの各画素値と、前記第1の係数記憶部から出力された複数の第1のタップ係数と、に基づいて、前記注目画素毎に対応する出力画素の画素値を演算することで、前記第1の色成分の画像を生成する第1の画像生成部と、して機能させるためのプログラムである。前記第1のタップ係数は、所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1の色成分のみで構成された第1の生徒画像と、前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分のみで構成され、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした第1の教師画像と、を用いた第1の学習処理であって、前記第1の生徒画像の各画素と前記第1の教師画像の各画素のマッピングされた正規方程式を解く前記第1の学習処理により算出されたタップ係数である。
The program according to the present invention causes a computer to store a first image output from an imaging device in which pixels corresponding to each of a plurality of color components are configured in a predetermined arrangement, in the first image. A pixel-of-interest selection unit that selects one pixel as a pixel of interest, and a pixel of the first color component that is a main component of the first image, and the pixel of interest selected by the pixel-of-interest selection unit, A first code tap selection unit that selects a code tap in which a plurality of pixels of the first color component are arranged in a first arrangement pattern; and the code tap selected by the first code tap selection unit A first code calculation unit that calculates a code indicating a feature quantity; and a plurality of first tap coefficients previously determined by a learning process of a code classification type adaptive filter for each code; Part A first coefficient storage unit that outputs a plurality of first tap coefficients based on the calculated code; and a pixel of a first color component that is a main component of the first image, and the pixel of interest selection A first filter tap selection unit that selects a filter tap in which a plurality of pixels of the first color component are arranged in a second arrangement pattern for the target pixel selected by the unit; and the first filter Based on each pixel value of the filter tap selected by the tap selection unit and a plurality of first tap coefficients output from the first coefficient storage unit, a pixel of an output pixel corresponding to each target pixel This is a program for functioning as a first image generation unit that generates an image of the first color component by calculating a value. The first tap coefficient is composed of only the first color component from an image in which the color component, the arrangement of the color components, and the size of the predetermined subject are the same as the first image. The first student image and the predetermined subject are composed of only the first color component having the same size as the first image, and half pixels in the horizontal direction and the vertical direction with respect to the first student image. The first learning process using the shifted first teacher image, wherein the first equation for solving the mapped normal equation of each pixel of the first student image and each pixel of the first teacher image 1 is a tap coefficient calculated by one learning process.

本発明に係る撮像装置は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子と、前記撮像素子から出力された第1の画像に対して画像処理を行う前記画像処理装置と、を備えている。

The imaging apparatus according to the present invention, which performs an imaging device pixels corresponding to each of the plurality of color components is constituted in a predetermined arrangement, the image processing to the first image output from the image sensor And a processing device.

本発明に係る画像処理装置、画像処理方法、プログラム及び撮像装置は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された画像から、各色成分の高画質の画像を得ることができる。   An image processing apparatus, an image processing method, a program, and an imaging apparatus according to the present invention provide a high-quality image of each color component from an image output from an imaging device in which pixels corresponding to each of a plurality of color components are configured in a predetermined arrangement. Images can be obtained.

撮像装置の一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of an imaging device. デモザイク部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a demosaic part. 仮想色差(R−G)生成部33の構成例を示すブロック図である。FIG. 4 is a block diagram illustrating a configuration example of a virtual color difference (RG) generation unit 33. 仮G生成部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a temporary G production | generation part. R画素位置における水平方向のG成分値の補間方法を説明する図である。It is a figure explaining the interpolation method of the G component value of the horizontal direction in a R pixel position. 水平補間色差及び垂直補間色差の説明図である。It is explanatory drawing of a horizontal interpolation color difference and a vertical interpolation color difference. 入力画像中のR44画素が注目画素の場合における仮Grの求め方を説明する図である。It is a figure explaining how to obtain | require temporary Gr in case R44 pixel in an input image is an attention pixel. 入力画像中のB55画素が注目画素の場合における仮Grの求め方を説明する図である。It is a figure explaining how to obtain | require temporary Gr in case B55 pixel in an input image is an attention pixel. 仮想色差(R−G)生成部内の仮G生成部による仮G生成ルーチンを説明するフローチャートである。It is a flowchart explaining the temporary G production | generation routine by the temporary G production | generation part in a virtual color difference (RG) production | generation part. G画素位置における仮Rの生成を説明する図である。It is a figure explaining the production | generation of provisional R in G pixel position. 高解像G生成部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a high-resolution G production | generation part. Gコードタップの構成例を示す図である。It is a figure which shows the structural example of a G code tap. Gフィルタタップの構成例を示す図である。It is a figure which shows the structural example of G filter tap. Gコード演算部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a G code calculating part. 1ビットDR量子化の例を説明する図である。It is a figure explaining the example of 1 bit DR quantization. 高解像(R−G)生成部の構成例を示すブロック図である。It is a block diagram which shows the structural example of a high-resolution (RG) production | generation part. (R−G)コードタップの構成例を示す図である。It is a figure which shows the structural example of a (RG) code tap. (R−G)フィルタタップの構成例を示す図である。It is a figure which shows the structural example of a (RG) filter tap. (B−G)コードタップの構成例を示す図である。(BG) It is a figure which shows the structural example of a code tap. (B−G)フィルタタップの構成例を示す図である。It is a figure which shows the structural example of a (BG) filter tap. デモザイク処理ルーチンを示すフローチャートである。It is a flowchart which shows a demosaic processing routine. 入力画像に対する画像処理によって生成された高解像画像を示す図である。It is a figure which shows the high-resolution image produced | generated by the image process with respect to an input image. 学習装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of a learning apparatus. 高解像度画像から生成される生徒画像及び教師画像を説明するための図である。It is a figure for demonstrating the student image and teacher image which are produced | generated from a high resolution image. G係数データ生成部の構成例を示す図である。It is a figure which shows the structural example of a G coefficient data generation part. (R−G)係数データ生成部の構成例を示す図である。It is a figure which shows the structural example of the (RG) coefficient data generation part. 学習装置による学習処理ルーチンを説明するフローチャートである。It is a flowchart explaining the learning process routine by a learning apparatus.

以下、図面を参照しながら本技術の実施の形態について説明する。
<撮像装置10の構成>
図1は、撮像装置10の一実施の形態の構成例を示すブロック図である。撮像装置10は、静止画、及び、動画のいずれも撮影することができる。
Hereinafter, embodiments of the present technology will be described with reference to the drawings.
<Configuration of Imaging Device 10>
FIG. 1 is a block diagram illustrating a configuration example of an embodiment of an imaging apparatus 10. The imaging device 10 can capture both still images and moving images.

撮像装置は、光学系11、イメージセンサ12、アナログ信号処理部13、アナログ/ディジタル(A/D)色分離部14、欠陥補正部15、デモザイク部16、色処理部17、ガンマ補正部18、Y色差変換部19、コーデック部20、出力部21、及び制御部22を備える。   The imaging apparatus includes an optical system 11, an image sensor 12, an analog signal processing unit 13, an analog / digital (A / D) color separation unit 14, a defect correction unit 15, a demosaic unit 16, a color processing unit 17, a gamma correction unit 18, A Y color difference conversion unit 19, a codec unit 20, an output unit 21, and a control unit 22 are provided.

光学系11は、例えば、図示しないズームレンズや、フォーカスレンズ、絞り、光学ローパスフィルタ等を有する。光学系11は、外部からの被写体光を、イメージセンサ12に入射させる。   The optical system 11 includes, for example, a zoom lens, a focus lens, a diaphragm, an optical low-pass filter, etc. (not shown). The optical system 11 causes subject light from the outside to enter the image sensor 12.

イメージセンサ12は、例えば、複数の受光素子(画素)を有するCMOS(Complementary Metal Oxide Semiconductor)イメージセンサである。イメージセンサ12の光入射面には、3原色RGBからなるベイヤー配列の色フィルタアレイが配置される。   The image sensor 12 is, for example, a CMOS (Complementary Metal Oxide Semiconductor) image sensor having a plurality of light receiving elements (pixels). On the light incident surface of the image sensor 12, a Bayer array color filter array composed of the three primary colors RGB is arranged.

イメージセンサ12は、光学系11からの入射光を受光し、受光素子毎に光電変換を行って、光学系11からの入射光に対応する電気信号として画像信号を出力する。したがって、Rの色フィルタが配置された画素(R画素)からは、R成分の画像信号が得られるが、G成分およびB成分の画像信号は得られない。同様に、G画素からは、G成分の画像信号が得られるが、R成分およびB成分の画像信号は得られない。B画素からは、B成分の画像信号が得られるが、R成分およびG成分の画像信号は得られない。   The image sensor 12 receives incident light from the optical system 11, performs photoelectric conversion for each light receiving element, and outputs an image signal as an electrical signal corresponding to the incident light from the optical system 11. Therefore, an R component image signal is obtained from a pixel (R pixel) in which an R color filter is arranged, but a G component and B component image signal cannot be obtained. Similarly, G component image signals can be obtained from the G pixels, but R component and B component image signals cannot be obtained. B pixel image signals are obtained from B pixels, but R component and G component image signals cannot be obtained.

アナログ信号処理部13は、イメージセンサ12から出力された画像信号に対して相関二重サンプリング処理等の所定のアナログ信号処理を実行する。
A/D色分離部14は、アナログ信号処理部13から出力された画像信号をA/D変換し、さらに色分離処理を行い、赤(R)、緑(G)、青(B)のそれぞれの画像データを出力する。
欠陥補正部15は、A/D色分離部14から出力されたRGBの各画像データに対して欠陥補正処理を実行する。
The analog signal processing unit 13 performs predetermined analog signal processing such as correlated double sampling processing on the image signal output from the image sensor 12.
The A / D color separation unit 14 performs A / D conversion on the image signal output from the analog signal processing unit 13, further performs color separation processing, and each of red (R), green (G), and blue (B) Output image data.
The defect correction unit 15 performs defect correction processing on the RGB image data output from the A / D color separation unit 14.

デモザイク部16は、欠陥補正部15から出力されたRGBの各画像データにデモザイク処理を実行する。なお、デモザイク部16の詳細な構成は後述する。   The demosaic unit 16 performs demosaic processing on the RGB image data output from the defect correction unit 15. The detailed configuration of the demosaic unit 16 will be described later.

色処理部17は、デモザイク部16から出力されたRGBの各画像データに色補正処理を実行する。
ガンマ補正部18は、色処理部17から出力されたRGBの画像データにガンマ補正処理を実行する。
Y色差変換部19は、ガンマ補正部18から出力されたRGBの画像データをY色差の画像データに変換する。
The color processing unit 17 performs color correction processing on the RGB image data output from the demosaic unit 16.
The gamma correction unit 18 performs gamma correction processing on the RGB image data output from the color processing unit 17.
The Y color difference conversion unit 19 converts the RGB image data output from the gamma correction unit 18 into Y color difference image data.

コーデック部20は、MPEGなどのエンコーダを用いて、Y色差変換部19から出力されたY色差の画像データを圧縮処理する。
出力部21は、コーデック部20からの画像データを出力する。例えば、出力部21は、半導体メモリや、磁気ディスク、光ディスク等の記録媒体を駆動する図示しないドライバを有し、コーデック部20からの画像データをその記録媒体に記録する。また、出力部21は、コーデック部20からの画像データを、例えば、ネットワークや各種ケーブル、無線などの通信手段に出力してもよい。
制御部22は、ユーザ操作等に従い、撮像装置10を構成する各ブロックを制御する。
The codec unit 20 compresses the Y color difference image data output from the Y color difference conversion unit 19 using an encoder such as MPEG.
The output unit 21 outputs the image data from the codec unit 20. For example, the output unit 21 includes a driver (not shown) that drives a recording medium such as a semiconductor memory, a magnetic disk, or an optical disk, and records the image data from the codec unit 20 on the recording medium. Further, the output unit 21 may output the image data from the codec unit 20 to a communication unit such as a network, various cables, or wireless.
The control unit 22 controls each block configuring the imaging device 10 according to a user operation or the like.

<デモザイク部16の構成例>
図2は、デモザイク部16の構成例を示すブロック図である。デモザイク部16で行われるデモザイク処理について説明する。
<Configuration example of demosaic unit 16>
FIG. 2 is a block diagram illustrating a configuration example of the demosaic unit 16. A demosaic process performed by the demosaic unit 16 will be described.

デモザイク部16は、入力画像の注目している画素(以下、注目画素という)の位置における方向性を検出し、その方向性に基づき仮G画像を生成する。その後、R及びBを補間した仮R及び仮Bを生成し、さらに仮想色差(R−G)及び仮想色差(B−G)を生成する。デモザイク部16は、これらの仮想色差(R−G)及び(B−G)の画素と、コード分類型適応フィルタの学習処理によって予め求められた係数と、に基づいて、入力画像の各画素位置から半画素シフトした画像を生成する。   The demosaic unit 16 detects the directionality of the pixel of interest (hereinafter referred to as the pixel of interest) in the input image, and generates a temporary G image based on the directionality. Thereafter, provisional R and provisional B obtained by interpolating R and B are generated, and further, a virtual color difference (RG) and a virtual color difference (B-G) are generated. The demosaic unit 16 determines each pixel position of the input image based on the virtual color difference (RG) and (BG) pixels and the coefficient obtained in advance by the learning process of the code classification type adaptive filter. To generate an image shifted by half a pixel.

また、デモザイク部16は、G画素の画素値と、コード分類型適応フィルタの学習処理によって予め求められた係数と、に基づいて、入力画像の各画素位置から半画素シフトした高解像G画像を生成する。最後に、デモザイク部16は、この高解像G画像と仮想色差(R−G)及び(B−G)とに基づいて、高解像R画像または高解像B画像を生成する。   In addition, the demosaic unit 16 is a high-resolution G image that is shifted by a half pixel from each pixel position of the input image based on the pixel value of the G pixel and the coefficient obtained in advance by the learning process of the code classification type adaptive filter. Is generated. Finally, the demosaic unit 16 generates a high resolution R image or a high resolution B image based on the high resolution G image and the virtual color differences (RG) and (BG).

デモザイク部16は、ベイヤー配列の色フィルタアレイが配置されたイメージセンサ12からの画像(入力画像)に対してデモザイク処理を施し、高解像R画像、高解像G画像、及び高解像B画像をそれぞれ出力する。   The demosaic unit 16 performs demosaic processing on an image (input image) from the image sensor 12 in which the color filter array of the Bayer array is arranged, and thereby a high resolution R image, a high resolution G image, and a high resolution B. Output each image.

以下の説明では、イメージセンサ12のR画素から出力された信号値を画素値Rとする。同様に、G画素、B画素から出力された信号値をそれぞれ画素値G、画素値Bとする。   In the following description, a signal value output from the R pixel of the image sensor 12 is referred to as a pixel value R. Similarly, signal values output from the G pixel and the B pixel are defined as a pixel value G and a pixel value B, respectively.

デモザイク部16は、入力画像から注目画素を選択する注目画素選択部31、入力G画像の遅延処理を行う遅延部32,仮想色差(R−G)を生成する仮想色差(R−G)生成部33、仮想色差(B−G)を生成する仮想色差(B−G)生成部34を備える。   The demosaic unit 16 includes a target pixel selection unit 31 that selects a target pixel from the input image, a delay unit 32 that performs a delay process on the input G image, and a virtual color difference (RG) generation unit that generates a virtual color difference (RG). 33. A virtual color difference (B−G) generation unit 34 that generates a virtual color difference (B−G) is provided.

さらに、デモザイク部16は、高解像G画像を生成する高解像G生成部35、高解像(R−G)を生成する高解像(R−G)生成部36、高解像(B−G)を生成する高解像(B−G)生成部37、加算器38、及び加算器39を備える。   Furthermore, the demosaic unit 16 includes a high resolution G generation unit 35 that generates a high resolution G image, a high resolution (RG) generation unit 36 that generates a high resolution (RG), and a high resolution ( A high-resolution (BG) generation unit 37 that generates BG), an adder 38, and an adder 39 are provided.

注目画素選択部31は、入力画像を構成する各画素を走査し、複数の画素の中から1つの画素を注目画素として順次選択する。これにより、デモザイク部16の各ブロックでは、選択中の注目画素に関する画像処理が実行される。   The target pixel selection unit 31 scans each pixel constituting the input image, and sequentially selects one pixel as the target pixel from the plurality of pixels. Thereby, in each block of the demosaic unit 16, image processing relating to the selected target pixel is executed.

遅延部32は、高解像G生成部35、高解像(R−G)生成部36、高解像(B−G)生成部37における画像生成タイミングがそろうように、入力画像に遅延処理を施して、高解像G生成部35へ出力する。   The delay unit 32 performs a delay process on the input image so that the image generation timings in the high-resolution G generation unit 35, the high-resolution (RG) generation unit 36, and the high-resolution (BG) generation unit 37 are aligned. And output to the high-resolution G generator 35.

仮想色差(R−G)生成部33は、入力画像R及びGを用いて、入力画像のR画素位置及びG画素位置における色差(R−G)(以下、仮想色差(R−G)という。)を生成する。また、仮想色差(B−G)生成部34は、入力画像B及びGを用いて、入力画像のB画素位置及びG画素位置における色差(B−G)(以下、仮想色差(B−G)という。)を生成する。   The virtual color difference (R−G) generation unit 33 uses the input images R and G, and the color difference (R−G) at the R pixel position and the G pixel position of the input image (hereinafter referred to as virtual color difference (R−G)). ) Is generated. Further, the virtual color difference (B−G) generation unit 34 uses the input images B and G to perform color difference (B−G) (hereinafter referred to as virtual color difference (B−G)) at the B pixel position and the G pixel position of the input image. Is generated).

高解像G生成部35は、遅延部32から出力された入力画像Gのみを用いて、入力画像Gに対して2倍の画素数を有する高解像G画像を生成する。高解像(R−G)生成部36は、仮想色差(R−G)生成部33から出力された仮想色差(R−G)を用いて、入力画像Rに対して4倍の画素数を有する高解像R画像を生成する。高解像(B−G)生成部37は、仮想色差(B−G)生成部34から出力された仮想色差(B−G)を用いて、入力画像Bに対して4倍の画素数を有する高解像B画像を生成する。   The high-resolution G generation unit 35 generates a high-resolution G image having twice the number of pixels with respect to the input image G using only the input image G output from the delay unit 32. The high resolution (RG) generation unit 36 uses the virtual color difference (RG) output from the virtual color difference (RG) generation unit 33 to increase the number of pixels four times that of the input image R. A high-resolution R image having the same is generated. The high resolution (BG) generation unit 37 uses the virtual color difference (BG) output from the virtual color difference (BG) generation unit 34 to increase the number of pixels four times that of the input image B. A high resolution B image is generated.

加算器38は、高解像G生成部35から出力された高解像G画像と、高解像(R−G)生成部36から出力された高解像(R−G)と、を加算することで、高解像R画像を生成する。加算器39は、高解像G生成部35から出力された高解像G画像と、高解像(B−G)生成部37から出力された高解像(B−G)と、を加算することで、高解像B画像を生成する。   The adder 38 adds the high resolution G image output from the high resolution G generation unit 35 and the high resolution (RG) output from the high resolution (RG) generation unit 36. By doing so, a high-resolution R image is generated. The adder 39 adds the high resolution G image output from the high resolution G generator 35 and the high resolution (BG) output from the high resolution (BG) generator 37. By doing so, a high-resolution B image is generated.

<仮想色差(R−G)生成部33の構成例>
図3は、仮想色差(R−G)生成部33の構成例を示すブロック図である。仮想色差(R−G)生成部33は、仮G生成部41、仮R生成部42、及び仮想色差(R−G)演算部43を備える。
<Configuration Example of Virtual Color Difference (RG) Generation Unit 33>
FIG. 3 is a block diagram illustrating a configuration example of the virtual color difference (R−G) generation unit 33. The virtual color difference (R−G) generation unit 33 includes a temporary G generation unit 41, a temporary R generation unit 42, and a virtual color difference (R−G) calculation unit 43.

仮G生成部41は、入力画像Gを用いて、入力画像のR位置において補間されたG成分値である仮Gを生成する。仮R生成部42は、入力画像Rを用いて、入力画像のG位置において補間されたR成分値である仮Rを生成する。   The provisional G generation unit 41 uses the input image G to generate a provisional G that is a G component value interpolated at the R position of the input image. The provisional R generation unit 42 uses the input image R to generate a provisional R that is an R component value interpolated at the G position of the input image.

仮想色差(R−G)演算部43は、入力画像のそれぞれのR位置及びG位置における色差(R−G)(以下、仮想色差(R−G)という。)を生成する。具体的には、仮想色差(R−G)演算部43は、入力画像のR位置においては、入力画像Rと仮G生成部41で生成された仮Gとを用いて、R−仮Gを演算することで、仮想色差(R−G)を生成する。仮想色差(R−G)演算部43は、入力画像のG位置においては、入力画像Gと仮R生成部42で生成された仮Rとを用いて、仮R−Gを演算することで、仮想色差(R−G)を生成する。なお、仮想色差(R−G)演算部43は、入力画像のB位置においては、仮想色差を生成しない。   The virtual color difference (RG) calculation unit 43 generates a color difference (RG) at each R position and G position of the input image (hereinafter referred to as virtual color difference (RG)). Specifically, the virtual color difference (RG) calculation unit 43 uses the input image R and the temporary G generated by the temporary G generation unit 41 to calculate the R-temporary G at the R position of the input image. By calculating, a virtual color difference (R−G) is generated. The virtual color difference (R−G) calculation unit 43 calculates a temporary RG using the input image G and the temporary R generated by the temporary R generation unit 42 at the G position of the input image, A virtual color difference (RG) is generated. Note that the virtual color difference (RG) calculation unit 43 does not generate a virtual color difference at the B position of the input image.

図4は、仮G生成部41の構成例を示すブロック図である。
仮G生成部41は、水平補間部51、水平補間色差演算部52、水平補間色差統計量算出部53、垂直補間部54、垂直補間色差演算部55、垂直補間色差統計量算出部56、および仮G演算部57を備える。
水平補間部81は、入力画像のR画素の画素位置(以下、R画素位置という。)において水平方向に補間されたG成分値である補間値Ghを算出する。
FIG. 4 is a block diagram illustrating a configuration example of the provisional G generation unit 41.
The provisional G generation unit 41 includes a horizontal interpolation unit 51, a horizontal interpolation color difference calculation unit 52, a horizontal interpolation color difference statistic calculation unit 53, a vertical interpolation unit 54, a vertical interpolation color difference calculation unit 55, a vertical interpolation color difference statistic calculation unit 56, and A provisional G calculation unit 57 is provided.
The horizontal interpolation unit 81 calculates an interpolated value Gh that is a G component value interpolated in the horizontal direction at the pixel position of the R pixel of the input image (hereinafter referred to as R pixel position).

図5は、R画素位置における水平方向のG成分値の補間方法を説明する図である。
ベイヤー配列において、R画素が中心画素となる場合、その中心画素の周囲(上下左右)には4つのG画素である画素G1〜G4が配置される。この場合、水平補間部81は、中心画素の左右両隣に位置するG2画素の画素値G2と、G3画素の画素値G3とを用いて、式(1)に従って、中心画素の画素位置における水平方向に補間されたG成分値である補間値Ghを演算する。
Gh=(G2+G3)/2 ・・・(1)
FIG. 5 is a diagram for explaining a method of interpolating the horizontal G component value at the R pixel position.
In the Bayer array, when the R pixel is a central pixel, pixels G1 to G4, which are four G pixels, are arranged around the central pixel (up, down, left, and right). In this case, the horizontal interpolation unit 81 uses the pixel value G2 of the G2 pixel located on both the left and right sides of the center pixel and the pixel value G3 of the G3 pixel in the horizontal direction at the pixel position of the center pixel according to Equation (1). An interpolated value Gh, which is the G component value interpolated in (5), is calculated.
Gh = (G2 + G3) / 2 (1)

水平補間部51により補間された補間値Ghは、水平補間色差演算部52と仮G演算部57に供給される。これにより、入力画像のR画素置では、画素値Rおよび補間値Ghが得られる。   The interpolation value Gh interpolated by the horizontal interpolation unit 51 is supplied to the horizontal interpolation color difference calculation unit 52 and the provisional G calculation unit 57. Thereby, the pixel value R and the interpolation value Gh are obtained in the R pixel arrangement of the input image.

水平補間色差演算部52は、各R画素位置において、入力画像のうちのR画素位置の画素値Rと、水平補間部51から供給された水平方向の補間値Ghと、の差分である水平補間色差rhを演算する。具体的には、水平補間色差演算部52は、式(2)に従って、水平補間色差rhを演算する。
rh=R−Gh ・・・(2)
The horizontal interpolation color difference calculation unit 52 performs horizontal interpolation that is a difference between the pixel value R at the R pixel position in the input image and the horizontal interpolation value Gh supplied from the horizontal interpolation unit 51 at each R pixel position. The color difference rh is calculated. Specifically, the horizontal interpolation color difference calculation unit 52 calculates the horizontal interpolation color difference rh according to Expression (2).
rh = R−Gh (2)

水平補間色差演算部52により求められた水平補間色差rhは、水平補間色差統計量算出部53及び仮G演算部57に供給される。
水平補間色差統計量算出部53は、水平補間色差演算部52から供給される水平補間色差rhに基づいて、水平補間色差rhの平均である平均Arghと、水平補間色差rhの分散である分散Vrghとをそれぞれ算出し、これらの値を仮G演算部57に供給する。
一方、垂直補間部54は、入力画像のR画素位置において垂直方向に補間されたG成分値である補間値Gvを算出する。
The horizontal interpolation color difference rh obtained by the horizontal interpolation color difference calculation unit 52 is supplied to the horizontal interpolation color difference statistic calculation unit 53 and the provisional G calculation unit 57.
Based on the horizontal interpolation color difference rh supplied from the horizontal interpolation color difference calculation unit 52, the horizontal interpolation color difference statistic calculation unit 53 calculates an average Argh that is an average of the horizontal interpolation color difference rh and a variance Vrgh that is a variance of the horizontal interpolation color difference rh. Are supplied to the provisional G calculation unit 57.
On the other hand, the vertical interpolation unit 54 calculates an interpolation value Gv that is a G component value interpolated in the vertical direction at the R pixel position of the input image.

垂直補間部54は、図5に示すように、中心画素の上下両隣に位置するG1画素の画素値G1と、G4画素の画素値G4とを用いて、式(3)に従って、中心画素の画素位置における垂直方向に補間されたG成分値である補間値Gvを演算する。
Gv=(G1+G4)/2 ・・・(3)
As shown in FIG. 5, the vertical interpolation unit 54 uses the pixel value G1 of the G1 pixel and the pixel value G4 of the G4 pixel located on both the upper and lower sides of the central pixel and the pixel of the central pixel according to the equation (3). An interpolation value Gv that is a G component value interpolated in the vertical direction at the position is calculated.
Gv = (G1 + G4) / 2 (3)

垂直補間部54により補間された補間値Gvは、垂直補間色差演算部55と仮G演算部57に供給される。これにより、入力画像のR画素置では、画素値Rおよび補間値Gvが得られる。   The interpolation value Gv interpolated by the vertical interpolation unit 54 is supplied to the vertical interpolation color difference calculation unit 55 and the provisional G calculation unit 57. Thereby, the pixel value R and the interpolation value Gv are obtained in the R pixel arrangement of the input image.

垂直補間色差演算部55は、各R画素位置において、入力画像のうちのR画素位置の画素値Rと、垂直補間部54から供給された垂直方向の補間値Gvと、の差分である垂直補間色差rvを演算する。具体的には、垂直補間色差演算部55は、式(4)に従って、垂直補間色差rvを演算する。
rv=R−Gv ・・・(4)
The vertical interpolation color difference calculation unit 55 performs vertical interpolation, which is a difference between the pixel value R at the R pixel position in the input image and the vertical interpolation value Gv supplied from the vertical interpolation unit 54 at each R pixel position. The color difference rv is calculated. Specifically, the vertical interpolation color difference calculation unit 55 calculates the vertical interpolation color difference rv according to Equation (4).
rv = R−Gv (4)

垂直補間色差演算部55により求められた垂直補間色差rvは、垂直補間色差統計量算出部56及び仮G演算部57に供給される。   The vertical interpolation color difference rv obtained by the vertical interpolation color difference calculation unit 55 is supplied to the vertical interpolation color difference statistic calculation unit 56 and the provisional G calculation unit 57.

垂直補間色差統計量算出部56は、水平補間色差演算部55から供給される垂直補間色差rvに基づいて、垂直補間色差rvの平均である平均Argvと、垂直補間色差rvの分散である分散Vrgvとをそれぞれ算出し、これらの値を仮G演算部57に供給する。   Based on the vertical interpolation color difference rv supplied from the horizontal interpolation color difference calculation unit 55, the vertical interpolation color difference statistic calculation unit 56 calculates the average Argv that is the average of the vertical interpolation color difference rv and the variance Vrgv that is the variance of the vertical interpolation color difference rv. Are supplied to the provisional G calculation unit 57.

仮G演算部57は、水平補間色差演算部52で求められた水平補間色差rh、水平補間色差統計量算出部53で求められた平均Argh及び分散Vrghと、垂直補間色差演算部55で求められた垂直補間色差rvと、垂直補間色差統計量算出部56で求められた平均Argv及び分散Vrgvと、を用いて、R画素位置におけるG成分値である仮Gを演算する。   The provisional G calculation unit 57 is calculated by the horizontal interpolation color difference calculation unit 52, the horizontal interpolation color difference rh obtained by the horizontal interpolation color difference calculation unit 52, the average Argh and variance Vrgh obtained by the horizontal interpolation color difference statistic calculation unit 53, and the vertical interpolation color difference calculation unit 55. Using the vertical interpolation color difference rv and the average Argv and variance Vrgv obtained by the vertical interpolation color difference statistic calculation unit 56, a temporary G that is a G component value at the R pixel position is calculated.

仮G演算部57は、最初に、水平補間色差rhの分散Vrghと、垂直補間色差rvの分散Vrgvの大小判定を行い、大きい方をLVrg、小さい方をSVrgと設定する。そして、仮G演算部57は、式(5)に従って、R画素位置における仮Gを演算する。   First, the provisional G calculation unit 57 determines the magnitude of the variance Vrgh of the horizontal interpolation color difference rh and the variance Vrgv of the vertical interpolation color difference rv, and sets the larger one as LVrg and the smaller one as SVrg. Then, the temporary G calculation unit 57 calculates the temporary G at the R pixel position according to the equation (5).

一方、仮想色差(B−G)生成部34は、仮想色差(R−G)生成部33と同様に構成されるが、仮想色差(R−G)生成部33で使用したR画素位置や画素値Rの代わりに、B画素位置や画素値Bを使用する。   On the other hand, the virtual color difference (B−G) generation unit 34 is configured in the same manner as the virtual color difference (R−G) generation unit 33, but the R pixel position and pixel used in the virtual color difference (R−G) generation unit 33. Instead of the value R, the B pixel position and the pixel value B are used.

よって、仮想色差(B−G)生成部34は、仮想色差(R−G)生成部33と同様に、B画素位置において、水平方向に補間されたG成分値である補間値Gh、垂直方向に補間されたG成分値である補間値Gvを算出する。   Therefore, similarly to the virtual color difference (RG) generation unit 33, the virtual color difference (B−G) generation unit 34 performs the interpolation value Gh that is the G component value interpolated in the horizontal direction at the B pixel position, and the vertical direction. An interpolated value Gv, which is a G component value interpolated in (5), is calculated.

さらに、仮想色差(B−G)生成部34は、水平補間色差bh(=B−Gh)を演算し、当該水平補間色差bhに基づいて、水平補間色差bhの平均である平均Abghと、水平補間色差bhの分散である分散Vbghとをそれぞれ算出する。   Further, the virtual color difference (B−G) generation unit 34 calculates the horizontal interpolation color difference bh (= B−Gh), and based on the horizontal interpolation color difference bh, the average Abgh that is the average of the horizontal interpolation color difference bh, and the horizontal A variance Vbgh which is a variance of the interpolated color difference bh is calculated.

仮想色差(B−G)生成部34は、同様に、垂直補間色差bv(=B−Gv)を演算し、当該垂直補間色差bvに基づいて、垂直補間色差bvの平均である平均Abgvと、垂直補間色差bvの分散である分散Vbgvとをそれぞれ算出する。   Similarly, the virtual color difference (B−G) generation unit 34 calculates the vertical interpolation color difference bv (= B−Gv), and based on the vertical interpolation color difference bv, an average Abgv that is an average of the vertical interpolation color difference bv, A variance Vbgv that is a variance of the vertical interpolation color difference bv is calculated.

仮想色差(B−G)生成部34は、水平補間色差bh、平均Abgh及び分散Vbgh、垂直補間色差bv、平均Abgv及び分散Vbgvを用いて、B画素位置におけるG成分値である仮Gを演算する。   The virtual color difference (B−G) generation unit 34 calculates a temporary G that is a G component value at the B pixel position by using the horizontal interpolation color difference bh, the average Abgh and variance Vbgh, the vertical interpolation color difference bv, the average Abgv, and variance Vbgv. To do.

このとき、水平補間色差bhの分散Vbghと、垂直補間色差bvの分散Vbgvの大小判定が行われ、大きい方がLVbg、小さい方がSVbgに設定される。そして、式(6)に従って、B画素位置における仮Gが演算される。   At this time, the size of the variance Vbgh of the horizontal interpolation color difference bh and the variance Vbgv of the vertical interpolation color difference bv is determined, and the larger one is set to LVbg and the smaller one is set to SVbg. Then, a temporary G at the B pixel position is calculated according to the equation (6).

図6は、水平補間色差及び垂直補間色差の説明図である。図中のそれぞれの円は、1画素を表す。画素毎に、色成分値が与えられる。   FIG. 6 is an explanatory diagram of the horizontal interpolation color difference and the vertical interpolation color difference. Each circle in the figure represents one pixel. A color component value is given for each pixel.

入力画像におけるR画素位置においては、水平方向の補間値Ghが演算される。そして、R画素位置毎に、画素値Rと補間値Ghとの差分が演算され、水平補間色差rhが求められる。つまり、入力画像のR画素位置では、rh=R−Ghが演算される。   At the R pixel position in the input image, a horizontal interpolation value Gh is calculated. Then, the difference between the pixel value R and the interpolation value Gh is calculated for each R pixel position, and the horizontal interpolation color difference rh is obtained. That is, rh = R−Gh is calculated at the R pixel position of the input image.

さらに、R画素位置において、垂直方向の補間値Gvが演算される。そして、R画素位置毎に、画素値Rと補間値Gvとの差分が演算され、垂直補間色差rvが求められる。つまり、入力画像のR画素位置では、rv=R−Gvも演算される。   Further, an interpolation value Gv in the vertical direction is calculated at the R pixel position. Then, for each R pixel position, the difference between the pixel value R and the interpolation value Gv is calculated to obtain the vertical interpolation color difference rv. That is, rv = R−Gv is also calculated at the R pixel position of the input image.

一方、入力画像におけるB画素位置においては、水平方向の補間値Ghが演算される。そして、B画素位置毎に、画素値Bと補間値Ghとの差分が演算され、水平補間色差bhが求められる。つまり、入力画像のB画素位置では、bh=B−Ghが演算される。   On the other hand, the horizontal interpolation value Gh is calculated at the B pixel position in the input image. Then, for each B pixel position, the difference between the pixel value B and the interpolation value Gh is calculated to obtain the horizontal interpolation color difference bh. That is, bh = B−Gh is calculated at the B pixel position of the input image.

さらに、B画素位置において、垂直方向の補間値Gvが演算される。そして、B画素位置毎に、画素値Bと補間値Gvとの差分が演算され、垂直補間色差bvが求められる。つまり、入力画像のB画素位置では、bv=B−Gvも演算される。   Further, the interpolation value Gv in the vertical direction is calculated at the B pixel position. Then, for each B pixel position, the difference between the pixel value B and the interpolation value Gv is calculated to obtain the vertical interpolation color difference bv. That is, bv = B−Gv is also calculated at the B pixel position of the input image.

R画素位置の仮Grは、垂直補間色差rvまたは水平補間色差rhにおける注目位置を中心とした参照画素毎に求められる。また、B画素位置の仮Gbは、垂直補間色差bvまたは水平補間色差bhにおける注目位置を中心とした参照画素毎に求められる。   The provisional Gr at the R pixel position is obtained for each reference pixel centered on the target position in the vertical interpolation color difference rv or the horizontal interpolation color difference rh. The provisional Gb at the B pixel position is obtained for each reference pixel centered on the target position in the vertical interpolation color difference bv or the horizontal interpolation color difference bh.

図7は、入力画像中のR44画素が注目画素の場合における仮Grの求め方を説明する図である。なお、図中の上段の各円内に記されたR、G、Bのいずれかの文字は、各画素の色成分を表す。R、G、Bのいずれかに続く数字は、左上から順にY方向の位置を示す0〜9、X方向の位置を示す0〜9の2桁の番号が付されている。   FIG. 7 is a diagram for explaining how to obtain the temporary Gr when the R44 pixel in the input image is the target pixel. Note that any of R, G, and B written in each upper circle in the figure represents the color component of each pixel. Numbers following any of R, G, and B are numbered with two-digit numbers from 0 to 9 indicating the position in the Y direction and 0 to 9 indicating the position in the X direction in order from the upper left.

また、図中の下段の各円内に記されたrh、bhは、R画素又はB画素の位置の水平補間色差を表す。rv、bvは、R画素又はB画素の位置の垂直補間色差を表す。さらに、rh、bh、rv、bvに続く番号は、入力画像の対応する画素と同一の番号である。   In addition, rh and bh written in each lower circle in the drawing represent the horizontal interpolation color difference at the position of the R pixel or the B pixel. rv and bv represent the vertical interpolation color difference at the position of the R pixel or the B pixel. Furthermore, the numbers following rh, bh, rv, and bv are the same numbers as the corresponding pixels of the input image.

水平補間色差rhは、例えば次のように算出される。
rh00=R00−Gh00
rh02=R02−Gh02
rh04=R04−Gh04
The horizontal interpolation color difference rh is calculated as follows, for example.
rh00 = R00-Gh00
rh02 = R02-Gh02
rh04 = R04-Gh04

水平補間色差bhは、例えば次のように算出される。
bh11=B11−Gh11
bh13=B13−Gh13
bh15=B15−Gh15
The horizontal interpolation color difference bh is calculated as follows, for example.
bh11 = B11−Gh11
bh13 = B13−Gh13
bh15 = B15−Gh15

垂直補間色差rvは、例えば次のように算出される。
rv00=R00−Gv00
rv02=R02−Gv02
rv04=R04−Gv04
The vertical interpolation color difference rv is calculated as follows, for example.
rv00 = R00-Gv00
rv02 = R02-Gv02
rv04 = R04-Gv04

垂直補間色差bvは、例えば次のように算出される。
bv11=B11−Gv11
bv13=B13−Gv13
bv15=B15−Gv15
なお、他の画素位置においても同様の演算が行われる。
The vertical interpolation color difference bv is calculated as follows, for example.
bv11 = B11−Gv11
bv13 = B13−Gv13
bv15 = B15−Gv15
The same calculation is performed at other pixel positions.

R44画素が注目画素の場合、R44画素の画素位置を中心とする複数の参照画素の画素値に基づいて、水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv及び分散Vrgvが求められる。   When the R44 pixel is the target pixel, the horizontal interpolation color difference average Argh and variance Vrgh, and the vertical interpolation color difference average Argv and variance Vrgv are obtained based on the pixel values of a plurality of reference pixels centered on the pixel position of the R44 pixel. .

複数の参照画素は、R44画素を中心として十字状に配列された9画素(図7の下段の太線の円)が該当する。ただし、参照画素は、十字状に配列された9画素に限定されるものではない。また、参照画素は、注目画素を中心として矩形に配列されたものでもよいが、画素数が少なく、広い領域をカバーできるものが好ましい。   The plurality of reference pixels corresponds to 9 pixels (thick line circle in the lower part of FIG. 7) arranged in a cross shape with the R44 pixel as the center. However, the reference pixels are not limited to nine pixels arranged in a cross shape. The reference pixels may be arranged in a rectangular shape with the target pixel as the center, but it is preferable that the reference pixels have a small number of pixels and can cover a wide area.

具体的には、水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv及び分散Vrgvは、次の式(7)の従って算出される。   Specifically, the horizontal interpolation color difference average Argh and variance Vrgh, and the vertical interpolation color difference average Argv and variance Vrgv are calculated according to the following equation (7).

Argh=A(rh04,rh24,rh40,rh42,rh44,rh46,rh48,rh64,rh84)
Argv=A(rv04,rv24,rv40,rv42,rv44,rv46,rv48,rv64,rv84)
Vrgh=V(rh04,rh24,rh40,rh42,rh44,rh46,rh48,rh64,rh84)
Vrgv=V(rv04,rv24,rv40,rv42,rv44,rv46,rv48,rv64,rv84)
・・・(7)
Argh = A (rh04, rh24, rh40, rh42, rh44, rh46, rh48, rh64, rh84)
Argv = A (rv04, rv24, rv40, rv42, rv44, rv46, rv48, rv64, rv84)
Vrgh = V (rh04, rh24, rh40, rh42, rh44, rh46, rh48, rh64, rh84)
Vrgv = V (rv04, rv24, rv40, rv42, rv44, rv46, rv48, rv64, rv84)
... (7)

そして、R画素位置における仮Grは、以上のように求められた水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv及び分散Vrgv等に基づき、上述した式(5)に従って演算される。   The provisional Gr at the R pixel position is calculated according to the above-described equation (5) based on the horizontal interpolation color difference average Argh and variance Vrgh, the vertical interpolation color difference average Argv and variance Vrgv, and the like obtained as described above. .

図8は、入力画像中のB55画素が注目画素の場合における仮Grの求め方を説明する図である。
B55画素が注目画素の場合、B55画素の画素位置を中心とする複数の参照画素の画素値に基づいて、水平補間色差の平均Abgh及び分散Vbgh、垂直補間色差の平均Abgv及び分散Vbgvが求められる。複数の参照画素は、B55画素を中心として十字状に配列された9画素(図8の下段の太線の円)が該当するが、この例に限定されるものではない。
FIG. 8 is a diagram for explaining how to obtain the temporary Gr when the B55 pixel in the input image is the target pixel.
When the B55 pixel is the target pixel, the horizontal interpolation color difference average Abgh and variance Vbgh, and the vertical interpolation color difference average Abgv and variance Vbgv are obtained based on the pixel values of a plurality of reference pixels centered on the pixel position of the B55 pixel. . The plurality of reference pixels correspond to nine pixels (thick lined circle in the lower part of FIG. 8) arranged in a cross shape with the B55 pixel as the center, but are not limited to this example.

具体的には、水平補間色差の平均Abgh及び分散Vbgh、垂直補間色差の平均Abgv及び分散Vbgvは、次の式(8)の従って算出される。   Specifically, the average Abgh and variance Vbgh of the horizontal interpolation color difference and the average Abgv and variance Vbgv of the vertical interpolation color difference are calculated according to the following equation (8).

Abgh=A(bh15,bh35,bh51,bh53,bh55,bh57,bh59,bh75,rh95)
Abgv=A(bv15,bv35,bv51,bv53,bv55,bv57,bv59,bv75,rv95)
Vbgh=V(bh15,bh35,bh51,bh53,bh55,bh57,bh59,bh75,rh95)
Vbgv=V(bv15,bv35,bv51,bv53,bv55,bv57,bv59,bv75,rv95)
・・・(8)
Abgh = A (bh15, bh35, bh51, bh53, bh55, bh57, bh59, bh75, rh95)
Abgv = A (bv15, bv35, bv51, bv53, bv55, bv57, bv59, bv75, rv95)
Vbgh = V (bh15, bh35, bh51, bh53, bh55, bh57, bh59, bh75, rh95)
Vbgv = V (bv15, bv35, bv51, bv53, bv55, bv57, bv59, bv75, rv95)
... (8)

そして、画素位置における仮Gbは、以上のように求められた水平補間色差の平均Abgh及び分散Vbgh、垂直補間色差の平均Abgv及び分散Vbgv等に基づき、上述した式(6)に従って演算される。   The provisional Gb at the pixel position is calculated according to the above-described equation (6) based on the average Abgh and variance Vbgh of horizontal interpolation color differences, the average Abgv and variance Vbgv of vertical interpolation color differences obtained as described above.

<仮G生成ルーチン>
図9は、仮想色差(R−G)生成部33内の仮G生成部41による仮G生成ルーチンを説明するフローチャートである。ここでは、R画素位置における仮Gの生成について説明する。なお、B画素位置における仮Gの生成、つまり仮想色差(B−G)生成部34による仮Gの生成も、図9に示すルーチンと同様に行われる。
<Provisional G generation routine>
FIG. 9 is a flowchart illustrating a temporary G generation routine by the temporary G generation unit 41 in the virtual color difference (RG) generation unit 33. Here, generation of the provisional G at the R pixel position will be described. The generation of the temporary G at the B pixel position, that is, the generation of the temporary G by the virtual color difference (B−G) generation unit 34 is performed in the same manner as the routine shown in FIG.

仮G生成部41の入力画像は、ベイヤー配列の色フィルタアレイが配置されたイメージセンサ12から出力された画像である。このため、入力画像は、イメージセンサ12のG画素から出力されたG画像、R画素から出力されたR画像、及びB画素から出力されたB画像で構成される。   The input image of the provisional G generation unit 41 is an image output from the image sensor 12 in which a Bayer array color filter array is arranged. Therefore, the input image is composed of a G image output from the G pixel of the image sensor 12, an R image output from the R pixel, and a B image output from the B pixel.

ステップS11において、仮G生成部41内の水平補間部51及び垂直補間部54は、入力画像におけるR画素とB画素のそれぞれの画素位置における式(1)及び式(3)を演算する。これにより、中心画素の画素位置における水平方向に補間されたG成分の値である補間値Ghと、垂直方向に補間されたG成分の値である補間値Gvとが算出される。そして、ステップS12に進む。   In step S11, the horizontal interpolation unit 51 and the vertical interpolation unit 54 in the provisional G generation unit 41 calculate Expressions (1) and (3) at the pixel positions of the R pixel and the B pixel in the input image. As a result, an interpolation value Gh that is the value of the G component interpolated in the horizontal direction at the pixel position of the center pixel and an interpolation value Gv that is the value of the G component interpolated in the vertical direction are calculated. Then, the process proceeds to step S12.

ステップS12において、水平補間色差演算部52及び垂直補間色差演算部55は、入力画像におけるR画素とB画素のそれぞれの画素位置における式(2)及び式(4)を演算する。これにより、水平補間色差rhと垂直補間色差rvが算出され、算出された各値が図示しないメモリに保持される。そして、ステップS13に進む。   In step S12, the horizontal interpolation color difference calculation unit 52 and the vertical interpolation color difference calculation unit 55 calculate Expressions (2) and (4) at the respective pixel positions of the R pixel and the B pixel in the input image. Accordingly, the horizontal interpolation color difference rh and the vertical interpolation color difference rv are calculated, and the calculated values are held in a memory (not shown). Then, the process proceeds to step S13.

ステップS13において、水平補間色差統計量算出部53及び垂直補間色差統計量算出部56は、水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv、分散Vrgvを算出する。   In step S13, the horizontal interpolation color difference statistic calculation unit 53 and the vertical interpolation color difference statistic calculation unit 56 calculate the horizontal interpolation color difference average Argh and variance Vrgh, the vertical interpolation color difference average Argv, and the variance Vrgv.

ステップS14において、仮G演算部57は、水平補間色差統計量算出部53及び垂直補間色差統計量算出部56で算出された水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv、分散Vrgv等を用いて、式(5)に従って水平方向及び垂直方向に重み付けを行って、R画素位置における仮Grを演算する。仮Grが生成されると、仮Gr生成ルーチンは終了する。   In step S14, the provisional G calculation unit 57 calculates the horizontal interpolation color difference average Argh and the variance Vrgh calculated by the horizontal interpolation color difference statistic calculation unit 53 and the vertical interpolation color difference statistic calculation unit 56, the average Argv of the vertical interpolation color difference, and the variance. Using Vrgv or the like, weighting is performed in the horizontal direction and the vertical direction in accordance with Expression (5), and a temporary Gr at the R pixel position is calculated. When the provisional Gr is generated, the provisional Gr generation routine ends.

一方、図3に示す仮R生成部42は、入力画像のG画素位置において、当該R画素位置の周囲にある複数のR画素の画素値を用いて、R成分値である仮Rを生成する。   On the other hand, the temporary R generation unit 42 illustrated in FIG. 3 generates a temporary R that is an R component value using pixel values of a plurality of R pixels around the R pixel position at the G pixel position of the input image. .

図10は、G画素位置における仮Rの生成を説明する図である。
仮R生成部42は、例えば、R00画素とR02画素の間にあるG画素が中心画素になった場合、中心画素の左右両隣にあるR00画素とR02画素の各画素値R00、R02を用いて、式(9)に従って、水平方向に補間されたR成分値である仮R(r01)を算出する。
r01=(R00+R02)/2 ・・・(9)
FIG. 10 is a diagram for explaining the generation of the provisional R at the G pixel position.
For example, when the G pixel between the R00 pixel and the R02 pixel becomes the central pixel, the temporary R generation unit 42 uses the pixel values R00 and R02 of the R00 pixel and the R02 pixel adjacent to the left and right sides of the central pixel. Then, a temporary R (r01) that is an R component value interpolated in the horizontal direction is calculated according to the equation (9).
r01 = (R00 + R02) / 2 (9)

また、仮R生成部42は、例えば、R00画素とR20画素の間にあるG画素が中心画素になった場合、中心画素の上下両隣にあるR00画素とR20画素の各画素値R00、R20を用いて、式(10)に従って、垂直方向に補間されたR成分値である仮R(r10)を算出する。
r01=(R00+R20)/2 ・・・(10)
Further, for example, when the G pixel between the R00 pixel and the R20 pixel becomes the central pixel, the temporary R generation unit 42 calculates the pixel values R00 and R20 of the R00 pixel and the R20 pixel that are adjacent to the upper and lower sides of the central pixel. The temporary R (r10), which is the R component value interpolated in the vertical direction, is calculated according to the equation (10).
r01 = (R00 + R20) / 2 (10)

以上のように、仮想色差(R−G)生成部33内の仮R生成部42では、入力画像のG画素位置において、水平方向又は垂直方向に隣接するR画素の画素値を補間することによって、仮Rが生成される。仮想色差(B−G)生成部34でも同様に、入力画像のG画素位置において、水平方向又は垂直方向に隣接するB画素の画素値を補間することによって、仮Bが生成される。   As described above, the provisional R generation unit 42 in the virtual color difference (RG) generation unit 33 interpolates the pixel values of R pixels adjacent in the horizontal direction or the vertical direction at the G pixel position of the input image. , Provisional R is generated. Similarly, the virtual color difference (B−G) generation unit 34 generates a temporary B by interpolating the pixel values of B pixels adjacent in the horizontal direction or the vertical direction at the G pixel position of the input image.

図3に示す仮想色差(R−G)演算部43は、入力画像のR画素位置において、当該R画素位置の画素値Rと、当該R画素位置において仮G生成部41で生成された仮Gと、の差分を演算して、仮想色差(R−仮G)を生成する。また、仮想色差(R−G)演算部43は、入力画像のG画素位置において、当該G画素位置において仮R生成部42で生成された仮Rと、当該G画素位置の画素値Gと、の差分を演算して、仮想色差(仮R−G)を生成する。仮想色差(R−G)とは、仮想色差(R−仮G)及び仮想色差(仮R−G)を総称したものである。なお、B画素位置では、仮想色差(R−G)は生成されない。仮想色差(R−G)は、高解像(R−G)生成部36に供給される。   The virtual color difference (R−G) calculation unit 43 illustrated in FIG. 3 has the pixel value R at the R pixel position at the R pixel position of the input image and the temporary G generated by the temporary G generation unit 41 at the R pixel position. And a virtual color difference (R-provisional G) is generated. In addition, the virtual color difference (R−G) calculation unit 43, at the G pixel position of the input image, the temporary R generated by the temporary R generation unit 42 at the G pixel position, the pixel value G at the G pixel position, To calculate a virtual color difference (provisional RG). The virtual color difference (R−G) is a general term for the virtual color difference (R−provisional G) and the virtual color difference (provisional RG). Note that a virtual color difference (RG) is not generated at the B pixel position. The virtual color difference (R−G) is supplied to the high resolution (R−G) generation unit 36.

以上のように、仮想色差(R−G)生成部33内の仮想色差(R−G)演算部43では、入力画像のR画素位置及びG画素位置において、仮想色差(R−G)が生成される。仮想色差(B−G)生成部34でも同様に、入力画像のB画素位置及びG画素位置において、仮想色差(B−G)が生成される。なお、R画素位置では、仮想色差(B−G)は生成されない。仮想色差(B−G)は、高解像(B−G)生成部37に供給される。   As described above, the virtual color difference (RG) calculation unit 43 in the virtual color difference (RG) generation unit 33 generates the virtual color difference (RG) at the R pixel position and the G pixel position of the input image. Is done. Similarly, the virtual color difference (B−G) generation unit 34 generates a virtual color difference (B−G) at the B pixel position and the G pixel position of the input image. Note that a virtual color difference (B−G) is not generated at the R pixel position. The virtual color difference (B−G) is supplied to the high resolution (B−G) generation unit 37.

<高解像G画像の生成>
図2に示す高解像G生成部35は、遅延部32から供給される入力G画像に基づいて、当該入力G画像の2倍の解像度を有する高解像G画像を生成する。具体的には、高解像G生成部35は、入力画像における注目画素に対応する画素およびその周辺の画素値を変数とし、予め学習により得られた係数を用いて積和演算を行うことにより、出力画像の注目画素の画素値を予測する。
<Generation of high-resolution G image>
The high-resolution G generation unit 35 illustrated in FIG. 2 generates a high-resolution G image having a resolution twice that of the input G image based on the input G image supplied from the delay unit 32. Specifically, the high-resolution G generation unit 35 uses a pixel corresponding to the target pixel in the input image and its surrounding pixel values as variables, and performs a product-sum operation using coefficients obtained by learning in advance. The pixel value of the target pixel of the output image is predicted.

図11は、高解像G生成部35の構成例を示すブロック図である。
高解像G生成部35は、Gコードタップ選択部61、Gフィルタタップ選択部62と、Gコード演算部63、G係数記憶部64、及びG積和演算部65を備える。
FIG. 11 is a block diagram illustrating a configuration example of the high-resolution G generation unit 35.
The high resolution G generation unit 35 includes a G code tap selection unit 61, a G filter tap selection unit 62, a G code calculation unit 63, a G coefficient storage unit 64, and a G product sum calculation unit 65.

Gコードタップ選択部61は、遅延部32から供給される入力画像から、高解像G画像を生成するため必要となる所定パターンのG成分からなるコードタップ(以下、Gコードタップという。)を選択する。Gコードタップは、例えば、出力画像の注目画素に対応する位置の入力画像の画素を中心画素とした所定の個数の画素で構成される。Gコードタップ選択部61により選択されたGコードタップは、Gコード演算部63に供給される。   The G code tap selection unit 61 generates a code tap (hereinafter referred to as a G code tap) composed of a G component having a predetermined pattern necessary for generating a high resolution G image from the input image supplied from the delay unit 32. select. The G code tap is composed of, for example, a predetermined number of pixels centered on the pixel of the input image at a position corresponding to the target pixel of the output image. The G code tap selected by the G code tap selection unit 61 is supplied to the G code calculation unit 63.

<コードタップの構成例>
図12は、Gコードタップ選択部61で選択されるGコードタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
<Configuration example of code tap>
FIG. 12 is a diagram illustrating a configuration example of the G code tap selected by the G code tap selection unit 61. A thin line circle represents an input pixel which is an input image. A dot-patterned circle represents an image of the pixel position phase with respect to the input pixel of the output image.

出力画素は、図12に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。太線の丸印は、Gコードタップとなる入力画素を表す。なお、Gコードタップは、図12に示す構成例に限定されるものではなく、他の構成であってもよい。   As shown in FIG. 12, the output pixel exists at a position shifted in phase from the input pixel. Therefore, the input image is converted into an output image shifted by a half pixel phase. The center pixel of the cross-dotted line represents the input pixel that is the target pixel. A bold circle represents an input pixel to be a G code tap. Note that the G code tap is not limited to the configuration example shown in FIG. 12, and may have other configurations.

Gコードタップ選択部61は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についてのGコードタップとなる入力画素を選択し、選択したGコードタップをGコード演算部63に供給する。   For example, the G code tap selection unit 61 selects an input pixel to be a G code tap for the target pixel with reference to the input pixel closest to the position of the input pixel corresponding to the target pixel, and selects the selected G code tap as G. This is supplied to the code calculation unit 63.

Gコード演算部63は、Gコードタップ選択部69で選択されたGコードタップに基づき、例えば、DR量子化による量子化やその他ダイナミックレンジの幅をコード化して特徴量等を抽出する。Gコード演算部63は、抽出した特徴量等の情報を用いて、所定の規則に従って注目画素をコード分類し、その結果、注目画素に対応するGコードを得る。Gコード演算部63は、注目画素に対応するGコードをG係数記憶部64に供給する。なお、Gコード演算部63の詳細構成については後述する。   Based on the G code tap selected by the G code tap selection unit 69, the G code calculation unit 63 encodes, for example, quantization by DR quantization and other dynamic range widths to extract feature amounts and the like. The G code calculation unit 63 classifies the target pixel according to a predetermined rule using the extracted information such as the feature amount, and as a result, obtains a G code corresponding to the target pixel. The G code calculation unit 63 supplies the G code corresponding to the target pixel to the G coefficient storage unit 64. The detailed configuration of the G code calculation unit 63 will be described later.

G係数記憶部64には、後述する学習によって求められたGコード毎のタップ係数が、予め、Gコードに対応づけられて記憶されている。そして、G係数記憶部64は、既に記憶されているタップ係数の中から、Gコード演算部63から供給されるGコードに対応するアドレスに記憶されているタップ係数を読み出し、読み出したタップ係数をG積和演算部65に供給する。   In the G coefficient storage unit 64, tap coefficients for each G code obtained by learning to be described later are stored in advance in association with the G code. And the G coefficient memory | storage part 64 reads the tap coefficient memorize | stored in the address corresponding to G code supplied from the G code calculating part 63 from the tap coefficients already memorize | stored, and reads the read tap coefficient. The G product-sum operation unit 65 is supplied.

Gフィルタタップ選択部62は、高解像G画像を生成するために必要となる所定パターンのG成分からなるフィルタタップ(以下、Gフィルタタップという。)を入力画像から選択して取得する。Gフィルタタップは、例えば、出力画像の注目画素に対応する位置の入力画像の画素を中心画素とした所定の個数の画素で構成される。Gフィルタタップ選択部62により選択されたGフィルタタップは、G積和演算部65に供給される。   The G filter tap selection unit 62 selects and acquires from the input image a filter tap (hereinafter referred to as a G filter tap) made up of a predetermined pattern of G components necessary for generating a high resolution G image. The G filter tap is composed of a predetermined number of pixels, for example, with the pixel of the input image at the position corresponding to the target pixel of the output image as the central pixel. The G filter tap selected by the G filter tap selection unit 62 is supplied to the G product-sum operation unit 65.

<Gフィルタタップの構成例>
図13は、Gフィルタタップ選択部62で選択されるフィルタタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
<Configuration example of G filter tap>
FIG. 13 is a diagram illustrating a configuration example of filter taps selected by the G filter tap selection unit 62. A thin line circle represents an input pixel which is an input image. A dot-patterned circle represents an image of the pixel position phase with respect to the input pixel of the output image.

出力画素は、図13に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、Gフィルタタップとなる入力画素を表す。なお、Gフィルタタップは、図13に示す構成例に限定されるものではなく、他の構成であってもよい。また、図13に示すGフィルタタップは、図13に示すGコードタップと異なる構成であってもよい。   As shown in FIG. 13, the output pixel exists at a position shifted in phase from the input pixel. Therefore, the input image is converted into an output image shifted by a half pixel phase. The center pixel of the cross-dotted line represents the input pixel that is the target pixel. Furthermore, a bold circle represents an input pixel that becomes a G filter tap. Note that the G filter tap is not limited to the configuration example illustrated in FIG. 13, and may have another configuration. Further, the G filter tap shown in FIG. 13 may have a different configuration from the G code tap shown in FIG.

Gフィルタタップ選択部62は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についてのフィルタタップとなる入力画素を選択する。   The G filter tap selection unit 62 selects, for example, an input pixel that serves as a filter tap for the target pixel with reference to the input pixel closest to the position of the input pixel corresponding to the target pixel.

G積和演算部65は、予め設定された線形一次式において、Gフィルタタップ選択部62から出力されるGフィルタタップを変数として代入し、G係数記憶部64から供給された係数を用いてフィルタの演算を行う。すなわち、G積和演算部65は、入力G画像における注目画素に対応する出力画素の画素値を、式(11)に従い、Gフィルタタップを用いてフィルタ演算する。   The G product-sum operation unit 65 substitutes the G filter tap output from the G filter tap selection unit 62 as a variable in a linear linear expression set in advance, and uses the coefficient supplied from the G coefficient storage unit 64 to perform filtering. Perform the operation. That is, the G product-sum operation unit 65 performs a filter operation on the pixel value of the output pixel corresponding to the target pixel in the input G image using the G filter tap according to the equation (11).

ここで、Nは、Gフィルタタップの画素数である。Xは、Gフィルタタップ選択部62で選択されたGフィルタタップを構成する各G画素の画素値である。Wは、G係数記憶部64から読み出されたタップ係数である。 Here, N is the number of pixels of the G filter tap. Xn is the pixel value of each G pixel that constitutes the G filter tap selected by the G filter tap selection unit 62. W n is a tap coefficient read from the G coefficient storage unit 64.

G積和演算部65は、式(11)に示すフィルタ演算を行うことによって、注目画素に対応する出力画素を予測(演算)する。G積和演算部65は、入力画像のすべてのG画素の中から1つの注目画素が選択される毎に、当該注目画素に対応する出力画素を予測(演算)する。これにより、入力G画像の2倍の解像度である高解像G画像が生成される。   The G product-sum operation unit 65 predicts (calculates) an output pixel corresponding to the target pixel by performing a filter operation represented by Expression (11). The G product-sum operation unit 65 predicts (calculates) an output pixel corresponding to the target pixel every time one target pixel is selected from all the G pixels of the input image. As a result, a high-resolution G image having a resolution twice that of the input G image is generated.

図2に示す高解像G生成部35は、生成した高解像G画像を外部へ出力すると共に、加算器38へ供給する。   The high resolution G generator 35 shown in FIG. 2 outputs the generated high resolution G image to the outside and supplies it to the adder 38.

<Gコード演算部63の構成例>
図14は、上述したGコード演算部63の構成例を示すブロック図である。Gコード演算部63は、量子化演算部91、及び、変換テーブル記憶部92を備える。
量子化演算部91は、Gコードタップ選択部61から供給されるGコードタップを構成する入力画素の各画素値を、例えば1ビットのDR量子化を用いて量子化し、各入力画素の1ビットを所定の順番で配列したコードを、変換テーブル記憶部92に供給する。
<Configuration Example of G Code Calculation Unit 63>
FIG. 14 is a block diagram illustrating a configuration example of the G code calculation unit 63 described above. The G code calculation unit 63 includes a quantization calculation unit 91 and a conversion table storage unit 92.
The quantization calculation unit 91 quantizes each pixel value of the input pixel constituting the G code tap supplied from the G code tap selection unit 61 using, for example, 1-bit DR quantization, and 1 bit of each input pixel The codes arranged in a predetermined order are supplied to the conversion table storage unit 92.

ここで、コード分類を行う1つの手法として、例えば、コードタップとしての画素値を量子化するDR(Dynamic Range)量子化がある。
DR量子化では、注目画素のコードタップを構成する各画素の画素値が量子化され、量子化によって得られたDR量子化コードにしたがって、注目画素のコードが決定される。
Here, as one method for performing code classification, for example, there is DR (Dynamic Range) quantization that quantizes pixel values as code taps.
In the DR quantization, the pixel value of each pixel constituting the code tap of the pixel of interest is quantized, and the code of the pixel of interest is determined according to the DR quantization code obtained by the quantization.

例えば、NビットDR量子化の場合、コードタップを構成する各画素の画素値の最大値MAXと最小値MINが検出される。そして、コードタップを構成する各画素の集合の局所的なダイナミックレンジDR(=MAX−MIN)が演算される。このダイナミックレンジDRに基づいて、コードタップを構成する各画素の画素値がNビットに量子化される。より具体的には、コードタップを構成する各画素の画素値から最小値MINが減算され、その減算値がDR/2で除算(量子化)される。以上の処理によって得られたコードタップを構成するNビットの各画素の画素値が所定の順番で並べられ、並べられたビット列がDR量子化コードとして出力される。 For example, in the case of N-bit DR quantization, the maximum value MAX and the minimum value MIN of the pixel values of each pixel constituting the code tap are detected. Then, a local dynamic range DR (= MAX−MIN) of a set of pixels constituting the code tap is calculated. Based on the dynamic range DR, the pixel value of each pixel constituting the code tap is quantized to N bits. More specifically, the minimum value MIN is subtracted from the pixel value of each pixel constituting the code tap, and the subtracted value is divided (quantized) by DR / 2N . The pixel values of the N-bit pixels constituting the code tap obtained by the above processing are arranged in a predetermined order, and the arranged bit string is output as a DR quantization code.

したがって、コードタップが例えば1ビットDR量子化処理された場合、そのコードタップを構成する各画素の画素値は、最大値MAXと最小値MINとの平均で除算される(整数演算)。これにより、各画素の画素値が1ビットとされる(二値化)。そして、その1ビットの画素値を所定の順番で並べたビット列が、DR量子化コードとして出力される。DR量子化のみでコード分類が行われる場合、例えば、DR量子化コードが、Gコード演算部63で発生されるコードとなる。   Therefore, when the code tap is subjected to, for example, 1-bit DR quantization processing, the pixel value of each pixel constituting the code tap is divided by the average of the maximum value MAX and the minimum value MIN (integer operation). Thereby, the pixel value of each pixel is set to 1 bit (binarization). Then, a bit string in which the 1-bit pixel values are arranged in a predetermined order is output as a DR quantization code. When code classification is performed only by DR quantization, for example, the DR quantization code is a code generated by the G code calculation unit 63.

なお、Gコード演算部63は、例えば、コードタップを構成する画素の画素値のレベル分布のパターンを、そのままクラスコードとして出力することも可能である。この場合、コードタップがM個の画素の画素値で構成され、各画素の画素値にAビットが割り当てられるとすると、コード演算部34から出力されたコードの場合の数は、(2通りとなり、画素の画素値のビット数Aに指数的に比例した膨大な数となる。 For example, the G code calculation unit 63 can output the level distribution pattern of the pixel values of the pixels constituting the code tap as a class code as it is. In this case, if the code tap is composed of pixel values of M pixels, and the A bit is assigned to the pixel value of each pixel, the number of codes output from the code calculation unit 34 is (2 M ) A, and a huge number that is exponentially proportional to the number of bits A of the pixel value of the pixel.

したがって、Gコード演算部63は、コードタップの情報量を前述のDR量子化又はベクトル量子化等によって圧縮することにより、コード分類を行うのが好ましい。   Therefore, the G code calculation unit 63 preferably performs code classification by compressing the information amount of the code tap by the above-described DR quantization or vector quantization.

図15は、1ビットDR量子化の例を説明する図である。なお、横軸は、コードタップを構成する入力画素の順番(又は位置)を表す。縦軸は、コードタップを構成する入力画素の画素値を表す。   FIG. 15 is a diagram for explaining an example of 1-bit DR quantization. The horizontal axis represents the order (or position) of the input pixels that constitute the code tap. The vertical axis represents the pixel value of the input pixel constituting the code tap.

1ビットDR量子化では、コードタップを構成する入力画素の画素値の中の最大画素値Maxから最小画素値Minを減算することにより、単純ダイナミックレンジDRが求められる。そして、単純ダイナミックレンジDRを2等分するレベルを閾値として、コードタップを構成する各入力画素の画素値が2値化され、1ビットのコードに変換される。   In 1-bit DR quantization, the simple dynamic range DR is obtained by subtracting the minimum pixel value Min from the maximum pixel value Max among the pixel values of the input pixels constituting the code tap. Then, the pixel value of each input pixel constituting the code tap is binarized using a level that bisects the simple dynamic range DR as a threshold value, and converted into a 1-bit code.

図13に示すコードタップの場合、例えば、8画素すべてのコードタップについて1ビットDR量子化が行われると、8ビットのDR量子化コードが得られる。量子化演算部91で得られたコードは、変換テーブル記憶部92に供給される。   In the case of the code tap shown in FIG. 13, for example, when 1-bit DR quantization is performed on the code taps of all 8 pixels, an 8-bit DR quantization code is obtained. The code obtained by the quantization operation unit 91 is supplied to the conversion table storage unit 92.

変換テーブル記憶部92には、変換テーブルが記憶されている。この変換テーブルは、量子化演算部91で得られたコード(入力コード)を最適化して、G係数記憶部64に対応できるコード(出力コード)に変換する。よって、量子化演算部91で得られたコードは、変換テーブル記憶部92に予め記憶された変換テーブルによって、G係数記憶部64用のコードに変換される。そして、変換されたコードは、G係数記憶部64に供給される。   The conversion table storage unit 92 stores a conversion table. This conversion table optimizes the code (input code) obtained by the quantization operation unit 91 and converts it into a code (output code) that can correspond to the G coefficient storage unit 64. Therefore, the code obtained by the quantization operation unit 91 is converted into a code for the G coefficient storage unit 64 by the conversion table stored in advance in the conversion table storage unit 92. Then, the converted code is supplied to the G coefficient storage unit 64.

なお、G係数記憶部64の記憶容量が十分大きい場合、変換テーブル記憶部92は省略可能である。その場合は、量子化演算部91より得られたコードは、そのままG係数記憶部64に供給される。   When the storage capacity of the G coefficient storage unit 64 is sufficiently large, the conversion table storage unit 92 can be omitted. In this case, the code obtained from the quantization operation unit 91 is supplied to the G coefficient storage unit 64 as it is.

また、変換テーブル記憶部92に記憶されている変換テーブルは、出力コードを最適化するように、適宜更新可能である。これにより、変換テーブルは、例えば、ある入力コードの発生頻度が低い場合は、当該入力コードに対応する出力コードを代表的なコードに置き換えてもよい。また、変換テーブルは、異なる出力コードであっても近似する係数に対応づけられている場合、異なる出力コードを同一コードにしてもよい。   Further, the conversion table stored in the conversion table storage unit 92 can be updated as appropriate so as to optimize the output code. Thereby, in the conversion table, for example, when the frequency of occurrence of a certain input code is low, the output code corresponding to the input code may be replaced with a representative code. In the conversion table, even if different output codes are associated with approximate coefficients, different output codes may be the same code.

<高解像(R−G)画像の生成>
図2に示す高解像(R−G)生成部36は、仮想色差(R−G)生成部33で生成された仮想色差(R−G)に基づいて、高解像G画像と同じ解像度である高解像(R−G)画像を生成する。
<Generation of high-resolution (RG) image>
The high resolution (RG) generation unit 36 illustrated in FIG. 2 has the same resolution as the high resolution G image based on the virtual color difference (RG) generated by the virtual color difference (RG) generation unit 33. A high-resolution (RG) image is generated.

図16は、高解像(R−G)生成部36の構成例を示すブロック図である。
高解像G生成部35は、(R−G)コードタップ選択部71、(R−G)フィルタタップ選択部72と、(R−G)コード演算部73、(R−G)係数記憶部74、及び(R−G)積和演算部75を備える。
FIG. 16 is a block diagram illustrating a configuration example of the high resolution (RG) generation unit 36.
The high-resolution G generation unit 35 includes an (RG) code tap selection unit 71, an (RG) filter tap selection unit 72, an (RG) code calculation unit 73, and an (RG) coefficient storage unit. 74 and (R−G) product-sum operation unit 75.

(R−G)コードタップ選択部71は、仮想色差(R−G)生成部33で生成された仮想色差(R−G)画像の中から、高解像(R−G)画像を生成するために必要となる所定パターンの色差(R−G)成分からなるコードタップ(以下、(R−G)コードタップという。)を選択する。(R−G)コードタップ選択部71により選択された(R−G)コードタップは、(R−G)コード演算部73に供給される。   The (R−G) code tap selection unit 71 generates a high resolution (R−G) image from the virtual color difference (R−G) image generated by the virtual color difference (R−G) generation unit 33. For this purpose, a code tap (hereinafter referred to as (R-G) code tap) composed of color difference (RG) components of a predetermined pattern required for the purpose is selected. The (R−G) code tap selected by the (R−G) code tap selection unit 71 is supplied to the (R−G) code calculation unit 73.

<(R−G)コードタップの構成例>
図17は、(R−G)コードタップ選択部71で選択される(R−G)コードタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
<Configuration example of (R-G) code tap>
FIG. 17 is a diagram illustrating a configuration example of the (R−G) code tap selected by the (R−G) code tap selection unit 71. A thin line circle represents an input pixel which is an input image. A dot-patterned circle represents an image of the pixel position phase with respect to the input pixel of the output image.

出力画素は、図17に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。太線の丸印は、(R−G)コードタップとなる入力画素を表す。なお、(R−G)コードタップは、図12に示す構成例に限定されるものではなく、他の構成であってもよい。   As shown in FIG. 17, the output pixel is present at a position shifted in phase from the input pixel. Therefore, the input image is converted into an output image shifted by a half pixel phase. The center pixel of the cross-dotted line represents the input pixel that is the target pixel. A bold circle represents an input pixel to be an (R−G) code tap. Note that the (R-G) code tap is not limited to the configuration example shown in FIG. 12, and may have other configurations.

(R−G)コードタップ選択部71は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についての(R−G)コードタップとなる入力画素を選択する。   The (R−G) code tap selection unit 71 selects, for example, an input pixel that becomes a (R−G) code tap for the target pixel with reference to the input pixel closest to the position of the input pixel corresponding to the target pixel. .

(R−G)コード演算部73は、(R−G)コードタップ選択部71で選択された(R−G)コードタップに基づき、例えば、DR量子化による量子化やその他ダイナミックレンジの幅をコード化して特徴量等を抽出する。(R−G)コード演算部73は、抽出した特徴量等の情報を用いて、所定の規則に従って注目画素をコード分類し、その結果、注目画素に対応する(R−G)コードを得る。Gコード演算部63は、注目画素に対応する(R−G)コードを(R−G)係数記憶部74に供給する。   Based on the (R−G) code tap selected by the (R−G) code tap selection unit 71, the (R−G) code calculation unit 73, for example, performs quantization by DR quantization or other dynamic range widths. Encode and extract features. The (R−G) code calculation unit 73 classifies the pixel of interest according to a predetermined rule using information such as the extracted feature quantity, and as a result, obtains an (R−G) code corresponding to the pixel of interest. The G code calculation unit 63 supplies the (R−G) code corresponding to the target pixel to the (R−G) coefficient storage unit 74.

(R−G)係数記憶部74には、後述する学習によって求められた(R−G)コード毎のタップ係数が、予め、(R−G)コードに対応づけられている記憶されている。そして、(R−G)係数記憶部74は、既に記憶されているタップ係数の中から、(R−G)コード演算部73から供給される(R−G)コードに対応するアドレスに記憶されているタップ係数を読み出し、読み出したタップ係数を(R−G)積和演算部75に供給する。   In the (R−G) coefficient storage unit 74, tap coefficients for each (R−G) code obtained by learning described later are stored in advance in association with the (R−G) code. Then, the (R−G) coefficient storage unit 74 is stored at an address corresponding to the (R−G) code supplied from the (R−G) code calculation unit 73 among the already stored tap coefficients. The tap coefficient is read, and the read tap coefficient is supplied to the (R−G) product-sum operation unit 75.

(R−G)フィルタタップ選択部72は、仮想色差(R−G)生成部33で生成された仮想色差(R−G)画像の中から、高解像(R−G)画像を生成するために必要となる所定パターンの(R−G)成分からなるフィルタタップ(以下、(R−G)フィルタタップという。)を選択して取得する。(R−G)フィルタタップ選択部72は、選択した(R−G)フィルタタップを(R−G)積和演算部75へ供給する。   The (R−G) filter tap selection unit 72 generates a high resolution (R−G) image from the virtual color difference (R−G) image generated by the virtual color difference (R−G) generation unit 33. For this purpose, a filter tap (hereinafter referred to as (RG) filter tap) composed of (RG) components of a predetermined pattern required for this purpose is selected and acquired. The (R−G) filter tap selection unit 72 supplies the selected (R−G) filter tap to the (R−G) product-sum operation unit 75.

<(R−G)フィルタタップの構成例>
図18は、(R−G)フィルタタップ選択部72で選択される(R−G)フィルタタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
<Configuration example of (R-G) filter tap>
FIG. 18 is a diagram illustrating a configuration example of the (R−G) filter tap selected by the (R−G) filter tap selection unit 72. A thin line circle represents an input pixel which is an input image. A dot-patterned circle represents an image of the pixel position phase with respect to the input pixel of the output image.

出力画素は、図18に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、(R−G)フィルタタップとなる入力画素を表す。なお、(R−G)フィルタタップは、図18に示す構成例に限定されるものではなく、他の構成であってもよい。また、図18に示すGフィルタタップは、図17に示すGコードタップと異なる構成であってもよい。   As shown in FIG. 18, the output pixel is present at a position shifted in phase from the input pixel. Therefore, the input image is converted into an output image shifted by a half pixel phase. The center pixel of the cross-dotted line represents the input pixel that is the target pixel. Further, a bold circle represents an input pixel that becomes an (R−G) filter tap. Note that the (R−G) filter tap is not limited to the configuration example illustrated in FIG. 18, and may have another configuration. Further, the G filter tap shown in FIG. 18 may have a different configuration from the G code tap shown in FIG.

(R−G)フィルタタップ選択部72は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についての(R−G)フィルタタップとなる入力画素を選択する。   The (R−G) filter tap selection unit 72 selects, for example, an input pixel that becomes a (R−G) filter tap for the target pixel with reference to the input pixel closest to the position of the input pixel corresponding to the target pixel. .

(R−G)積和演算部75は、予め設定された線形一次式において、(R−G)フィルタタップ選択部72から出力される(R−G)フィルタタップを変数として代入し、(R−G)係数記憶部74から供給された係数を用いてフィルタの演算を行う。すなわち、(R−G)積和演算部75は、入力(R−G)画像における注目画素に対応する出力画素の画素値を、上述した式(11)に従い、(R−G)フィルタタップを用いてフィルタ演算する。   The (R−G) product-sum operation unit 75 substitutes the (R−G) filter tap output from the (R−G) filter tap selection unit 72 as a variable in a linear linear expression set in advance, and (R -G) The filter operation is performed using the coefficient supplied from the coefficient storage unit 74. That is, the (R−G) product-sum operation unit 75 sets the (R−G) filter tap to the pixel value of the output pixel corresponding to the target pixel in the input (R−G) image according to the above equation (11). Use to filter.

式(11)において、Nは、(R−G)フィルタタップの画素数である。Xは、(R−G)フィルタタップ選択部72で選択された(R−G)フィルタタップを構成する各画素の(R−G)成分値である。Wは、(R−G)係数記憶部74から読み出されたタップ係数である。 In Expression (11), N is the number of pixels of the (R−G) filter tap. Xn is the (R−G) component value of each pixel constituting the (R−G) filter tap selected by the (R−G) filter tap selection unit 72. W n is a tap coefficient read from the (R−G) coefficient storage unit 74.

(R−G)積和演算部75は、式(11)に示すフィルタ演算を行うことによって、注目画素に対応する出力画素を予測(演算)する。(R−G)積和演算部75は、入力画像のすべての(R−G)成分を有する画素の中から1つの注目画素が選択される毎に、当該注目画素に対応する出力画素を予測(演算)する。これにより、高解像G画像と同じ解像度である高解像(R−G)画像が生成される。   The (R−G) product-sum operation unit 75 predicts (calculates) an output pixel corresponding to the target pixel by performing a filter operation represented by Expression (11). The (R−G) product-sum operation unit 75 predicts an output pixel corresponding to a target pixel every time one target pixel is selected from pixels having all (R−G) components of the input image. (Calculate). As a result, a high resolution (RG) image having the same resolution as the high resolution G image is generated.

そして、図2に示す高解像(R−G)生成部36は、生成した高解像(R−G)画像を加算器38へ供給する。
高解像(B−G)生成部37は、高解像(R−G)生成部36と同様に構成されており、R画素に代えてB画素を取り扱う。
Then, the high resolution (RG) generator 36 shown in FIG. 2 supplies the generated high resolution (RG) image to the adder 38.
The high resolution (BG) generation unit 37 is configured in the same manner as the high resolution (RG) generation unit 36, and handles B pixels instead of R pixels.

<(B−G)コードタップの構成例>
図19は、(B−G)コードタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
<Configuration example of (B-G) code tap>
FIG. 19 is a diagram illustrating a configuration example of a (BG) code tap. A thin line circle represents an input pixel which is an input image. A dot-patterned circle represents an image of the pixel position phase with respect to the input pixel of the output image.

出力画素は、図19に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、(B−G)フィルタタップとなる入力画素を表す。なお、(B−G)コードタップは、図19に示す構成例に限定されるものではなく、他の構成であってもよい。   As shown in FIG. 19, the output pixel is present at a position shifted in phase from the input pixel. Therefore, the input image is converted into an output image shifted by a half pixel phase. The center pixel of the cross-dotted line represents the input pixel that is the target pixel. Further, a bold circle represents an input pixel that becomes a (BG) filter tap. The (B-G) code tap is not limited to the configuration example shown in FIG. 19, and may have another configuration.

<(B−G)フィルタタップの構成例>
図20は、(B−G)フィルタタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
<(B-G) Configuration Example of Filter Tap>
FIG. 20 is a diagram illustrating a configuration example of the (BG) filter tap. A thin line circle represents an input pixel which is an input image. A dot-patterned circle represents an image of the pixel position phase with respect to the input pixel of the output image.

出力画素は、図20に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、(B−G)フィルタタップとなる入力画素を表す。なお、(B−G)フィルタタップは、図20に示す構成例に限定されるものではなく、他の構成であってもよい。また、図20に示す(B−G)フィルタタップは、図19に示すGコードタップと異なる構成であってもよい。   As shown in FIG. 20, the output pixel is present at a position shifted in phase from the input pixel. Therefore, the input image is converted into an output image shifted by a half pixel phase. The center pixel of the cross-dotted line represents the input pixel that is the target pixel. Further, a bold circle represents an input pixel that becomes a (BG) filter tap. Note that the (B-G) filter tap is not limited to the configuration example illustrated in FIG. 20 and may have other configurations. Moreover, the (BG) filter tap shown in FIG. 20 may have a configuration different from the G code tap shown in FIG.

高解像(B−G)生成部37は、高解像(R−G)生成部36と同様の処理を行って、高解像G画像と同じ解像度の高解像(B−G)画像を生成する。   The high resolution (BG) generation unit 37 performs the same processing as that of the high resolution (RG) generation unit 36, and thus a high resolution (BG) image having the same resolution as the high resolution G image. Is generated.

加算器38は、高解像G生成部35で生成された高解像G画像と、高解像(R−G)生成部36で生成された高解像(R−G)画像と、を加算することで、高解像G画像と同じ解像度である高解像R画像を生成する。
加算器39は、高解像G生成部35で生成された高解像G画像と、高解像(B−G)生成部37で生成された高解像(B−G)画像と、を加算することで、高解像G画像と同じ解像度である高解像B画像を生成する。
The adder 38 combines the high-resolution G image generated by the high-resolution G generation unit 35 and the high-resolution (RG) image generated by the high-resolution (RG) generation unit 36. By adding, a high-resolution R image having the same resolution as the high-resolution G image is generated.
The adder 39 combines the high resolution G image generated by the high resolution G generation unit 35 and the high resolution (BG) image generated by the high resolution (BG) generation unit 37. By adding, a high-resolution B image having the same resolution as the high-resolution G image is generated.

<デモザイク処理ルーチン>
図21は、デモザイク部16によるデモザイク処理ルーチンを示すフローチャートである。
<Demosaic processing routine>
FIG. 21 is a flowchart showing a demosaic processing routine by the demosaic unit 16.

デモザイク部16内の図2及び図3等に示す各ブロックは、ベイヤー配列の色フィルタアレイが用いられたイメージセンサ12の出力値により構成される入力画像に対してステップS21以降の処理を実行する。   Each block shown in FIG. 2 and FIG. 3 in the demosaic unit 16 executes the processing after step S21 on the input image formed by the output value of the image sensor 12 using the color filter array of the Bayer array. .

ステップS21において、図3に示す仮G生成部41は、R画素位置において、近接するG画素の画素値Gから補間された仮Gを生成する。同様に、仮想色差(B−G)生成部34は、B画素位置において、近接するG画素の画素値Gから補間された仮Gを生成する。   In step S21, the provisional G generation unit 41 illustrated in FIG. 3 generates a provisional G that is interpolated from the pixel values G of adjacent G pixels at the R pixel position. Similarly, the virtual color difference (B−G) generation unit 34 generates a temporary G that is interpolated from the pixel values G of adjacent G pixels at the B pixel position.

ステップS22において、仮R生成部42は、G画素位置において、近接するR画素の画素値Rから補間された仮Rを生成する。同様に、仮想色差(B−G)生成部34は、G画素位置において、近接するB画素の画素値Bから補間された仮Bを生成する。   In step S22, the temporary R generation unit 42 generates a temporary R interpolated from the pixel value R of the adjacent R pixel at the G pixel position. Similarly, the virtual color difference (B−G) generation unit 34 generates a temporary B interpolated from the pixel value B of the adjacent B pixel at the G pixel position.

ステップS23において、仮想色差(R−G)演算部43は、仮G生成部41で生成された仮Gと入力画像のR画素値とを用いて、仮想色差(R−仮G)を生成する。また、仮想色差(R−G)演算部43は、仮R生成部42で生成された仮Rと入力画像の画素値Gとを用いて、仮想色差(仮R−G)を生成する。   In step S <b> 23, the virtual color difference (R−G) calculation unit 43 generates a virtual color difference (R−temporary G) using the temporary G generated by the temporary G generation unit 41 and the R pixel value of the input image. . Further, the virtual color difference (R−G) calculation unit 43 generates a virtual color difference (temporary RG) using the temporary R generated by the temporary R generation unit 42 and the pixel value G of the input image.

同様に、仮想色差(B−G)生成部34は、仮Gと入力画像のB画素値とを用いて仮想色差(B−仮G)を生成し、仮Bと入力画像の画素値Gとを用いて、仮想色差(仮B−G)を生成する。   Similarly, the virtual color difference (B−G) generation unit 34 generates a virtual color difference (B−temporary G) using the temporary G and the B pixel value of the input image, and the temporary B and the pixel value G of the input image Is used to generate a virtual color difference (temporary BG).

ステップS24において、注目画素選択部31は、入力画像に対する出力画像を構成する画素のうち、まだ、注目画素として選択されていない画素の1つを注目画素として選択する。すなわち、注目画素選択部31は、例えば、出力画像を構成する画素のうち、ラスタスキャン順で、まだ、注目画素とされていない画素を注目画素として選択する。   In step S24, the pixel-of-interest selecting unit 31 selects one pixel that has not been selected as the pixel of interest among the pixels constituting the output image for the input image as the pixel of interest. That is, for example, the pixel-of-interest selection unit 31 selects, as the pixel of interest, a pixel that has not yet been selected as the pixel of interest in the raster scan order among the pixels that constitute the output image.

ステップS25において、Gコードタップ選択部61は、入力画像に対する注目画素についてのGコードタップを選択する。(R−G)コードタップ選択部71は、入力画像に対する注目画素についての(R−G)コードタップを選択する。高解像(B−G)生成部37は、入力画像に対する注目画素についての(B−G)コードタップを選択する。   In step S <b> 25, the G code tap selection unit 61 selects a G code tap for the pixel of interest for the input image. The (R−G) code tap selection unit 71 selects the (R−G) code tap for the pixel of interest for the input image. The high resolution (B-G) generation unit 37 selects a (B-G) code tap for the pixel of interest for the input image.

ステップS26において、Gコード演算部63は、供給されたGコードタップを符号化して符号化コードを生成する。(R−G)コード演算部73は、供給された(R−G)コードタップを符号化して符号化コードを生成する。高解像(B−G)生成部37は、(B−G)コードタップを符号化して符号化コードを生成する。   In step S26, the G code calculation unit 63 encodes the supplied G code tap to generate an encoded code. The (R−G) code calculation unit 73 encodes the supplied (R−G) code tap to generate an encoded code. The high-resolution (BG) generation unit 37 encodes the (B-G) code tap to generate an encoded code.

ステップS27において、Gフィルタタップ選択部62は、入力画像に対する注目画素についてのGフィルタタップを選択する。(R−G)フィルタタップ選択部72は、入力画像に対する注目画素についての(R−G)フィルタタップを選択する。高解像(B−G)生成部37は、入力画像に対する注目画素についての(B−G)フィルタタップを選択する。   In step S27, the G filter tap selection unit 62 selects a G filter tap for the target pixel for the input image. The (R−G) filter tap selection unit 72 selects the (R−G) filter tap for the pixel of interest for the input image. The high resolution (B−G) generation unit 37 selects a (B−G) filter tap for the pixel of interest for the input image.

ステップS28において、G係数記憶部64から、ステップS26で演算された符号化コードに対応づけられたタップ係数であるG係数が読み出される。(R−G)係数記憶部74から、ステップS26で演算された符号化コードに対応づけられた(R−G)係数が読み出される。また、高解像(B−G)生成部37では、ステップS26で演算された符号化コードに対応づけられた(B−G)係数が内部記憶部から読み出される。   In step S28, the G coefficient that is a tap coefficient associated with the encoded code calculated in step S26 is read from the G coefficient storage unit 64. The (R−G) coefficient associated with the encoded code calculated in step S <b> 26 is read from the (R−G) coefficient storage unit 74. Further, in the high resolution (BG) generation unit 37, the (B−G) coefficient associated with the encoded code calculated in step S26 is read from the internal storage unit.

ステップS29において、G積和演算部65は、注目画素について積和演算を行う。具体的には、G積和演算部65は、式(11)のX,X,・・・,Xに対してステップS27で選択されたGフィルタタップの各画素値を代入し、タップ係数wに対してステップS28で読み出されたG係数を代入し、式(11)の演算を行う。同様に、(R−G)積和演算部75及び高解像(B−G)生成部37も、式(11)に従って注目画素についてフィルタ演算を行う。 In step S29, the G product-sum operation unit 65 performs product-sum operation on the target pixel. Specifically, G product-sum operation unit 65 substitutes X 1, X 2, · · ·, each pixel value of the G filter tap selected at step S27 with respect to X N of formula (11), substituting G coefficients read in step S28 with respect to the tap coefficient w n, performing the calculation of equation (11). Similarly, the (R−G) product-sum operation unit 75 and the high-resolution (B−G) generation unit 37 also perform the filter operation on the target pixel according to Expression (11).

ステップS30において、G画素の生成処理であるか否かが判定され、G画素の生成処理である場合はステップS32に進み、G画素の生成処理でない場合はステップS31に進む。   In step S30, it is determined whether the process is a G pixel generation process. If the process is a G pixel generation process, the process proceeds to step S32. If the process is not a G pixel generation process, the process proceeds to step S31.

ステップS31では、加算器38は、注目画素について、ステップS29の処理でフィルタ演算された画素値Gと、同様にフィルタ演算された色差成分(R−G)と、を加算することで、高解像B画像を構成する画素値Rを生成する。また、加算器39は、注目画素について、ステップS29の処理でフィルタ演算された画素値Gと、同様にフィルタ演算された色差成分(B−G)と、を加算することで、高解像B画像を構成する画素値Rを生成する。   In step S31, the adder 38 adds the pixel value G subjected to the filter operation in the process of step S29 and the color difference component (RG) similarly subjected to the filter operation for the target pixel, thereby obtaining a high resolution. A pixel value R constituting the image B image is generated. Further, the adder 39 adds the pixel value G subjected to the filter operation in the process of step S29 and the color difference component (BG) similarly subjected to the filter operation for the target pixel, thereby obtaining a high resolution B. A pixel value R constituting the image is generated.

ステップS32では、注目画素選択部31が、まだ注目画素として選択されていない画素があるか否かを判定する。注目画素として選択されていない画素がある場合はステップS24に戻り、その画素がない場合は本ルーチンが終了する。   In step S <b> 32, the target pixel selection unit 31 determines whether there is a pixel that has not yet been selected as the target pixel. If there is a pixel that is not selected as the pixel of interest, the process returns to step S24, and if there is no pixel, this routine ends.

図22は、デモザイク部16の入力画素に対する生成画素を示す図である。同図に示すように、G入力画素に対してG生成画素の解像度は2倍になる。R入力画素に対してR生成画素の解像度は4倍になる。B入力画素に対してB生成画素の解像度は4倍になる。   FIG. 22 is a diagram illustrating generated pixels for input pixels of the demosaic unit 16. As shown in the figure, the resolution of the G generation pixel is doubled with respect to the G input pixel. The resolution of the R generation pixel is four times that of the R input pixel. The resolution of the B generation pixel is four times that of the B input pixel.

以上のように、デモザイク部16は、ベイヤー配列の色フィルタが配置されたイメージセンサ12の入力画像の中から、G画素の画素値のみを用いて、コード分類型適応フィルタの学習結果を利用して、高解像G画像を生成することができる。   As described above, the demosaic unit 16 uses the learning result of the code classification type adaptive filter by using only the pixel value of the G pixel from the input image of the image sensor 12 in which the color filters of the Bayer array are arranged. Thus, a high resolution G image can be generated.

さらに、デモザイク部16は、入力画像の中から、R画素及びG画素の画素値を用いて、コード分類型適応フィルタの学習結果を利用して、高解像(R−G)を生成する。そして、デモザイク部16は、高解像(R−G)と高解像G画像とに基づいて高解像R画像を生成する。すなわち、デモザイク部16は、B画素の画素値を用いることなく高解像R画像を生成することができる。同様に、デモザイク部16は、R画素の画素値を用いることなく高解像B画像を生成することができる。これにより、ジッパーノイズ、偽色、色にじみ、リンギング等が大幅に低減された高解像画像が生成される。   Further, the demosaic unit 16 generates a high resolution (RG) using the learning result of the code classification type adaptive filter using the pixel values of the R pixel and the G pixel from the input image. Then, the demosaic unit 16 generates a high resolution R image based on the high resolution (RG) and the high resolution G image. That is, the demosaic unit 16 can generate a high resolution R image without using the pixel value of the B pixel. Similarly, the demosaic unit 16 can generate a high-resolution B image without using the pixel value of the R pixel. As a result, a high-resolution image in which zipper noise, false color, color bleeding, ringing, and the like are significantly reduced is generated.

<コード分類型適応フィルタの学習原理>
デモザイク処理のために使用されるタップ係数は、コード分類型適応フィルタの学習処理によって、以下の手順で求められる。
<Learning Principle of Code Classification Adaptive Filter>
The tap coefficient used for the demosaic process is obtained by the following procedure by the learning process of the code classification type adaptive filter.

ここでは、低画質画像(第1の画像)は、高画質画像(第2の画像)をLPF(low Pass Filter)によってフィルタリングするなどして画質(解像度)を低下させたものをいう。   Here, the low-quality image (first image) refers to an image in which the image quality (resolution) has been reduced by filtering a high-quality image (second image) with an LPF (low pass filter).

コード分類型適応フィルタの学習処理では、低画質画像からフィルタタップが選択され、そのフィルタタップとタップ係数を用いて、高画質画像の画素(高画質画素)の画素値が所定の演算によって求められる。所定の演算とは、例えば線形1次予測演算である。   In the learning process of the code classification type adaptive filter, a filter tap is selected from the low-quality image, and the pixel value of the pixel of the high-quality image (high-quality pixel) is obtained by a predetermined calculation using the filter tap and the tap coefficient. . The predetermined calculation is, for example, a linear primary prediction calculation.

この場合、高画質画素の画素値yは、式(12)に示す線形1次式によって求められる。   In this case, the pixel value y of the high-quality pixel is obtained by a linear linear expression shown in Expression (12).

フィルタタップは、N個の低画質画像の画素(低画質画素)x、x、・・・、x、・・・、xで構成される。xは、高画質画素yについてのフィルタタップを構成するN個の低画質画素のうち、n番目の低画質画素の画素値を表す。wは、n番目の低画質画素(の画素値)xに乗算されるn番目のタップ係数を表す。 Filter tap, the pixel of the N low-quality image (low image quality pixel) x 1, x 2, ··· , x n, ···, composed of x N. xn represents the pixel value of the nth low image quality pixel among the N low image quality pixels constituting the filter tap for the high image quality pixel y. w n represents the n th tap coefficient to be multiplied by the n th low image quality pixel (its pixel value) x n .

高画質画素の画素値yは、式(12)に示した線形1次式に限らず、例えば2次以上の高次の式によっても算出可能である。   The pixel value y of the high-quality pixel is not limited to the linear primary expression shown in Expression (12), and can be calculated by, for example, a higher-order expression of the second or higher order.

第kサンプル(k番目)の高画質画素の画素値の真値をyと表し、式(12)によって得られるその真値yの予測値をy’と表す。このとき、予測値y’の真値yに対する予測誤差eは、式(13)で表される。 The true value of the pixel value of the high-quality pixel of the k-th sample (k-th) is expressed as y k, and the predicted value of the true value y k obtained by Expression (12) is expressed as y k ′. In this case, the prediction error e k with respect to the true value y k of the prediction value y k 'is expressed by equation (13).

式(13)の予測値y’は、式(12)に従って求められる。そこで、式(13)のy’を、式(12)に従って置き換えると、次の式(14)が得られる。 The predicted value y k ′ of Expression (13) is obtained according to Expression (12). Therefore, when y k ′ in equation (13) is replaced according to equation (12), the following equation (14) is obtained.

n,kは、第kサンプルの高画質画素yについてのフィルタタップを構成するn番目の低画質画素を表す。 x n, k represents the n-th low-quality pixel that constitutes the filter tap for the high-quality pixel y k of the k-th sample.

式(14)(又は式(13))の予測誤差eを0とするタップ係数wが、高画質画素yを予測するために最適なタップ係数となる。しかし、すべての高画質画素yについて、そのようなタップ係数wを求めることは、一般的には困難である。 Equation (14) (or formula (13)) tap coefficients w n to zero prediction error e k of, the optimum tap coefficient for predicting the high-quality pixel y k. However, for all of the high definition pixel y k, to determine such tap coefficients w n is generally difficult.

そこで、タップ係数wが最適な値であることを表す規範として、例えば、最小自乗法を採用する。この場合、最適なタップ係数wは、次の式(15)で表される自乗誤差の総和Eが最小になるときの係数である。 Therefore, as the standard for indicating that the tap coefficient w n is the optimal value, for example, employs a method of least squares. In this case, the optimal tap coefficient w n is a coefficient when the sum E of square errors expressed by the following equation (15) is minimized.

Kは、高画質画素yと、その高画質画素yについてのフィルタタップを構成する低画質画素x1,k、x2,k、・・・、xn,kとのセットのサンプル数(学習用のサンプルの数)を表す。 K is the number of samples in the set of the high image quality pixel y k and the low image quality pixels x 1, k , x 2, k ,..., X n, k that constitute the filter tap for the high image quality pixel y k. (Number of learning samples).

式(15)の自乗誤差の総和Eの最小値(極小値)は、式(16)に示すように、総和Eをタップ係数wで編微分した結果を0とするwによって与えられる。 The minimum value of the sum E of square errors of Equation (15) (minimum value), as shown in equation (16), given the results of the sum E were knitted differentiated by the tap coefficient w n by w n to 0.

そこで、前述の式(14)をタップ係数wで編微分すると、次の式(17)が得られる。 Therefore, when knitting differentiated by the tap coefficient w n of Equation (14) described above, the following equation (17) is obtained.

式(16)と式(17)から、式(18)が得られる。   Expression (18) is obtained from Expression (16) and Expression (17).

式(18)のeに式(14)を代入すると、式(18)は次の式(19)に示す正規方程式で表される。 Substituting equation (14) to the e k of the formula (18), equation (18) is represented by the normal equation shown in the following equation (19).

式(19)の正規方程式は、例えば、掃き出し法(Gauss−Jordanの消去法)などを用いることにより、タップ係数wについて解くことができる。 Normal equation of Equation (19), for example, by using a like sweeping-out method (Gauss-Jordan elimination method) can be solved for the tap coefficient w n.

式(19)の正規方程式をコード毎にたてて解くことにより、最適なタップ係数(自乗誤差の総和Eを最小にするタップ係数)wが、コード毎に求められる。このようにして求められたタップ係数wが、例えばG係数としてG係数記憶部64に記憶される。タップ係数は、例えば図23に示す学習装置100によって求められる。 By solving the normal equations in equation (19) in each code, the optimum tap coefficient (a tap coefficient that minimizes the sum E of square errors) w n is obtained for each code. Thus the tap coefficient w n which is determined is stored in the G coefficient storage unit 64, for example, as a G factor. The tap coefficient is obtained, for example, by the learning device 100 shown in FIG.

<学習装置100の構成>
図23は、学習装置100の構成例を示すブロック図である。学習装置100は、教師画像及び生徒画像を用いて学習することにより、高解像G画像、高解像(R−G)画像、高解像(B−G)画像をそれぞれ生成するために使用されるG係数、(R−G)係数、及び(B−G)係数を生成する。
<Configuration of Learning Device 100>
FIG. 23 is a block diagram illustrating a configuration example of the learning device 100. The learning apparatus 100 is used to generate a high-resolution G image, a high-resolution (RG) image, and a high-resolution (BG) image by learning using a teacher image and a student image, respectively. G coefficient, (RG) coefficient, and (BG) coefficient are generated.

学習装置100は、生徒画像生成部101、教師画像生成部102、注目画素選択部103、遅延部104、仮想色差(R−G)生成部105、仮想色差(B−G)生成部106、G係数データ生成部107、(R−G)係数データ生成部108、(B−G)係数データ生成部109を備えている。   The learning apparatus 100 includes a student image generation unit 101, a teacher image generation unit 102, a pixel-of-interest selection unit 103, a delay unit 104, a virtual color difference (RG) generation unit 105, a virtual color difference (B-G) generation unit 106, G A coefficient data generation unit 107, an (RG) coefficient data generation unit 108, and a (B−G) coefficient data generation unit 109 are provided.

学習装置100に入力される高解像度画像は、例えば、R成分、G成分及びB成分のそれぞれに対応する3つのイメージセンサからそれぞれ生成されたRGB各成分の高解像画像RGBである。   The high-resolution image input to the learning device 100 is, for example, a high-resolution image RGB of each RGB component generated from each of the three image sensors corresponding to the R component, the G component, and the B component.

図24は、高解像度画像から生成される生徒画像及び教師画像を説明するための図である。
生徒画像生成部101は、学習装置100に入力される高解像度画像RGBをそれぞれダウンコンバートする。ここで、ダウンコンバートのフィルタ特性は、例えば、4画素平均処理、LPF処理等でよい。その後、生徒画像生成部102は、ダウンコンバートされた画像RGBから、ベイヤー配列に従ってRGBが配置された生徒画像を生成する。すなわち、生徒画像は、ベイヤー配列の色フィルタアレイが配置されたイメージセンサ12からそのまま出力された画像に対応する。
FIG. 24 is a diagram for explaining a student image and a teacher image generated from a high-resolution image.
The student image generation unit 101 down-converts the high-resolution images RGB input to the learning device 100, respectively. Here, the down-conversion filter characteristics may be, for example, 4-pixel averaging processing, LPF processing, or the like. Thereafter, the student image generation unit 102 generates a student image in which RGB is arranged according to the Bayer arrangement from the downconverted image RGB. That is, the student image corresponds to an image output as it is from the image sensor 12 in which the Bayer color filter array is arranged.

教師画像生成部102は、学習装置100に入力される高解像度画像RGBをそれぞれダウンコンバートして、ダウンコンバート済みの画像RGBを半画素シフトすることで、RGB各成分の教師画像RGBを生成する。なお、ダウンコンバートのフィルタ特性は、生徒画像生成部101と同様である。   The teacher image generation unit 102 down-converts the high-resolution image RGB input to the learning device 100 and shifts the down-converted image RGB by half a pixel, thereby generating a teacher image RGB for each component of RGB. The down conversion filter characteristics are the same as those of the student image generation unit 101.

注目画素選択部103は、教師画像生成部102で生成された教師画像の中の任意の1画素を注目画素として選択する。注目画素選択部103は、注目画素として選択した画素の座標値などの情報を、仮想色差(R−G)生成部105,G係数データ生成部107、(R−G)係数データ生成部108等の各ブロックに供給する。   The target pixel selection unit 103 selects an arbitrary pixel in the teacher image generated by the teacher image generation unit 102 as the target pixel. The pixel-of-interest selection unit 103 provides information such as the coordinate value of the pixel selected as the pixel of interest, the virtual color difference (RG) generation unit 105, the G coefficient data generation unit 107, the (RG) coefficient data generation unit 108, etc. To each block.

仮想色差(R−G)生成部105は、図2に示す仮想色差(R−G)生成部33と同様に構成され、同様の処理を行う。すなわち、仮想色差(R−G)生成部105は、生徒画像生成部101で生成された生徒画像のR成分及び成分Gを用いて、R画素位置及びG画素位置における色差(R−G)である仮想色差(R−G)を生成する。   The virtual color difference (R−G) generation unit 105 is configured similarly to the virtual color difference (R−G) generation unit 33 illustrated in FIG. 2 and performs the same processing. That is, the virtual color difference (R−G) generation unit 105 uses the R component and the component G of the student image generated by the student image generation unit 101 to calculate the color difference (R−G) at the R pixel position and the G pixel position. A certain virtual color difference (R−G) is generated.

仮想色差(B−G)生成部106は、図2に示す仮想色差(B−G)生成部34と同様に構成され、同様の処理を行う。すなわち、仮想色差(B−G)生成部106は、生徒画像生成部101で生成された生徒画像の成分B及び成分Gを用いて、B画素位置及びG画素位置における色差(B−G)である仮想色差(B−G)を生成する。   The virtual color difference (B−G) generation unit 106 is configured similarly to the virtual color difference (B−G) generation unit 34 illustrated in FIG. 2 and performs the same processing. That is, the virtual color difference (B−G) generation unit 106 uses the component B and the component G of the student image generated by the student image generation unit 101 to calculate the color difference (B−G) at the B pixel position and the G pixel position. A certain virtual color difference (B−G) is generated.

遅延部104は、仮想色差(R−G)生成部105及び仮想色差(B−G)生成部106の各出力タイミングに合うように、生徒画像生成部101で生成された生徒画像を遅延させてG係数データ生成部107に供給する。   The delay unit 104 delays the student image generated by the student image generation unit 101 so as to match the output timings of the virtual color difference (RG) generation unit 105 and the virtual color difference (BG) generation unit 106. This is supplied to the G coefficient data generation unit 107.

<G係数データ生成部107の構成例>
図25は、G係数データ生成部107の構成例を示す図である。
G係数データ生成部107は、Gコードタップ選択部111、Gフィルタタップ選択部112、Gコード演算部113、G正規方程式加算部114、及びG係数データ演算部115を備える。
<Configuration Example of G Coefficient Data Generation Unit 107>
FIG. 25 is a diagram illustrating a configuration example of the G coefficient data generation unit 107.
The G coefficient data generation unit 107 includes a G code tap selection unit 111, a G filter tap selection unit 112, a G code calculation unit 113, a G normal equation addition unit 114, and a G coefficient data calculation unit 115.

Gコードタップ選択部111、Gフィルタタップ選択部112、及びGコード演算部113は、図11に示すGコードタップ選択部61、Gフィルタタップ選択部62、及びGコード演算部63と同様に構成され、同様の処理を行う。   The G code tap selection unit 111, the G filter tap selection unit 112, and the G code calculation unit 113 are configured similarly to the G code tap selection unit 61, the G filter tap selection unit 62, and the G code calculation unit 63 shown in FIG. The same processing is performed.

G正規方程式加算部114は、Gコード演算部113から供給されるコード毎に、教師画像生成部102で生成された教師画像Gの注目画素(教師データ)yと、Gフィルタタップ選択部112で選択された注目画素についてのGフィルタタップ(生徒データ(画素))xn,kとを対象とした足し込みを行う。 For each code supplied from the G code calculation unit 113, the G normal equation addition unit 114 generates a pixel of interest (teacher data) y k of the teacher image G generated by the teacher image generation unit 102 and a G filter tap selection unit 112. The G filter taps (student data (pixels)) xn, k for the target pixel selected in (1) are added.

そして、G正規方程式加算部114は、Gコード演算部113から供給されるコード毎に、フィルタタップ(生徒データ)xn,kを用い、式(19)の左辺の行列における生徒データどうしの乗算(xn,kn‘,k)と、サメーション(Σ)に相当する演算を行う。 Then, the G normal equation adding unit 114 uses the filter tap (student data) x n, k for each code supplied from the G code calculating unit 113 and multiplies the student data in the matrix on the left side of Expression (19). An operation corresponding to (x n, k x n ′, k ) and summation (Σ) is performed.

さらに、G正規方程式加算部114は、Gコード演算部113から供給されるコード毎に、Gフィルタタップ(生徒データ)xn,kと教師データyとを用い、式(19)の右辺のベクトルにおける生徒データxn,kと教師データyの乗算(xn,k)と、サメーション(Σ)に相当する演算を行う。 Further, the G normal equation adding unit 114 uses the G filter tap (student data) x n, k and the teacher data y k for each code supplied from the G code calculating unit 113 , and the right side of Expression (19) Multiplication (x n, k y k ) of student data x n, k and teacher data y k in the vector and calculation corresponding to summation (Σ) are performed.

すなわち、G正規方程式加算部114は、前回注目画素とされた教師データについて求められた式(19)における左辺の行列のコンポーネント(Σxn,kn‘,k)と、右辺のベクトルのコンポーネント(Σxn,k)と、を図示しない記憶部に記憶している。そして、G正規方程式加算部114は、行列コンポーネント(Σxn,kn‘,k)またはベクトルコンポーネント(Σxn,k)に対して、新たに注目画素とされた教師データについて、教師データyk+1と生徒データxn,k+1を用いて計算する、対応コンポーネントxn,k+1n‘,k+1又はxn,k+1k+1を、それぞれ足し込む(式(19)のサメーションで表される加算)。 That is, the G normal equation adding unit 114 performs the left-side matrix component (Σx n, k x n ′, k ) and the right-side vector component in the equation (19) obtained for the teacher data that is the previous pixel of interest. (Σx n, k y k ) is stored in a storage unit (not shown). Then, the G normal equation adding unit 114 applies the teacher data to the matrix data (Σx n, k x n ′, k ) or the vector component (Σx n, k y k ) for the teacher data newly set as the target pixel. The corresponding components x n, k + 1 x n ′, k + 1 or x n, k + 1 y k + 1 calculated by using the data y k + 1 and the student data x n, k + 1 are respectively added (represented by the summation of Expression (19)). Addition).

そして、G正規方程式加算部114は、入力された高解像度画像の教師データすべてを注目画素として、前述の足し込みを行うことにより、各コードについて、式(19)に示した正規方程式をたてる。G正規方程式加算部114は、各コードの正規方程式を、G係数データ演算部115に供給する。   Then, the G normal equation adding unit 114 performs the above-described addition using all the input high-resolution image teacher data as the pixel of interest, thereby forming the normal equation shown in Expression (19) for each code. . The G normal equation adding unit 114 supplies the normal equation of each code to the G coefficient data calculating unit 115.

G係数データ演算部115は、G正規方程式加算部114から供給される各コードについての正規方程式を解くことにより、各コードについて、最適なタップ係数wを演算する。そして、G係数データ演算部115は、注目画素が設定された教師画像の種類(G成分の画像)に応じて、得られたタップ係数wを、フィルタ演算を行うために必要となるG係数として出力する。このようにして、得られたコード毎のG係数が、図11に示すG係数記憶部64に記憶される。 G coefficient data calculation unit 115 solves the normal equations for each code supplied from the G normal equation adding section 114, for each code, calculates the optimal tap coefficient w n. Then, G coefficient data calculation unit 115, depending on the type of the teacher image the pixel of interest is set (G component of the image), the tap coefficient w n obtained, G coefficient necessary for performing the filter operation Output as. In this way, the obtained G coefficient for each code is stored in the G coefficient storage unit 64 shown in FIG.

<G係数データ生成部107の構成例>
図26は、(R−G)係数データ生成部108の構成例を示す図である。
(R−G)係数データ生成部108は、(R−G)コードタップ選択部121、(R−G)フィルタタップ選択部122、(R−G)生成部123、(R−G)コード演算部124、(R−G)正規方程式加算部125、及び(R−G)係数データ演算部126を備える。
<Configuration Example of G Coefficient Data Generation Unit 107>
FIG. 26 is a diagram illustrating a configuration example of the (R−G) coefficient data generation unit 108.
The (R−G) coefficient data generation unit 108 includes a (R−G) code tap selection unit 121, a (R−G) filter tap selection unit 122, a (R−G) generation unit 123, and a (R−G) code calculation. Unit 124, (R−G) normal equation addition unit 125, and (R−G) coefficient data calculation unit 126.

(R−G)コードタップ選択部121、(R−G)フィルタタップ選択部122、及び(R−G)コード演算部124は、図16に示す(R−G)コードタップ選択部71、(R−G)フィルタタップ選択部72、及び(R−G)コード演算部33と同様に構成され、同様の処理を行う。   The (R−G) code tap selection unit 121, the (R−G) filter tap selection unit 122, and the (R−G) code calculation unit 124 are the (R−G) code tap selection unit 71, ( (RG) It is comprised similarly to the filter tap selection part 72 and the (RG) code calculating part 33, and performs the same process.

(R−G)生成部123は、ベイヤー配列のRGB色フィルタアレイのR画素位置及びG画素位置において、教師画像生成部102で生成されたR成分及びG成分の各教師画像RGの差分を演算することで、仮想色差ではなく実色差である(R−G)成分を生成する。(R−G)生成部123は、生成した(R−G)成分を教師データとして、(R−G)正規方程式加算部125へ供給する。   The (R−G) generation unit 123 calculates the difference between the R component and G component teacher images RG generated by the teacher image generation unit 102 at the R pixel position and the G pixel position of the RGB color filter array in the Bayer array. Thus, an (RG) component that is not a virtual color difference but an actual color difference is generated. The (R−G) generation unit 123 supplies the generated (R−G) component to the (R−G) normal equation addition unit 125 as teacher data.

(R−G)正規方程式加算部125は、(R−G)コード演算部114から供給されるコード毎に、(R−G)生成部123で生成された注目画素の色差成分(R−G)(教師データ)yと、(R−G)フィルタタップ選択部122で選択された注目画素についての(R−G)フィルタタップ(生徒データ(画素))xn,kとを対象とした足し込みを行う。 The (R−G) normal equation adding unit 125 performs, for each code supplied from the (R−G) code calculation unit 114, the color difference component (R−G) of the target pixel generated by the (R−G) generation unit 123. ) (Teacher data) y k and (RG) filter tap (student data (pixel)) x n, k for the pixel of interest selected by the (RG) filter tap selection unit 122 Add.

すなわち、(R−G)正規方程式加算部125は、教師データとして教師画像のG成分の代わりに(R−G)成分を用いる点を除き、G正規方程式加算部114と同様の処理を行い、各(R−G)コードについて、式(19)に示した正規方程式をたてる。そして、(R−G)正規方程式加算部125は、各(R−G)コードの正規方程式を、(R−G)係数データ演算部126に供給する。   That is, the (RG) normal equation adding unit 125 performs the same process as the G normal equation adding unit 114 except that the (RG) component is used instead of the G component of the teacher image as the teacher data, For each (R−G) code, the normal equation shown in Equation (19) is established. Then, the (R−G) normal equation addition unit 125 supplies the normal equation of each (R−G) code to the (R−G) coefficient data calculation unit 126.

(R−G)係数データ演算部126は、G係数データ演算部115と同様の処理を行って、(R−G)係数データを生成する。   The (RG) coefficient data calculation unit 126 performs the same processing as that of the G coefficient data calculation unit 115 to generate (RG) coefficient data.

<学習装置による学習処理ルーチン>
図27は、図21の学習装置100による学習処理ルーチンを説明するフローチャートである。学習装置100は、3つのイメージセンサからそれぞれ生成されたRGB各成分の高解像画像RGBが入力されると、ステップS31以降の処理を実行する。
<Learning processing routine by learning device>
FIG. 27 is a flowchart for explaining a learning processing routine by the learning apparatus 100 of FIG. When the high-resolution image RGB of each RGB component generated from each of the three image sensors is input, the learning apparatus 100 executes the processes after step S31.

ステップS31において、図23に示す生徒画像生成部102は、入力された高解像度画像RGBから、例えば、LPFのシミュレーションモデルを用いるなどして、高解像度画像をダウンコンバートして、ベイヤー配列に従ってRGBが配置された生徒画像(生徒データ)を生成する。   In step S31, the student image generation unit 102 shown in FIG. 23 downconverts the high-resolution image from the input high-resolution image RGB using, for example, an LPF simulation model, and RGB is converted according to the Bayer array. The arranged student image (student data) is generated.

ステップS32において、教師画像生成部103は、入力された高解像度画像RGBを、生徒画像と同様にしてダウンコンバートすると共に、生徒画像に対し半画素位相をシフトした教師画像(教師データ)を生成する。   In step S32, the teacher image generation unit 103 down-converts the input high-resolution image RGB in the same manner as the student image, and generates a teacher image (teacher data) in which the half-pixel phase is shifted with respect to the student image. .

ステップS33において、図23に示す仮想色差(R−G)生成部105は、生徒画像生成部101で生成された生徒画像のG成分を用いて、R位置において補間された仮Gを生成する。仮想色差(R−G)生成部105は、生徒画像のR成分を用いて、G位置において補間された仮Rを生成する。そして、仮想色差(R−G)生成部105は、生徒画像のR成分及びG成分、上記の仮G及び仮Rを用いて、R画素位置及びG画素位置における色差(R−G)である仮想色差(R−G)を生成する。   In step S33, the virtual color difference (R−G) generation unit 105 illustrated in FIG. 23 generates a provisional G interpolated at the R position using the G component of the student image generated by the student image generation unit 101. The virtual color difference (R−G) generation unit 105 generates a provisional R interpolated at the G position using the R component of the student image. The virtual color difference (R−G) generation unit 105 uses the R component and the G component of the student image, and the provisional G and the provisional R, to calculate the color difference (RG) at the R pixel position and the G pixel position. A virtual color difference (RG) is generated.

また、仮想色差(B−G)生成部106は、生徒画像生成部101で生成された生徒画像のG成分を用いて、B位置において補間された仮Gを生成する。仮想色差(B−G)生成部106は、生徒画像のB成分を用いて、G位置において補間された仮Bを生成する。そして、仮想色差(B−G)生成部106は、生徒画像のB成分及びG成分G、上記の仮G及び仮Bを用いて、B画素位置及びG画素位置における色差(B−G)である仮想色差(B−G)を生成する。   Further, the virtual color difference (B−G) generation unit 106 generates a temporary G interpolated at the B position using the G component of the student image generated by the student image generation unit 101. The virtual color difference (B−G) generation unit 106 generates a provisional B interpolated at the G position using the B component of the student image. Then, the virtual color difference (B−G) generation unit 106 uses the B component and the G component G of the student image and the provisional G and the provisional B to calculate the color difference (B−G) at the B pixel position and the G pixel position. A certain virtual color difference (B−G) is generated.

ステップS34において、注目画素選択部103は、教師画像生成部102で生成された教師画像を構成する画素の中の未選択の任意の1画素を注目画素として選択する。すなわち、注目画素選択部101は、教師画像を構成する画素のうち、ラスタスキャン順で、まだ注目画素とされていない画素を注目画素として選択する。   In step S <b> 34, the target pixel selection unit 103 selects an unselected arbitrary pixel among the pixels constituting the teacher image generated by the teacher image generation unit 102 as the target pixel. That is, the pixel-of-interest selection unit 101 selects, as a pixel of interest, a pixel that has not yet been selected as a pixel of interest in the raster scan order among the pixels constituting the teacher image.

ステップS35において、図25に示すGコードタップ選択部111及び(R−G)コードタップ選択部116は、供給される生徒画像から、注目画素についてのGコードタップ及び(R−G)コードタップをそれぞれ選択する。また、図23に示す(R−G)データ生成部109は、生徒画像から注目画素についての(B−G)コードタップを選択する。   In step S35, the G code tap selection unit 111 and the (R−G) code tap selection unit 116 illustrated in FIG. 25 perform the G code tap and the (R−G) code tap for the pixel of interest from the supplied student image. Select each one. Further, the (R−G) data generation unit 109 illustrated in FIG. 23 selects the (B−G) code tap for the target pixel from the student image.

ステップS36において、Gコード演算部113は、供給されたGコードタップを符号化して符号化コードを生成する。(R−G)コード演算部124は、供給された(R−G)コードタップを符号化して符号化コードを生成する。図23に示す(B−G)係数データ生成部109は、(B−G)コードタップを符号化して符号化コードを生成する。   In step S36, the G code calculation unit 113 encodes the supplied G code tap to generate an encoded code. The (R−G) code calculation unit 124 encodes the supplied (R−G) code tap to generate an encoded code. The (BG) coefficient data generation unit 109 illustrated in FIG. 23 encodes the (BG) code tap to generate an encoded code.

ステップS37において、Gフィルタタップ選択部112及び(R−G)フィルタタップ選択部122は、それぞれの生徒画像から注目画素についてのGフィルタタップ及び(R−G)フィルタタップを選択する。また、(B−G)係数データ生成部109は、生徒画像から注目画素についての(B−G)フィルタタップを選択する。   In step S37, the G filter tap selection unit 112 and the (RG) filter tap selection unit 122 select the G filter tap and the (RG) filter tap for the target pixel from each student image. Further, the (B−G) coefficient data generation unit 109 selects the (B−G) filter tap for the target pixel from the student image.

ステップS38において、G正規方程式加算部114は、上述した式(12)に示す線形1次式を生成し、Gコードタップ選択部111で選択されたGコードタップを式(12)の画素X,・・・,Xとして用いる。G正規方程式加算部114は、このようにして生成した線形1次式を、ステップS36で生成された符号化コード毎に足し込んで、式(19)の正規方程式を生成する。G正規化方程式加算部114は、生成した正規化方程式をG係数データ演算部115に供給する。(R−G)正規方程式加算部125、(B−G)係数データ生成部109も同様に正規化方程式を生成する。 In step S38, the G normal equation adding unit 114 generates a linear linear expression represented by the above-described equation (12), and the G code tap selected by the G code tap selecting unit 111 is used as the pixel X 1 of the equation (12). , 2,..., used as X N. The G normal equation adding unit 114 adds the linear linear expression generated in this way for each encoded code generated in step S36, and generates a normal equation of Expression (19). The G normalization equation addition unit 114 supplies the generated normalization equation to the G coefficient data calculation unit 115. The (R−G) normal equation adding unit 125 and the (B−G) coefficient data generating unit 109 similarly generate a normalized equation.

ステップS39において、注目画素選択部103は、次の注目画素があるか否かを判定する。肯定判定の場合、すなわち次の注目画素がある場合は、ステップS34に戻り、ステップS34以降の処理が繰り返し実行される。否定判定の場合、ステップS40に進む。   In step S39, the target pixel selection unit 103 determines whether there is a next target pixel. If the determination is affirmative, that is, if there is a next pixel of interest, the process returns to step S34, and the processes after step S34 are repeatedly executed. If a negative determination is made, the process proceeds to step S40.

ステップS40において、G係数データ演算部115は、G係数データを生成する。具体的には、G係数データ演算部115は、式(19)の正規方程式に対して、例えば掃き出し法(Gauss−Jordanの消去法)を用いることによりタップ係数wを演算する。 In step S40, the G coefficient data calculation unit 115 generates G coefficient data. Specifically, G coefficient data calculation unit 115, to the normal equation of Equation (19), calculates the tap coefficient w n by using, for example, sweeping-out method (Gauss-Jordan elimination method).

G係数データ演算部115は、注目画素が設定された教師画像の種類(G成分の画像)に応じて、得られたタップ係数wを、G出力画像の予測演算を行うために必要となるG係数として出力する。
同様に、(R−G)係数データ演算部126は、(R−G)係数データを演算し、(B−G)係数データ生成部109は、(B−G)係数データを演算する。
G coefficient data calculation unit 115, depending on the type of the teacher image the pixel of interest is set (G component of the image), the tap coefficient w n obtained, necessary to perform the prediction calculation of the G output image Output as G coefficient.
Similarly, the (R−G) coefficient data calculation unit 126 calculates (R−G) coefficient data, and the (B−G) coefficient data generation unit 109 calculates (B−G) coefficient data.

このようにして、得られた符号化コード毎のG係数、(R−G)係数、および(B−G)係数は、高解像G生成部35、高解像(R−G)生成部36、高解像(B−G)生成部37にそれぞれ記憶される。   In this way, the G coefficient, (RG) coefficient, and (BG) coefficient for each obtained encoded code are stored in the high resolution G generator 35 and the high resolution (RG) generator. 36 and the high-resolution (BG) generation unit 37 respectively.

本発明は、上述した実施形態に限定されるものではなく、特許請求の範囲に記載された事項の範囲内で設計変更されたものにも適用可能である。   The present invention is not limited to the above-described embodiment, and can be applied to a design modified within the scope of the matters described in the claims.

例えば、図1又は図2に示すデモザイク部16は、半導体集積回路や、上述した各ステップを実行するためのプログラムがインストールされたコンピュータ等によって実現可能である。また、このプログラムは、光ディスク、ハードディスク等の記録媒体からコンピュータにインストールされたものでもよいし、有線又は無線通信手段を経由して、外部からコンピュータに伝送されたものでもよい。   For example, the demosaic unit 16 illustrated in FIG. 1 or 2 can be realized by a semiconductor integrated circuit, a computer in which a program for executing each step described above is installed, or the like. The program may be installed in a computer from a recording medium such as an optical disk or a hard disk, or may be transmitted from the outside to the computer via a wired or wireless communication unit.

10 撮像装置,16 デモザイク部,33 仮想色差(R−G)生成部,34 仮想色差(B−G)生成部,35 高解像G生成部,36 高解像(R−G)生成部,37 高解像(B−G)生成部,38 加算器,39 加算器,41 仮G生成部,42 仮R生成部,43 仮想色差(R−G)演算部,61 Gコードタップ選択部,62 Gフィルタタップ選択部,63 Gコード演算部,64 G係数記憶部,65 G積和演算部,71 (R−G)コードタップ選択部,72 (R−G)フィルタタップ選択部,73 (R−G)コード演算部,74 (R−G)係数記憶部,75 (R−G)積和演算部,100 学習装置



DESCRIPTION OF SYMBOLS 10 imaging device, 16 demosaic part, 33 virtual color difference (RG) production | generation part, 34 virtual color difference (BG) production | generation part, 35 high resolution G production | generation part, 36 high resolution (RG) production | generation part, 37 high-resolution (BG) generation unit, 38 adder, 39 adder, 41 provisional G generation unit, 42 provisional R generation unit, 43 virtual color difference (RG) calculation unit, 61 G code tap selection unit, 62 G filter tap selection unit, 63 G code calculation unit, 64 G coefficient storage unit, 65 G product-sum calculation unit, 71 (RG) code tap selection unit, 72 (RG) filter tap selection unit, 73 ( RG) code operation unit, 74 (RG) coefficient storage unit, 75 (RG) product-sum operation unit, 100 learning device



Claims (9)

複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第1の画像に対して、前記第1の画像の中の1つの画素を注目画素として選択する注目画素選択部と、
前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第1の配列パターンで配列されたコードタップを選択する第1のコードタップ選択部と、
前記第1のコードタップ選択部により選択された前記コードタップの特徴量を示すコードを演算する第1のコード演算部と、
コード毎に、コード分類型適応フィルタの第1の学習処理によって予め求められた複数の第1のタップ係数を記憶し、前記第1のコード演算部により演算されたコードに基づいて複数の第1のタップ係数を出力する第1の係数記憶部と、
前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第2の配列パターンで配列されたフィルタタップを選択する第1のフィルタタップ選択部と、
前記第1のフィルタタップ選択部により選択されたフィルタタップの各画素値と、前記第1の係数記憶部から出力された複数の第1のタップ係数と、に基づいて、前記注目画素毎に対応する出力画素の画素値を演算することで、前記第1の色成分の画像を生成する第1の画像生成部と、を備え、
前記第1のタップ係数は、
所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1の色成分のみで構成された第1の生徒画像と、
前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分のみで構成され、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした第1の教師画像と、
を用いた前記第1の学習処理であって、前記第1の生徒画像の各画素と前記第1の教師画像の各画素のマッピングされた正規方程式を解く前記第1の学習処理により算出されたタップ係数である
画像処理装置。
Attention for selecting one pixel in the first image as a target pixel for a first image output from an imaging device in which pixels corresponding to each of a plurality of color components are arranged in a predetermined arrangement A pixel selector;
A plurality of pixels of the first color component are arranged in a first arrangement with respect to a pixel of first color component which is a main component of the first image and selected by the pixel of interest selection unit. A first code tap selection unit for selecting code taps arranged in a pattern;
A first code calculation unit that calculates a code indicating a feature amount of the code tap selected by the first code tap selection unit;
For each code, a plurality of first tap coefficients obtained in advance by the first learning process of the code classification type adaptive filter are stored, and a plurality of first tap coefficients are calculated based on the code calculated by the first code calculation unit. A first coefficient storage unit for outputting a tap coefficient of
A plurality of pixels of the first color component are arranged in a second array with respect to a pixel of interest of the first color component that is a main component of the first image and selected by the pixel of interest selection unit. A first filter tap selection unit for selecting filter taps arranged in a pattern;
Corresponding to each pixel of interest based on each pixel value of the filter tap selected by the first filter tap selection unit and a plurality of first tap coefficients output from the first coefficient storage unit A first image generation unit that generates an image of the first color component by calculating a pixel value of an output pixel to be output;
The first tap coefficient is
A first student image composed of only the first color component from an image in which the color component, the arrangement of the color components, and the size of the predetermined subject are the same as the first image;
For the predetermined subject, a first teacher image composed of only the first color component having the same size as the first image and shifted by half a pixel in the horizontal and vertical directions with respect to the first student image When,
Calculated by the first learning process for solving the mapped normal equation of each pixel of the first student image and each pixel of the first teacher image. An image processing device that is a tap coefficient.
前記第1の色成分の各画素の画素位置、及び前記第1の色成分と異なる1つの色成分である第2の色成分の各画素の画素位置において、前記第1の色成分の画素の画素値と、前記第2の色成分の画素の画素値と、の差分である色差成分を生成する色差成分生成部と、
前記第1の色成分又は前記第2の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記色差成分の複数の画素が第3の配列パターンで配列されたコードタップを選択する第2のコードタップ選択部と、
前記第2のコードタップ選択部により選択された前記コードタップの特徴量を示すコードを演算する第2のコード演算部と、
コード毎に、コード分類型適応フィルタの第2の学習処理によって予め求められた複数の第2のタップ係数を記憶し、前記第2のコード演算部により演算されたコードに基づいて複数の第2のタップ係数を出力する第2の係数記憶部と、
前記第1の色成分又は前記第2の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記色差成分の複数の画素が第4の配列パターンで配列されたフィルタタップを選択する第2のフィルタタップ選択部と、
前記第2のフィルタタップ選択部により選択されたフィルタタップの各画素値と、前記第2の係数記憶部から出力された複数の第2のタップ係数と、に基づいて、前記注目画素毎に対応する出力画素の画素値を演算することで、前記色差成分の画像を生成する第2の画像生成部と、
前記第1の画像生成部により生成された前記第1の色成分の画像と、前記第2の画像生成部により生成された前記色差成分の画像と、に基づいて、前記第2の色成分の画像を演算する演算部と、
を更に備えた請求項1に記載の画像処理装置。
At the pixel position of each pixel of the first color component and at the pixel position of each pixel of the second color component which is one color component different from the first color component, the pixel of the first color component A color difference component generation unit that generates a color difference component that is a difference between a pixel value and a pixel value of a pixel of the second color component;
A plurality of pixels of the color difference component are arranged in a third arrangement pattern with respect to the pixel of interest that is the pixel of the first color component or the second color component and is selected by the pixel of interest selection unit. A second code tap selection unit for selecting a code tap;
A second code calculation unit that calculates a code indicating the feature quantity of the code tap selected by the second code tap selection unit;
For each code, a plurality of second tap coefficients obtained in advance by the second learning process of the code classification type adaptive filter are stored, and a plurality of second tap coefficients are stored based on the code calculated by the second code calculation unit. A second coefficient storage unit for outputting the tap coefficient of
A plurality of pixels of the color difference component are arranged in a fourth arrangement pattern with respect to the pixel of interest that is the pixel of the first color component or the second color component and is selected by the pixel of interest selection unit. A second filter tap selection unit for selecting a filter tap;
Corresponding to each pixel of interest based on each pixel value of the filter tap selected by the second filter tap selection unit and a plurality of second tap coefficients output from the second coefficient storage unit A second image generation unit that generates an image of the color difference component by calculating a pixel value of an output pixel to be output;
Based on the image of the first color component generated by the first image generation unit and the image of the color difference component generated by the second image generation unit, the second color component An arithmetic unit for calculating an image;
The image processing apparatus according to claim 1, further comprising:
前記第2のタップ係数は、
前記所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1及び前記第2の各色成分の差分として得られた色差画像である第2の生徒画像と、
前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分の画像と前記同一サイズの前記第2の色成分の画像との差分として得られた色差画像であって、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした前記色差画像である第2の教師画像と、
を用いた前記第2の学習処理であって、前記第2の生徒画像の各画素と前記第2の教師画像の各画素のマッピングされた正規方程式を解く前記第2の学習処理により算出されたタップ係数である
請求項2に記載の画像処理装置。
The second tap coefficient is
A color-difference image obtained as a difference between the first and second color components from an image in which the color component, the arrangement of the color components, and the size of the predetermined subject are the same as those of the first image. A second student image that is
A color difference image obtained as a difference between the image of the first color component having the same size as the first image and the image of the second color component having the same size for the predetermined subject, A second teacher image which is the color difference image shifted by half a pixel in the horizontal direction and the vertical direction with respect to the first student image;
Calculated by the second learning process that solves the mapped normal equation of each pixel of the second student image and each pixel of the second teacher image. The image processing apparatus according to claim 2, wherein the image processing apparatus is a tap coefficient.
前記色差成分生成部、前記第2のコードタップ選択部、前記第2のコード演算部、前記第2の係数記憶部、前記第2のフィルタタップ選択部、前記第2の画像生成部、及び前記演算部は、前記第1の画像において前記第1の色成分と異なる第2の色成分が複数存在する場合には、それぞれの第2の色成分毎に設けられる
請求項2又は請求項3に記載の画像処理装置。
The color difference component generation unit, the second code tap selection unit, the second code calculation unit, the second coefficient storage unit, the second filter tap selection unit, the second image generation unit, and The calculation unit is provided for each second color component when there are a plurality of second color components different from the first color component in the first image. The image processing apparatus described.
前記色差成分生成部は、
前記第2の色成分の各画素の画素位置において、当該画素位置に近接する第1の色成分の各画素の画素値から補間することで、前記第1の色成分の補間画素値を演算する第1の補間画素値演算部と、
前記第1の色成分の各画素の画素位置において、当該画素位置に近接する第2の色成分の各画素の画素値から補間することで、前記第2の色成分の補間画素値を演算する第2の補間画素値演算部と、
前記第2の色成分の各画素の画素位置においては、当該画素位置における第1の色成分の補間画素値と、当該画素位置における第2の色成分の画素値と、の差分を演算することで前記色差成分を生成し、前記第1の色成分の各画素の画素位置においては、当該画素位置における第1の色成分の画素値と、当該画素位置における第2の色成分の補間画素値と、の差分を演算することで前記色差成分を生成する差分演算部と、
を備えた請求項2から請求項4のいずれか1項に記載の画像処理装置。
The color difference component generation unit
The interpolated pixel value of the first color component is calculated by interpolating from the pixel value of each pixel of the first color component adjacent to the pixel position at the pixel position of each pixel of the second color component. A first interpolation pixel value calculation unit;
The interpolation pixel value of the second color component is calculated by interpolating from the pixel value of each pixel of the second color component adjacent to the pixel position at the pixel position of each pixel of the first color component. A second interpolation pixel value calculation unit;
In the pixel position of each pixel of the second color component, the difference between the interpolated pixel value of the first color component at the pixel position and the pixel value of the second color component at the pixel position is calculated. In the pixel position of each pixel of the first color component, the pixel value of the first color component at the pixel position and the interpolated pixel value of the second color component at the pixel position are generated. A difference calculation unit that generates the color difference component by calculating a difference between;
The image processing apparatus according to claim 2, further comprising:
第1の補間画素値演算部は、前記第2の色成分の各画素の画素位置において、当該画素位置の水平方向及び垂直方向にそれぞれ近接する前記第1の色成分の複数の画素がある場合、水平方向における第1の色成分の各画素の画素値から水平補間値を演算し、垂直方向における第1の色成分の各画素の画素値から垂直補間値を演算し、前記水平補間値及び前記垂直補間値のそれぞれの分散に基づいて、前記水平補間値及び前記垂直補間値の重み付け平均値を演算することで、前記第2の色成分の補間値を演算する
請求項5に記載の画像処理装置。
When the first interpolation pixel value calculation unit includes a plurality of pixels of the first color component that are close to each other in the horizontal direction and the vertical direction of the pixel position at the pixel position of each pixel of the second color component. Calculating a horizontal interpolation value from the pixel value of each pixel of the first color component in the horizontal direction, calculating a vertical interpolation value from the pixel value of each pixel of the first color component in the vertical direction, and The image according to claim 5, wherein an interpolation value of the second color component is calculated by calculating a weighted average value of the horizontal interpolation value and the vertical interpolation value based on respective variances of the vertical interpolation value. Processing equipment.
複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第1の画像に対して、前記第1の画像の中の1つの画素を注目画素として選択する注目画素選択ステップと、
前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択ステップで選択された注目画素に対して、前記第1の色成分の複数の画素が第1の配列パターンで配列されたコードタップを選択する第1のコードタップ選択ステップと、
前記第1のコードタップ選択ステップで選択された前記コードタップの特徴量を示すコードを演算する第1のコード演算ステップと、
コード毎に、コード分類型適応フィルタの学習処理によって予め求められた複数の第1のタップ係数を記憶する係数記憶部から、前記第1のコード演算ステップで演算されたコードに基づいて複数の第1のタップ係数を読み出す第1の係数読み出しステップと、
前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択ステップで選択された注目画素に対して、前記第1の色成分の複数の画素が第2の配列パターンで配列されたフィルタタップを選択する第1のフィルタタップ選択ステップと、
前記第1のフィルタタップ選択ステップで選択されたフィルタタップの各画素値と、前記係数読み出しステップで読み出された複数の第1のタップ係数と、に基づいて、前記注目画素毎に対応する出力画素の画素値を演算することで、前記第1の色成分の画像を生成する画像生成ステップと、を備え、
前記第1のタップ係数は、
所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1の色成分のみで構成された第1の生徒画像と、
前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分のみで構成され、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした第1の教師画像と、
を用いた第1の学習処理であって、前記第1の生徒画像の各画素と前記第1の教師画像の各画素のマッピングされた正規方程式を解く前記第1の学習処理により算出されたタップ係数である
画像処理方法。
Attention for selecting one pixel in the first image as a target pixel for a first image output from an imaging device in which pixels corresponding to each of a plurality of color components are arranged in a predetermined array A pixel selection step;
A plurality of pixels of the first color component are in a first arrangement with respect to a pixel of the first color component that is a main component of the first image and selected in the pixel of interest selection step. A first code tap selection step of selecting code taps arranged in a pattern;
A first code calculation step of calculating a code indicating the feature quantity of the code tap selected in the first code tap selection step;
For each code, a plurality of first tap coefficients are stored on the basis of the code calculated in the first code calculation step from a coefficient storage unit that stores a plurality of first tap coefficients obtained in advance by the learning process of the code classification type adaptive filter. A first coefficient reading step for reading one tap coefficient;
A plurality of pixels of the first color component are arranged in a second arrangement with respect to the pixel of interest of the first color component that is the main component of the first image and selected in the pixel of interest selection step. A first filter tap selection step for selecting filter taps arranged in a pattern;
Output corresponding to each pixel of interest based on each pixel value of the filter tap selected in the first filter tap selection step and the plurality of first tap coefficients read out in the coefficient reading step An image generation step of generating an image of the first color component by calculating a pixel value of the pixel,
The first tap coefficient is
A first student image composed of only the first color component from an image in which the color component, the arrangement of the color components, and the size of the predetermined subject are the same as the first image;
For the predetermined subject, a first teacher image composed of only the first color component having the same size as the first image and shifted by half a pixel in the horizontal and vertical directions with respect to the first student image When,
A first learning processing using the first tap which is calculated by the first learning processing solving the mapped normal equation for each pixel of each pixel of the student image said first teacher image Image processing method that is a coefficient.
コンピュータを、
複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第1の画像に対して、前記第1の画像の中の1つの画素を注目画素として選択する注目画素選択部と、
前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第1の配列パターンで配列されたコードタップを選択する第1のコードタップ選択部と、
前記第1のコードタップ選択部により選択された前記コードタップの特徴量を示すコードを演算する第1のコード演算部と、
コード毎に、コード分類型適応フィルタの学習処理によって予め求められた複数の第1のタップ係数を記憶し、前記第1のコード演算部により演算されたコードに基づいて複数の第1のタップ係数を出力する第1の係数記憶部と、
前記第1の画像の主成分となる第1の色成分の画素であって前記注目画素選択部により選択された注目画素に対して、前記第1の色成分の複数の画素が第2の配列パターンで配列されたフィルタタップを選択する第1のフィルタタップ選択部と、
前記第1のフィルタタップ選択部により選択されたフィルタタップの各画素値と、前記第1の係数記憶部から出力された複数の第1のタップ係数と、に基づいて、前記注目画素毎に対応する出力画素の画素値を演算することで、前記第1の色成分の画像を生成する第1の画像生成部と、して機能させるためのものであって、
前記第1のタップ係数は、
所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1の色成分のみで構成された第1の生徒画像と、
前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分のみで構成され、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした第1の教師画像と、
を用いた第1の学習処理であって、前記第1の生徒画像の各画素と前記第1の教師画像の各画素のマッピングされた正規方程式を解く前記第1の学習処理により算出されたタップ係数である
プログラム。
Computer
Attention for selecting one pixel in the first image as a target pixel for a first image output from an imaging device in which pixels corresponding to each of a plurality of color components are arranged in a predetermined array A pixel selector;
A plurality of pixels of the first color component are arranged in a first arrangement with respect to a pixel of first color component which is a main component of the first image and selected by the pixel of interest selection unit. A first code tap selection unit for selecting code taps arranged in a pattern;
A first code calculation unit that calculates a code indicating a feature amount of the code tap selected by the first code tap selection unit;
For each code, a plurality of first tap coefficients obtained in advance by a learning process of a code classification type adaptive filter are stored, and a plurality of first tap coefficients are calculated based on the code calculated by the first code calculation unit. A first coefficient storage unit for outputting
A plurality of pixels of the first color component are arranged in a second array with respect to a pixel of interest of the first color component that is a main component of the first image and selected by the pixel of interest selection unit. A first filter tap selection unit for selecting filter taps arranged in a pattern;
Corresponding to each pixel of interest based on each pixel value of the filter tap selected by the first filter tap selection unit and a plurality of first tap coefficients output from the first coefficient storage unit Calculating a pixel value of an output pixel to function as a first image generation unit that generates an image of the first color component;
The first tap coefficient is
A first student image composed of only the first color component from an image in which the color component, the arrangement of the color components, and the size of the predetermined subject are the same as the first image;
For the predetermined subject, a first teacher image composed of only the first color component having the same size as the first image and shifted by half a pixel in the horizontal and vertical directions with respect to the first student image When,
A first learning processing using the first tap which is calculated by the first learning processing solving the mapped normal equation for each pixel of each pixel of the student image said first teacher image A program that is a coefficient.
複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子と、
前記撮像素子から出力された第1の画像に対して画像処理を行う請求項1から請求項6のいずれか1項に記載の画像処理装置と、
を備えた撮像装置。
An image sensor in which pixels corresponding to each of a plurality of color components are configured in a predetermined arrangement;
The image processing apparatus according to any one of claims 1 to 6, wherein image processing is performed on the first image output from the imaging device.
An imaging apparatus comprising:
JP2018043672A 2018-03-10 2018-03-10 Image processing apparatus, image processing method, program, and imaging apparatus Active JP6435560B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018043672A JP6435560B1 (en) 2018-03-10 2018-03-10 Image processing apparatus, image processing method, program, and imaging apparatus
PCT/JP2018/041564 WO2019176161A1 (en) 2018-03-10 2018-11-08 Image processing device, image processing method, recording medium, and image pickup device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018043672A JP6435560B1 (en) 2018-03-10 2018-03-10 Image processing apparatus, image processing method, program, and imaging apparatus

Publications (2)

Publication Number Publication Date
JP6435560B1 true JP6435560B1 (en) 2018-12-12
JP2019161376A JP2019161376A (en) 2019-09-19

Family

ID=64655830

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018043672A Active JP6435560B1 (en) 2018-03-10 2018-03-10 Image processing apparatus, image processing method, program, and imaging apparatus

Country Status (2)

Country Link
JP (1) JP6435560B1 (en)
WO (1) WO2019176161A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532970B (en) * 2020-10-26 2022-03-04 奥比中光科技集团股份有限公司 Tap non-uniformity correction method and device of multi-tap pixel sensor and TOF camera

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6164564B1 (en) * 2016-03-14 2017-07-19 リアロップ株式会社 Image processing apparatus, image processing method, recording medium, program, and imaging apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014200033A (en) * 2013-03-29 2014-10-23 ソニー株式会社 Image processing device, method, and program
JP2015154308A (en) * 2014-02-17 2015-08-24 ソニー株式会社 Image processor, image processing method and program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6164564B1 (en) * 2016-03-14 2017-07-19 リアロップ株式会社 Image processing apparatus, image processing method, recording medium, program, and imaging apparatus

Also Published As

Publication number Publication date
JP2019161376A (en) 2019-09-19
WO2019176161A1 (en) 2019-09-19

Similar Documents

Publication Publication Date Title
JP6758859B2 (en) Imaging equipment, imaging system, and image processing methods
JP4284628B2 (en) IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD, PROGRAM FOR IMAGE PROCESSING METHOD, AND RECORDING MEDIUM CONTAINING PROGRAM FOR IMAGE PROCESSING METHOD
US10291844B2 (en) Image processing apparatus, image processing method, recording medium, program and imaging-capturing apparatus
JP4983093B2 (en) Imaging apparatus and method
JP5306563B2 (en) Imaging apparatus and image generation method
JP4946581B2 (en) Image processing device
CN103765876A (en) Image processing device, image processing method, and program
WO2011158572A1 (en) Image processing device, image processing method, and program
JP2014194706A (en) Image processor, image processing method and program
JP2013162347A (en) Image processor, image processing method, program, and device
US7868925B2 (en) Device, method, and program for generating high-resolution image data at a low data transfer rate
JP6276580B2 (en) Pixel interpolation processing device, imaging device, program, and integrated circuit
JP2013009293A (en) Image processing apparatus, image processing method, program, recording medium, and learning apparatus
JP6435560B1 (en) Image processing apparatus, image processing method, program, and imaging apparatus
JP2014200009A (en) Image processing device, method, and program
JP2004519156A (en) Contour filter for output signal of image detector
JP2014200000A (en) Image processing device, method, and program
JP2009048487A (en) Image processor and image processing program
JP2010118940A (en) Image processing apparatus, image processing method, and program
CN114881904A (en) Image processing method, image processing device and chip
JP4298446B2 (en) Image processing device
WO2014156732A1 (en) Image processing device, method, and program
JP4085396B2 (en) Learning apparatus and learning method
JP3946913B2 (en) Signal generation method and apparatus, and recording medium
JP6694626B1 (en) Image processing device, image processing method, program, and imaging device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180403

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180405

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20180405

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20180427

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180619

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180711

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180904

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180906

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180920

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181022

R150 Certificate of patent or registration of utility model

Ref document number: 6435560

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20220303