WO2019176161A1 - 画像処理装置、画像処理方法、記録媒体及び撮像装置 - Google Patents

画像処理装置、画像処理方法、記録媒体及び撮像装置 Download PDF

Info

Publication number
WO2019176161A1
WO2019176161A1 PCT/JP2018/041564 JP2018041564W WO2019176161A1 WO 2019176161 A1 WO2019176161 A1 WO 2019176161A1 JP 2018041564 W JP2018041564 W JP 2018041564W WO 2019176161 A1 WO2019176161 A1 WO 2019176161A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
image
code
tap
color component
Prior art date
Application number
PCT/JP2018/041564
Other languages
English (en)
French (fr)
Inventor
奥村 明弘
Original Assignee
リアロップ株式会社
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 リアロップ株式会社 filed Critical リアロップ株式会社
Publication of WO2019176161A1 publication Critical patent/WO2019176161A1/ja

Links

Images

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

Definitions

  • the present invention relates to an image processing device, an image processing method, a recording medium, and an imaging device.
  • a single-plate camera using one image sensor is adopted instead of a three-plate camera using three image sensors.
  • a color coding filter consisting of 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.
  • 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).
  • the single-panel 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.
  • a Bayer array three primary color filter array is often used.
  • 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.
  • a filter of any one of the three primary colors R, G, and B is disposed in each pixel of the image sensor. Each pixel outputs only an image signal corresponding to the color of the arranged filter.
  • 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.
  • the G component image signal is output from the G component pixel, and the R component and B component image signals are not output.
  • the B component pixel only the B component image signal is output, and the R component and G component image signals are not output.
  • Non-Patent Document 1 a DLMMSE method, which is a technique for interpolating insufficient color components, has been disclosed (see Non-Patent Document 1).
  • 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 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.
  • 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.
  • Patent Document 1 Also disclosed is a technique for obtaining an image signal corresponding to a CCD output of a three-plate camera with 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.
  • 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. And the technique of patent document 2 makes the pixel value which concerns on the predetermined pixel in the haze designation
  • Patent Document 3 a technique for reducing false color and noise of an image signal acquired by a single-plate camera is disclosed.
  • 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.
  • the direction of the target position is detected with higher accuracy.
  • the reference area is widened to detect an accurate directionality and reliably reduce false colors and noise.
  • the present invention solves the above-mentioned problems of the prior art.
  • the image processing apparatus 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;
  • By code calculation part A first coefficient storage unit that outputs a plurality of first tap coefficients based on the calculated code; and a pixel of a
  • 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. *
  • 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 calculating step, and a pixel of the first color component which
  • 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.
  • a recording medium that causes a computer to store a first image output from an image sensor in which pixels corresponding to a plurality of color components are arranged in a predetermined arrangement.
  • a target pixel selection unit that selects one of the pixels as a target pixel, and a pixel of a first color component that is a main component of the first image and is selected by the target pixel 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 the code tap selected by the first code tap selection unit
  • a first code calculation unit that calculates a code indicating a feature amount of the first code, a plurality of first tap coefficients obtained in advance by learning processing of a code classification type adaptive filter for each code, and storing the first code Calculation unit
  • 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
  • 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 image pickup apparatus includes an image pickup element in which pixels corresponding to each of a plurality of color components are configured in a predetermined arrangement, and the image that performs image processing on a first image output from the image pickup element. And a processing device.
  • the present invention can obtain a high-quality image of each color component from an image output from an image sensor in which pixels corresponding to each of a plurality of color components are configured in a predetermined arrangement.
  • FIG. 1 is a block diagram illustrating a configuration example of an embodiment of an imaging apparatus.
  • FIG. 2 is a block diagram illustrating a configuration example of the demosaic unit.
  • FIG. 3 is a block diagram illustrating a configuration example of the virtual color difference (RG) generation unit 33.
  • FIG. 4 is a block diagram illustrating a configuration example of the provisional G generation unit.
  • FIG. 5 is a diagram for explaining a method of interpolating the horizontal G component value at the R pixel position.
  • FIG. 6 is an explanatory diagram of the horizontal interpolation color difference and the vertical interpolation color difference.
  • FIG. 7A is a diagram illustrating an input image for obtaining the provisional Gr.
  • FIG. 1 is a block diagram illustrating a configuration example of an embodiment of an imaging apparatus.
  • FIG. 2 is a block diagram illustrating a configuration example of the demosaic unit.
  • FIG. 3 is a block diagram illustrating a configuration example of the virtual color difference (RG) generation unit 33
  • FIG. 7B is a diagram illustrating the horizontal interpolation color difference calculated when the provisional Gr is obtained.
  • FIG. 7C is a diagram illustrating the vertical interpolation color difference calculated when the provisional Gr is obtained.
  • FIG. 8A is a diagram illustrating an input image for obtaining the temporary Gb.
  • FIG. 8B is a diagram illustrating the horizontal interpolation color difference calculated when the provisional Gb is obtained.
  • FIG. 8C is a diagram illustrating the vertical interpolation color difference calculated when the provisional Gb is obtained.
  • FIG. 9 is a flowchart for explaining a temporary G generation routine by the temporary G generation unit in the virtual color difference (RG) generation unit.
  • FIG. 10 is a diagram for explaining the generation of the provisional R at the G pixel position.
  • FIG. 10 is a diagram for explaining the generation of the provisional R at the G pixel position.
  • FIG. 11 is a block diagram illustrating a configuration example of the high-resolution G generation unit.
  • FIG. 12 is a diagram illustrating a configuration example of the G code tap.
  • FIG. 13 is a diagram illustrating a configuration example of the G filter tap.
  • FIG. 14 is a block diagram illustrating a configuration example of the G code calculation unit.
  • FIG. 15 is a diagram for explaining an example of 1-bit DR quantization.
  • FIG. 16 is a block diagram illustrating a configuration example of a high resolution (RG) generation unit.
  • FIG. 17 is a diagram illustrating a configuration example of an (RG) code tap.
  • FIG. 18 is a diagram illustrating a configuration example of the (RG) filter tap.
  • FIG. 19 is a diagram illustrating a configuration example of a (BG) code tap.
  • FIG. 12 is a diagram illustrating a configuration example of the G code tap.
  • FIG. 13 is a diagram illustrating a configuration example of the G filter tap.
  • FIG. 14
  • FIG. 20 is a diagram illustrating a configuration example of the (BG) filter tap.
  • FIG. 21 is a flowchart showing a demosaic processing routine.
  • FIG. 22 is a diagram illustrating a high-resolution image generated by image processing on an input image.
  • FIG. 23 is a block diagram illustrating a configuration example of a learning device.
  • FIG. 24 is a diagram for explaining a student image and a teacher image generated from a high-resolution image.
  • FIG. 25 is a diagram illustrating a configuration example of the G coefficient data generation unit.
  • FIG. 26 is a diagram illustrating a configuration example of the (RG) coefficient data generation unit.
  • FIG. 27 is a flowchart for explaining a learning processing routine by the learning device.
  • 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.
  • 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.
  • 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.
  • 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.
  • CMOS Complementary Metal Oxide Semiconductor
  • 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.
  • 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.
  • the demosaic unit 16 performs demosaic processing on each of the RGB image data output from the defect correction unit 15. The detailed configuration of the demosaic unit 16 will be described later.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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 a virtual color difference (RG) and a virtual color difference (BG) are further 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.
  • 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).
  • 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.
  • the signal value output from the R pixel of the image sensor 12 is referred to as a pixel value R.
  • signal values output from the G pixel and the B pixel are defined as a pixel value G and a pixel value B, respectively.
  • 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 (BG) generation unit 34 for generating a virtual color difference (BG) is provided.
  • 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), a high-resolution ( A high resolution (BG) generation unit 37 that generates BG), an adder 38, and an adder 39 are provided.
  • the pixel-of-interest selection unit 31 scans each pixel constituting the input image, and sequentially selects one pixel from among a plurality of pixels as the pixel of interest. Thereby, in each block of the demosaic unit 16, image processing relating to the selected target pixel is executed.
  • the delay unit 32 delays 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.
  • the virtual color difference (RG) generation unit 33 uses the input images R and G, and the color difference (RG) at the R pixel position and the G pixel position of the input image (hereinafter referred to as virtual color difference (RG)). ) Is generated. Further, the virtual color difference (BG) generation unit 34 uses the input images B and G to calculate the color difference (BG) at the B pixel position and the G pixel position of the input image (hereinafter referred to as virtual color difference (BG)). Is generated).
  • 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) generator 36 uses the virtual color difference (RG) output from the virtual color difference (RG) generator 33 to set 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.
  • the adder 38 adds the high resolution G image output from the high resolution G generator 35 and the high resolution (RG) output from the high resolution (RG) generator 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 generation unit 35 and the high-resolution (BG) output from the high-resolution (BG) generation unit 37. By doing so, a high-resolution B image is generated.
  • FIG. 3 is a block diagram illustrating a configuration example of the virtual color difference (RG) generation unit 33.
  • the virtual color difference (RG) generation unit 33 includes a temporary G generation unit 41, a temporary R generation unit 42, and a virtual color difference (RG) calculation unit 43.
  • the temporary G generation unit 41 generates a temporary G that is a G component value interpolated at the R position of the input image using the input image G.
  • 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.
  • 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 R-temporary G at the R position of the input image. By calculating, a virtual color difference (RG) is generated. The virtual color difference (RG) 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.
  • 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).
  • FIG. 5 is a diagram for explaining a method of interpolating the horizontal G component value at the R pixel position.
  • 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)
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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)
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the temporary G calculation unit 57 first 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).
  • the virtual color difference (BG) generation unit 34 is configured in the same manner as the virtual color difference (RG) generation unit 33, but the R pixel position and pixel used in the virtual color difference (RG) generation unit 33. Instead of the value R, the B pixel position and the pixel value B are used.
  • the virtual color difference (BG) generation unit 34 similarly to the virtual color difference (RG) generation unit 33, the virtual color difference (BG) generation unit 34, at the B pixel position, the interpolation value Gh that is the G component value interpolated in the horizontal direction, and the vertical direction An interpolated value Gv, which is a G component value interpolated in (5), is calculated.
  • the virtual color difference (BG) generation unit 34 calculates a temporary G, which is a G component value at the B pixel position, using the horizontal interpolation color difference bh, average Abgh and variance Vbgh, vertical interpolation color difference bv, average Abgv, and variance Vbgv. To do.
  • 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).
  • 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.
  • 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.
  • FIG. 7A is a diagram illustrating an input image for obtaining the temporary Gr.
  • One of R, G, and B written in each 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.
  • FIG. 7B is a diagram showing the horizontal interpolation color difference calculated when obtaining the provisional Gr.
  • FIG. 7C is a diagram illustrating the vertical interpolation color difference calculated when the provisional Gr is obtained.
  • rh and bh written in each circle in FIG. 7B represent the horizontal interpolation color difference at the position of the R pixel or B pixel.
  • Rv and bv written in each circle in FIG. 7C represent the vertical interpolation color difference at the position of the R pixel or the B pixel.
  • the numbers following rh, bh, rv, and bv are the same numbers as the corresponding pixels of the input image.
  • the horizontal interpolation color difference bh is calculated as follows, for example.
  • bh11 B11 ⁇ Gh11
  • bh13 B13 ⁇ Gh13
  • bh15 B15 ⁇ Gh15
  • 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.
  • 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. .
  • the plurality of reference pixels corresponds to 9 pixels (thick line circles in FIGS. 7B and 7C) arranged in a cross shape with the R44 pixel as the center.
  • 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.
  • 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)
  • Vrgv V (rv04, rv24, rv40, rv42, rv44, rv46, rv48, rv64, rv
  • 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. .
  • FIG. 8A is a diagram illustrating an input image for obtaining the temporary Gb.
  • FIG. 8B is a diagram illustrating the horizontal interpolation color difference calculated when the provisional Gb is obtained.
  • FIG. 8C is a diagram illustrating the vertical interpolation color difference calculated when the provisional Gb is obtained.
  • 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 line circles in FIGS. 8B and 8C) arranged in a cross shape with B55 pixels as the center, but are not limited to this example.
  • the horizontal interpolation color difference average Abgh and variance Vbgh, and the vertical interpolation color difference average Abgv and variance Vbgv 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)
  • Vbgv V (bv15, bv35, bv51, bv53, bv55, bv57, bv59, bv75, rv
  • 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 the horizontal interpolation color difference and the average Abgv and variance Vbgv of the vertical interpolation color difference obtained as described above.
  • 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.
  • 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 (BG) generation unit 34 is performed in the same manner as the routine shown in FIG.
  • the input image of the temporary 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.
  • 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 respective pixel positions of the R pixel and the B pixel in the input image.
  • 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
  • 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.
  • 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 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.
  • 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.
  • 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.
  • 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.
  • the provisional Gr generation routine ends.
  • 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. .
  • FIG. 10 is a diagram for explaining the generation of the provisional R at the G pixel position.
  • 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 generation unit 42 in the virtual color difference (RG) generation unit 33 interpolates 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.
  • the virtual color difference (BG) 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.
  • the virtual color difference (RG) calculation unit 43 shown in FIG. 3 has a pixel value R at the R pixel position at the R pixel position of the input image and a 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.
  • the virtual color difference (RG) 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 (RG) is a general term for the virtual color difference (R-temporary G) and the virtual color difference (temporary RG). Note that a virtual color difference (RG) is not generated at the B pixel position.
  • the virtual color difference (RG) is supplied to the high resolution (RG) generator 36.
  • 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.
  • the virtual color difference (BG) generation unit 34 generates a virtual color difference (BG) at the B pixel position and the G pixel position of the input image. Note that a virtual color difference (BG) is not generated at the R pixel position.
  • the virtual color difference (BG) is supplied to the high resolution (BG) generation unit 37.
  • 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.
  • 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.
  • 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.
  • 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.
  • the output pixel exists at a position shifted in phase from the input pixel, as shown in FIG. 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.
  • 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.
  • the G code calculation unit 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 or other dynamic range width to extract a feature amount or 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.
  • 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
  • the G product-sum operation unit 65 is supplied.
  • 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) composed of a G component of a predetermined pattern 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.
  • 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.
  • the output pixel exists at a position shifted in phase from the input pixel, as shown in FIG. 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 that becomes a G filter tap.
  • 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.
  • the G filter tap selection unit 62 selects, for example, an input pixel to be 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.
  • 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 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.
  • 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.
  • 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.
  • 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.
  • DR Dynamic Range 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.
  • 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.
  • 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.
  • the DR quantization code is a code generated by the G code calculation unit 63.
  • 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.
  • 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.
  • the G code calculation unit 63 performs code classification by compressing the information amount of the code tap by the above-described DR quantization or vector quantization.
  • 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.
  • 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.
  • 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.
  • the conversion table storage unit 92 can be omitted.
  • the code obtained from the quantization operation unit 91 is supplied to the G coefficient storage unit 64 as it is.
  • the conversion table stored in the conversion table storage unit 92 can be updated as appropriate so as to optimize the output code.
  • 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.
  • different output codes may be the same code.
  • the high resolution (RG) generator 36 shown 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) generator 33.
  • a high resolution (RG) image is generated.
  • 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 an (RG) product-sum operation unit 75.
  • the (RG) code tap selection unit 71 generates a high resolution (RG) image from the virtual color difference (RG) image generated by the virtual color difference (RG) generation unit 33. Therefore, a code tap (hereinafter, referred to as (RG) code tap) composed of color difference (RG) components of a predetermined pattern required for this purpose is selected.
  • the (RG) code tap selected by the (RG) code tap selection unit 71 is supplied to the (RG) code calculation unit 73.
  • FIG. 17 is a diagram illustrating a configuration example of the (RG) code tap selected by the (RG) 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.
  • the output pixel exists at a position shifted in phase from the input pixel, as shown in FIG. 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 that becomes an (RG) code tap. Note that the (RG) code tap is not limited to the configuration example shown in FIG. 12, and may have other configurations.
  • the (RG) code tap selection unit 71 selects, for example, an input pixel to be an (RG) 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. .
  • the (RG) code calculation unit 73 Based on the (RG) code tap selected by the (RG) code tap selection unit 71, the (RG) code calculation unit 73, for example, performs quantization by DR quantization and other dynamic range widths. Encode and extract features.
  • the (RG) 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 (RG) code corresponding to the pixel of interest.
  • the G code calculation unit 63 supplies the (RG) code corresponding to the target pixel to the (RG) coefficient storage unit 74.
  • the (RG) coefficient storage unit 74 tap coefficients for each (RG) code obtained by learning described later are stored in advance associated with the (RG) code. Then, the (RG) coefficient storage unit 74 is stored in an address corresponding to the (RG) code supplied from the (RG) code calculation unit 73 among the already stored tap coefficients. The tap coefficient is read, and the read tap coefficient is supplied to the (RG) product-sum operation unit 75.
  • the (RG) filter tap selection unit 72 generates a high resolution (RG) image from the virtual color difference (RG) image generated by the virtual color difference (RG) 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 (RG) filter tap selection unit 72 supplies the selected (RG) filter tap to the (RG) product-sum operation unit 75.
  • FIG. 18 is a diagram illustrating a configuration example of the (RG) filter tap selected by the (RG) 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.
  • 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 that becomes a (RG) filter tap.
  • the (RG) filter tap is not limited to the configuration example shown in FIG. 18, and may have other configurations.
  • the G filter tap shown in FIG. 18 may have a different configuration from the G code tap shown in FIG.
  • the (RG) filter tap selection unit 72 selects, for example, an input pixel to be an (RG) 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. .
  • 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 (RG) product-sum operation unit 75 sets the pixel value of the output pixel corresponding to the target pixel in the input (RG) image to the (RG) filter tap according to the above-described equation (11). Use to filter.
  • N is the number of pixels of the (RG) filter tap.
  • Xn is the (RG) component value of each pixel constituting the (RG) filter tap selected by the (RG) filter tap selection unit 72.
  • W n is a tap coefficient read from the (R ⁇ G) coefficient storage unit 74.
  • (RG) product-sum operation unit 75 predicts (calculates) an output pixel corresponding to the pixel of interest by performing a filter operation shown in Expression (11).
  • the (RG) product-sum operation unit 75 predicts an output pixel corresponding to the target pixel every time one target pixel is selected from the pixels having all the (RG) components of the input image. (Calculate). Thereby, a high-resolution (RG) image having the same resolution as the high-resolution G image is generated.
  • 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.
  • 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.
  • the output pixel exists at a position shifted in phase from the input pixel, as shown in FIG. 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 (BG) filter tap. Note that the (BG) code tap is not limited to the configuration example shown in FIG. 19, and may have other configurations.
  • 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.
  • the output pixel exists at a position shifted in phase from the input pixel, as shown in FIG. 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 (BG) filter tap.
  • the (BG) filter tap is not limited to the configuration example shown in FIG. 20, and may have other configurations. Further, the (BG) filter tap shown in FIG. 20 may have a different configuration from the G code tap shown in FIG.
  • 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.
  • 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.
  • FIG. 21 is a flowchart showing a demosaic processing routine by the demosaic unit 16.
  • 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. .
  • step S21 the provisional G generation unit 41 illustrated in FIG. 3 generates a provisional G interpolated from the pixel values G of the adjacent G pixels at the R pixel position.
  • the virtual color difference (BG) generation unit 34 generates a temporary G that is interpolated from the pixel value G of the adjacent G pixel at the B pixel position.
  • 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.
  • the virtual color difference (BG) generation unit 34 generates a temporary B interpolated from the pixel value B of the adjacent B pixel at the G pixel position.
  • step S23 the virtual color difference (RG) 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. .
  • the virtual color difference (RG) 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.
  • 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. Is used to generate a virtual color difference (provisional BG).
  • step S24 the pixel-of-interest selecting unit 31 selects, as a pixel of interest, one of the pixels that have not yet been selected as the pixel of interest among the pixels constituting the output image for the input image. 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.
  • step S25 the G code tap selection unit 61 selects a G code tap for the pixel of interest for the input image.
  • the (RG) code tap selection unit 71 selects the (RG) code tap for the pixel of interest for the input image.
  • the high resolution (BG) generation unit 37 selects the (BG) code tap for the pixel of interest for the input image.
  • step S26 the G code calculation unit 63 encodes the supplied G code tap to generate an encoded code.
  • the (RG) code calculation unit 73 encodes the supplied (RG) code tap to generate an encoded code.
  • the high resolution (BG) generation unit 37 encodes the (BG) code tap to generate an encoded code.
  • step S27 the G filter tap selection unit 62 selects a G filter tap for the pixel of interest for the input image.
  • the (RG) filter tap selection unit 72 selects the (RG) filter tap for the pixel of interest for the input image.
  • the high resolution (BG) generation unit 37 selects the (BG) filter tap for the pixel of interest for the input image.
  • step S28 the G coefficient which is the tap coefficient associated with the encoded code calculated in step S26 is read from the G coefficient storage unit 64.
  • the (RG) coefficient associated with the encoded code calculated in step S26 is read from the (RG) coefficient storage unit 74.
  • the (BG) coefficient associated with the encoded code calculated in step S26 is read from the internal storage unit.
  • 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 (RG) product-sum operation unit 75 and the high-resolution (BG) generation unit 37 also perform the filter operation on the target pixel according to Expression (11).
  • 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.
  • 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 increasing the resolution.
  • a pixel value R constituting the image B image is generated.
  • 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.
  • step S32 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.
  • 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.
  • 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.
  • 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.
  • RG high resolution
  • 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.
  • the low-quality image refers to an image in which the image quality (resolution) has been reduced by filtering the high-quality image (second image) with an LPF (low pass 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.
  • the pixel value y of the high-quality pixel is obtained by a linear linear expression shown in Expression (12).
  • 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 .
  • 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 second or higher order.
  • the true value of the pixel value of the high-quality pixel of the k-th sample (k-th) is expressed as y k
  • the predicted value of the true value y k obtained by Expression (12) is expressed as y k ′.
  • the prediction error e k with respect to the true value y k of the prediction value y k ' is expressed by equation (13).
  • 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.
  • 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.
  • 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.
  • the tap coefficient w n is the optimal value
  • 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 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).
  • Equation (18) is obtained from Equation (16) and Equation (17).
  • equation (18) is represented by the normal equation shown in the following equation (19).
  • the optimum tap coefficient (a tap coefficient that minimizes the sum E of square errors) w n is obtained for each code.
  • 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.
  • 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.
  • the learning apparatus 100 includes a student image generation unit 101, a teacher image generation unit 102, a target pixel selection unit 103, a delay unit 104, a virtual color difference (RG) generation unit 105, a virtual color difference (BG) generation unit 106, G A coefficient data generation unit 107, an (RG) coefficient data generation unit 108, and a (BG) coefficient data generation unit 109 are provided.
  • the high-resolution image input to the learning apparatus 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.
  • 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.
  • the down-conversion filter characteristics may be, for example, 4-pixel averaging processing, LPF processing, or the like.
  • 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.
  • the teacher image generation unit 102 generates a teacher image RGB for each component of RGB by down-converting the high-resolution image RGB input to the learning device 100 and shifting the down-converted image RGB by half a pixel.
  • the down conversion filter characteristics are the same as those of the student image generation unit 101.
  • the pixel-of-interest selection unit 103 selects any one pixel in the teacher image generated by the teacher image generation unit 102 as the pixel of interest.
  • the target pixel selection unit 103 obtains information such as the coordinate value of the pixel selected as the target pixel from the virtual color difference (RG) generation unit 105, the G coefficient data generation unit 107, the (RG) coefficient data generation unit 108, and the like. To each block.
  • the virtual color difference (RG) generation unit 105 is configured in the same manner as the virtual color difference (RG) generation unit 33 shown in FIG. 2, and performs the same processing. That is, the virtual color difference (RG) 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 (RG) at the R pixel position and the G pixel position. A certain virtual color difference (RG) is generated.
  • the virtual color difference (BG) generation unit 106 is configured in the same manner as the virtual color difference (BG) generation unit 34 shown in FIG. 2, and performs the same processing. That is, the virtual color difference (BG) 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 (BG) at the B pixel position and the G pixel position. A certain virtual color difference (BG) is generated.
  • 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.
  • 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.
  • 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.
  • the G normal equation addition unit 114 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.
  • 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.
  • 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.
  • 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 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 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.
  • FIG. 26 is a diagram illustrating a configuration example of the (RG) coefficient data generation unit 108.
  • the (RG) coefficient data generation unit 108 includes an (RG) code tap selection unit 121, an (RG) filter tap selection unit 122, an (RG) generation unit 123, and an (RG) code calculation. Section 124, (RG) normal equation adding section 125, and (RG) coefficient data calculating section 126.
  • the (RG) code tap selection unit 121, the (RG) filter tap selection unit 122, and the (RG) code calculation unit 124 include an (RG) code tap selection unit 71, ( The RG) filter tap selection unit 72 and the (RG) code calculation unit 33 are configured in the same manner and perform the same processing.
  • the (RG) 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. As a result, an (RG) component that is not a virtual color difference but an actual color difference is generated.
  • the (RG) generation unit 123 supplies the generated (RG) component to the (RG) normal equation addition unit 125 as teacher data.
  • the (RG) normal equation addition unit 125 For each code supplied from the (RG) code calculation unit 114, the (RG) normal equation addition unit 125 performs the color difference component (RG) of the target pixel generated by the (RG) 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.
  • the (RG) normal equation adding unit 125 performs the same processing as the G normal equation adding unit 114 except that the (RG) component is used as the teacher data instead of the G component of the teacher image, For each (RG) code, the normal equation shown in equation (19) is established. Then, the (RG) normal equation adding unit 125 supplies the (RG) code normal equation to the (RG) coefficient data calculating unit 126.
  • (RG) coefficient data calculation unit 126 performs the same processing as G coefficient data calculation unit 115 to generate (RG) coefficient data.
  • FIG. 27 is a flowchart for explaining a learning processing routine by the learning apparatus 100 of FIG.
  • the learning apparatus 100 executes the processes after step S31.
  • 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.
  • 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. .
  • step S33 the virtual color difference (RG) generator 105 shown in FIG. 23 generates a temporary G interpolated at the R position using the G component of the student image generated by the student image generator 101.
  • the virtual color difference (RG) generation unit 105 generates a temporary R interpolated at the G position using the R component of the student image.
  • the virtual color difference (RG) generation unit 105 uses the R component and G component of the student image and the provisional G and provisional R described above to obtain the color difference (RG) at the R pixel position and the G pixel position.
  • a virtual color difference (RG) is generated.
  • the virtual color difference (BG) 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 (BG) generation unit 106 generates a temporary B interpolated at the G position using the B component of the student image.
  • the virtual color difference (BG) generation unit 106 uses the B component and the G component G of the student image, the temporary G and the temporary B, and calculates the color difference (BG) at the B pixel position and the G pixel position.
  • a certain virtual color difference (BG) is generated.
  • step S34 the pixel-of-interest 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 pixel of interest. 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.
  • step S35 the G code tap selection unit 111 and the (RG) code tap selection unit 116 shown in FIG. 25 perform the G code tap and (RG) code tap for the pixel of interest from the supplied student image. Select each one. Also, the (RG) data generation unit 109 shown in FIG. 23 selects the (BG) code tap for the pixel of interest from the student image.
  • step S36 the G code calculation unit 113 encodes the supplied G code tap to generate an encoded code.
  • the (RG) code calculation unit 124 encodes the supplied (RG) code tap to generate an encoded code.
  • the (BG) coefficient data generation unit 109 shown in FIG. 23 encodes the (BG) code tap to generate an encoded code.
  • 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 pixel of interest from each student image. Further, the (BG) coefficient data generation unit 109 selects the (BG) filter tap for the target pixel from the student image.
  • 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 (RG) normal equation adding unit 125 and the (BG) coefficient data generating unit 109 also generate normalized equations.
  • 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.
  • 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 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.
  • the (RG) coefficient data calculation unit 126 calculates (RG) coefficient data
  • the (BG) coefficient data generation unit 109 calculates (BG) coefficient data.
  • the obtained G coefficient, (RG) coefficient, and (BG) coefficient for each encoded code are stored in the high resolution G generator 35, the high resolution (RG) generator. 36, and stored in the high-resolution (BG) generator 37, respectively.
  • the demosaic unit 16 shown in FIG. 1 or 2 can be realized by a semiconductor integrated circuit, a computer in which a program for executing the above steps 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.

Landscapes

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

Abstract

画像処理装置は、撮像素子から出力された第1の画像の中の1つの画素を注目画素として選択する注目画素選択部と、前記選択された注目画素に対して、前記第1の色成分の複数の画素が第1の配列パターンで配列されたコードタップを選択する第1のコードタップ選択部と、前記選択された前記コードタップの特徴量を示すコードを演算する第1のコード演算部と、前記演算されたコードに基づいて複数の第1のタップ係数を出力する第1の係数記憶部と、前記第1の画像の第1の色成分の画素であって前記選択された注目画素に対して、前記第1の色成分の複数の画素が第2の配列パターンで配列されたフィルタタップを選択する第1のフィルタタップ選択部と、前記選択されたフィルタタップの各画素値と、前記第1の係数記憶部から出力された複数の第1のタップ係数と、に基づいて、前記第1の色成分の画像を生成する第1の画像生成部と、を備える。

Description

画像処理装置、画像処理方法、記録媒体及び撮像装置
 本発明は、画像処理装置、画像処理方法、記録媒体及び撮像装置に関する。
 カメラの小型化、軽量化のために、3枚のイメージセンサを用いた3板式カメラではなく、1枚のイメージセンサを用いた単板式カメラが採用されている。
 単板式カメラのイメージセンサの光入射面には、1画素毎に割り当てられた色フィルタアレイからなる色コーディングフィルタが設置される。これにより、このイメージセンサは、色コーディングフィルタにより色コーディングされた色成分の信号を1画素毎に生成する。色コーディングフィルタを構成する色フィルタアレイとして、例えば、R(赤),G(緑),B(青)の3原色フィルタアレイがある。
 単板式カメラは、イメージセンサにより1画素毎に1つの色成分の信号を得て、各画素が持っている色成分の信号以外の色信号を線形補間処理により生成する。これにより、単板式カメラは、3板式カメラにより得られる画像に近い画像を得る。
 色コーディングフィルタを構成する色フィルタアレイとして、ベイヤー配列の3原色色フィルタアレイが用いられることが多い。ベイヤー配列では、Gの色フィルタが市松状に配置され、残った部分にRとBの各色フィルタが一列毎に交互に配置される。
 イメージセンサの各画素には、R,G,Bの3原色のいずれか1つの色のフィルタが配置される。各画素は、配置されたフィルタの色に対応する画像信号のみを出力する。
 すなわち、Rの色フィルタが配置された画素からは、R成分の画像信号が出力されるが、G成分およびB成分の画像信号は出力されない。同様に、G成分の画素からは、G成分の画像信号のみが出力され、R成分およびB成分の画像信号は出力されない。B成分の画素からは、B成分の画像信号のみが出力され、R成分およびG成分の画像信号は出力されない。
 そこで、従来、不足する色成分を補間する技術であるDLMMSE法が開示されている(非特許文献1参照)。DLMMSE法では、まず、水平・垂直の2方向において、イメージセンサからの入力画像の各画素位置の補間色差が求められて、注目している画素の位置の近傍の5画素の統計量が算出される。
 算出された統計量を用いて、注目している画素の方向性(水平方向または垂直方向)が検出され、その検出結果に応じて、水平色差と垂直色差とが混合(按分)されることで、色差(R-G、B-G)が求められる。
 このようにして求められた色差(R-G、B-G)に基づいて、G画素の画像信号、R画素の画像信号、およびB画素の画像信号がそれぞれ求められ、出力画像として生成される。
 また、3板式カメラのCCD出力に相当する画像信号を単板式カメラのCCDイメージセンサで得られるようにする技術が開示されている(特許文献1参照)。特許文献1の技術は、入力画像における注目画素に対応する画素およびその周辺の画素値を変数とし、予め学習により得られた係数を用いた積和演算により出力画像の注目画素の画素値を予測する。
 また、複数の色成分により構成される色フィルタアレイを有するイメージセンサの出力から、画質を劣化させることなく、各色成分の画像信号を得る技術が開示されている(特許文献2参照)。
 特許文献2の技術は、単板式画素部から出力される第1の画像から指定領域を選択し、その指定領域の各々の色成分の代表値を算出し、指定領域の画素値から得られる特徴量に基づいて、予め記憶されている係数を読み出す。そして、特許文献2の技術は、 指定領域内の所定の画素に係る画素値を予測タップとし、代表値を用いて予測タップの各色成分の画素値を変換値に変換し、変換値を変数とし、読み出された係数を用いた積和演算により、各色成分の画素のみで構成される画像の各画素値をそれぞれ演算する。
 また、単板式カメラにより取得された画像信号の偽色や雑音を低減する技術が開示されている(特許文献3)。
 特許文献3の技術は、ベイヤー配列の単板式画素部から出力される画像信号により構成される第1の画像から、参照エリアを設定するとともに、参照エリアの領域を変化させて、参照エリア内の画素の画素値から得られる統計量を評価して、第1の画像内の注目位置の方向性を検出することで、注目位置の方向性をより高い精度で検出する。これにより、ナイキスト周波数に近い高周波成分を含む入力画像が入力された場合でも、参照エリアを広げることで、正確な方向性を検出して、確実に偽色や雑音を低減する。
特開2000-308079公報 特開2014-200008公報 特開2014-200033公報
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の画像に対して、前記第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の学習処理により算出されたタップ係数である。   
 本発明に係る画像処理方法は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第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の画像の中の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の学習処理により算出されたタップ係数である。
 本発明に係る撮像装置は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子と、前記撮像素子から出力された第1の画像に対して画像処理を行う前記画像処理装置と、を備えている。
 本発明は、複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された画像から、各色成分の高画質の画像を得ることができる。
図1は、撮像装置の一実施の形態の構成例を示すブロック図である。 図2は、デモザイク部の構成例を示すブロック図である。 図3は、仮想色差(R-G)生成部33の構成例を示すブロック図である。 図4は、仮G生成部の構成例を示すブロック図である。 図5は、R画素位置における水平方向のG成分値の補間方法を説明する図である。 図6は、水平補間色差及び垂直補間色差の説明図である。 図7Aは、仮Grを求めるときの入力画像を示す図である。 図7Bは、仮Grを求める際に算出される水平補間色差を示す図である。 図7Cは、仮Grを求める際に算出される垂直補間色差を示す図である。 図8Aは、仮Gbを求めるときの入力画像を示す図である。 図8Bは、仮Gbを求める際に算出される水平補間色差を示す図である。 図8Cは、仮Gbを求める際に算出される垂直補間色差を示す図である。 図9は、仮想色差(R-G)生成部内の仮G生成部による仮G生成ルーチンを説明するフローチャートである。 図10は、G画素位置における仮Rの生成を説明する図である。 図11は、高解像G生成部の構成例を示すブロック図である。 図12は、Gコードタップの構成例を示す図である。 図13は、Gフィルタタップの構成例を示す図である。 図14は、Gコード演算部の構成例を示すブロック図である。 図15は、1ビットDR量子化の例を説明する図である。 図16は、高解像(R-G)生成部の構成例を示すブロック図である。 図17は、(R-G)コードタップの構成例を示す図である。 図18は、(R-G)フィルタタップの構成例を示す図である。 図19は、(B-G)コードタップの構成例を示す図である。 図20は、(B-G)フィルタタップの構成例を示す図である。 図21は、デモザイク処理ルーチンを示すフローチャートである。 図22は、入力画像に対する画像処理によって生成された高解像画像を示す図である。 図23は、学習装置の構成例を示すブロック図である。 図24は、高解像度画像から生成される生徒画像及び教師画像を説明するための図である。 図25は、G係数データ生成部の構成例を示す図である。 図26は、(R-G)係数データ生成部の構成例を示す図である。 図27は、学習装置による学習処理ルーチンを説明するフローチャートである。
 以下、図面を参照しながら本技術の実施の形態について説明する。
<撮像装置10の構成>
 図1は、撮像装置10の一実施の形態の構成例を示すブロック図である。撮像装置10は、静止画、及び、動画のいずれも撮影することができる。
 撮像装置は、光学系11、イメージセンサ12、アナログ信号処理部13、アナログ/ディジタル(A/D)色分離部14、欠陥補正部15、デモザイク部16、色処理部17、ガンマ補正部18、Y色差変換部19、コーデック部20、出力部21、及び制御部22を備える。
 光学系11は、例えば、図示しないズームレンズや、フォーカスレンズ、絞り、光学ローパスフィルタ等を有する。光学系11は、外部からの被写体光を、イメージセンサ12に入射させる。
 イメージセンサ12は、例えば、複数の受光素子(画素)を有するCMOS(Complementary Metal Oxide Semiconductor)イメージセンサである。イメージセンサ12の光入射面には、3原色RGBからなるベイヤー配列の色フィルタアレイが配置される。
 イメージセンサ12は、光学系11からの入射光を受光し、受光素子毎に光電変換を行って、光学系11からの入射光に対応する電気信号として画像信号を出力する。したがって、Rの色フィルタが配置された画素(R画素)からは、R成分の画像信号が得られるが、G成分およびB成分の画像信号は得られない。同様に、G画素からは、G成分の画像信号が得られるが、R成分およびB成分の画像信号は得られない。B画素からは、B成分の画像信号が得られるが、R成分およびG成分の画像信号は得られない。
 アナログ信号処理部13は、イメージセンサ12から出力された画像信号に対して相関二重サンプリング処理等の所定のアナログ信号処理を実行する。
 A/D色分離部14は、アナログ信号処理部13から出力された画像信号をA/D変換し、さらに色分離処理を行い、赤(R)、緑(G)、青(B)のそれぞれの画像データを出力する。
 欠陥補正部15は、A/D色分離部14から出力されたRGBの各画像データに対して欠陥補正処理を実行する。
 デモザイク部16は、欠陥補正部15から出力されたRGBの各画像データにデモザイク処理を実行する。なお、デモザイク部16の詳細な構成は後述する。
 色処理部17は、デモザイク部16から出力されたRGBの各画像データに色補正処理を実行する。
 ガンマ補正部18は、色処理部17から出力されたRGBの画像データにガンマ補正処理を実行する。
 Y色差変換部19は、ガンマ補正部18から出力されたRGBの画像データをY色差の画像データに変換する。
 コーデック部20は、MPEGなどのエンコーダを用いて、Y色差変換部19から出力されたY色差の画像データを圧縮処理する。
 出力部21は、コーデック部20からの画像データを出力する。例えば、出力部21は、半導体メモリや、磁気ディスク、光ディスク等の記録媒体を駆動する図示しないドライバを有し、コーデック部20からの画像データをその記録媒体に記録する。また、出力部21は、コーデック部20からの画像データを、例えば、ネットワークや各種ケーブル、無線などの通信手段に出力してもよい。
 制御部22は、ユーザ操作等に従い、撮像装置10を構成する各ブロックを制御する。
<デモザイク部16の構成例>
 図2は、デモザイク部16の構成例を示すブロック図である。デモザイク部16で行われるデモザイク処理について説明する。
 デモザイク部16は、入力画像の注目している画素(以下、注目画素という)の位置における方向性を検出し、その方向性に基づき仮G画像を生成する。その後、R及びBを補間した仮R及び仮Bを生成し、さらに仮想色差(R-G)及び仮想色差(B-G)を生成する。デモザイク部16は、これらの仮想色差(R-G)及び(B-G)の画素と、コード分類型適応フィルタの学習処理によって予め求められた係数と、に基づいて、入力画像の各画素位置から半画素シフトした画像を生成する。
 また、デモザイク部16は、G画素の画素値と、コード分類型適応フィルタの学習処理によって予め求められた係数と、に基づいて、入力画像の各画素位置から半画素シフトした高解像G画像を生成する。最後に、デモザイク部16は、この高解像G画像と仮想色差(R-G)及び(B-G)とに基づいて、高解像R画像または高解像B画像を生成する。
 デモザイク部16は、ベイヤー配列の色フィルタアレイが配置されたイメージセンサ12からの画像(入力画像)に対してデモザイク処理を施し、高解像R画像、高解像G画像、及び高解像B画像をそれぞれ出力する。
 以下の説明では、イメージセンサ12のR画素から出力された信号値を画素値Rとする。同様に、G画素、B画素から出力された信号値をそれぞれ画素値G、画素値Bとする。
 デモザイク部16は、入力画像から注目画素を選択する注目画素選択部31、入力G画像の遅延処理を行う遅延部32,仮想色差(R-G)を生成する仮想色差(R-G)生成部33、仮想色差(B-G)を生成する仮想色差(B-G)生成部34を備える。
 さらに、デモザイク部16は、高解像G画像を生成する高解像G生成部35、高解像(R-G)を生成する高解像(R-G)生成部36、高解像(B-G)を生成する高解像(B-G)生成部37、加算器38、及び加算器39を備える。
 注目画素選択部31は、入力画像を構成する各画素を走査し、複数の画素の中から1つの画素を注目画素として順次選択する。これにより、デモザイク部16の各ブロックでは、選択中の注目画素に関する画像処理が実行される。
 遅延部32は、高解像G生成部35、高解像(R-G)生成部36、高解像(B-G)生成部37における画像生成タイミングがそろうように、入力画像に遅延処理を施して、高解像G生成部35へ出力する。
 仮想色差(R-G)生成部33は、入力画像R及びGを用いて、入力画像のR画素位置及びG画素位置における色差(R-G)(以下、仮想色差(R-G)という。)を生成する。また、仮想色差(B-G)生成部34は、入力画像B及びGを用いて、入力画像のB画素位置及びG画素位置における色差(B-G)(以下、仮想色差(B-G)という。)を生成する。
 高解像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画像を生成する。
 加算器38は、高解像G生成部35から出力された高解像G画像と、高解像(R-G)生成部36から出力された高解像(R-G)と、を加算することで、高解像R画像を生成する。加算器39は、高解像G生成部35から出力された高解像G画像と、高解像(B-G)生成部37から出力された高解像(B-G)と、を加算することで、高解像B画像を生成する。
<仮想色差(R-G)生成部33の構成例>
 図3は、仮想色差(R-G)生成部33の構成例を示すブロック図である。仮想色差(R-G)生成部33は、仮G生成部41、仮R生成部42、及び仮想色差(R-G)演算部43を備える。
 仮G生成部41は、入力画像Gを用いて、入力画像のR位置において補間されたG成分値である仮Gを生成する。仮R生成部42は、入力画像Rを用いて、入力画像のG位置において補間されたR成分値である仮Rを生成する。
 仮想色差(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位置においては、仮想色差を生成しない。
 図4は、仮G生成部41の構成例を示すブロック図である。
 仮G生成部41は、水平補間部51、水平補間色差演算部52、水平補間色差統計量算出部53、垂直補間部54、垂直補間色差演算部55、垂直補間色差統計量算出部56、および仮G演算部57を備える。
 水平補間部81は、入力画像のR画素の画素位置(以下、R画素位置という。)において水平方向に補間されたG成分値である補間値Ghを算出する。
 図5は、R画素位置における水平方向のG成分値の補間方法を説明する図である。
 ベイヤー配列において、R画素が中心画素となる場合、その中心画素の周囲(上下左右)には4つのG画素である画素G1~G4が配置される。この場合、水平補間部81は、中心画素の左右両隣に位置するG2画素の画素値G2と、G3画素の画素値G3とを用いて、式(1)に従って、中心画素の画素位置における水平方向に補間されたG成分値である補間値Ghを演算する。
Gh=(G2+G3)/2   ・・・(1)
 水平補間部51により補間された補間値Ghは、水平補間色差演算部52と仮G演算部57に供給される。これにより、入力画像のR画素置では、画素値Rおよび補間値Ghが得られる。
 水平補間色差演算部52は、各R画素位置において、入力画像のうちのR画素位置の画素値Rと、水平補間部51から供給された水平方向の補間値Ghと、の差分である水平補間色差rhを演算する。具体的には、水平補間色差演算部52は、式(2)に従って、水平補間色差rhを演算する。
rh=R-Gh        ・・・(2)
 水平補間色差演算部52により求められた水平補間色差rhは、水平補間色差統計量算出部53及び仮G演算部57に供給される。
 水平補間色差統計量算出部53は、水平補間色差演算部52から供給される水平補間色差rhに基づいて、水平補間色差rhの平均である平均Arghと、水平補間色差rhの分散である分散Vrghとをそれぞれ算出し、これらの値を仮G演算部57に供給する。
 一方、垂直補間部54は、入力画像のR画素位置において垂直方向に補間されたG成分値である補間値Gvを算出する。
 垂直補間部54は、図5に示すように、中心画素の上下両隣に位置するG1画素の画素値G1と、G4画素の画素値G4とを用いて、式(3)に従って、中心画素の画素位置における垂直方向に補間されたG成分値である補間値Gvを演算する。
Gv=(G1+G4)/2   ・・・(3)
 垂直補間部54により補間された補間値Gvは、垂直補間色差演算部55と仮G演算部57に供給される。これにより、入力画像のR画素置では、画素値Rおよび補間値Gvが得られる。
 垂直補間色差演算部55は、各R画素位置において、入力画像のうちのR画素位置の画素値Rと、垂直補間部54から供給された垂直方向の補間値Gvと、の差分である垂直補間色差rvを演算する。具体的には、垂直補間色差演算部55は、式(4)に従って、垂直補間色差rvを演算する。
rv=R-Gv        ・・・(4)
 垂直補間色差演算部55により求められた垂直補間色差rvは、垂直補間色差統計量算出部56及び仮G演算部57に供給される。
 垂直補間色差統計量算出部56は、水平補間色差演算部55から供給される垂直補間色差rvに基づいて、垂直補間色差rvの平均である平均Argvと、垂直補間色差rvの分散である分散Vrgvとをそれぞれ算出し、これらの値を仮G演算部57に供給する。
 仮G演算部57は、水平補間色差演算部52で求められた水平補間色差rh、水平補間色差統計量算出部53で求められた平均Argh及び分散Vrghと、垂直補間色差演算部55で求められた垂直補間色差rvと、垂直補間色差統計量算出部56で求められた平均Argv及び分散Vrgvと、を用いて、R画素位置におけるG成分値である仮Gを演算する。
 仮G演算部57は、最初に、水平補間色差rhの分散Vrghと、垂直補間色差rvの分散Vrgvの大小判定を行い、大きい方をLVrg、小さい方をSVrgと設定する。そして、仮G演算部57は、式(5)に従って、R画素位置における仮Gを演算する。
Figure JPOXMLDOC01-appb-M000001
 一方、仮想色差(B-G)生成部34は、仮想色差(R-G)生成部33と同様に構成されるが、仮想色差(R-G)生成部33で使用したR画素位置や画素値Rの代わりに、B画素位置や画素値Bを使用する。
 よって、仮想色差(B-G)生成部34は、仮想色差(R-G)生成部33と同様に、B画素位置において、水平方向に補間されたG成分値である補間値Gh、垂直方向に補間されたG成分値である補間値Gvを算出する。
 さらに、仮想色差(B-G)生成部34は、水平補間色差bh(=B-Gh)を演算し、当該水平補間色差bhに基づいて、水平補間色差bhの平均である平均Abghと、水平補間色差bhの分散である分散Vbghとをそれぞれ算出する。
 仮想色差(B-G)生成部34は、同様に、垂直補間色差bv(=B-Gv)を演算し、当該垂直補間色差bvに基づいて、垂直補間色差bvの平均である平均Abgvと、垂直補間色差bvの分散である分散Vbgvとをそれぞれ算出する。
 仮想色差(B-G)生成部34は、水平補間色差bh、平均Abgh及び分散Vbgh、垂直補間色差bv、平均Abgv及び分散Vbgvを用いて、B画素位置におけるG成分値である仮Gを演算する。
 このとき、水平補間色差bhの分散Vbghと、垂直補間色差bvの分散Vbgvの大小判定が行われ、大きい方がLVbg、小さい方がSVbgに設定される。そして、式(6)に従って、B画素位置における仮Gが演算される。
Figure JPOXMLDOC01-appb-M000002
 図6は、水平補間色差及び垂直補間色差の説明図である。図中のそれぞれの円は、1画素を表す。画素毎に、色成分値が与えられる。
 入力画像におけるR画素位置においては、水平方向の補間値Ghが演算される。そして、R画素位置毎に、画素値Rと補間値Ghとの差分が演算され、水平補間色差rhが求められる。つまり、入力画像のR画素位置では、rh=R-Ghが演算される。
 さらに、R画素位置において、垂直方向の補間値Gvが演算される。そして、R画素位置毎に、画素値Rと補間値Gvとの差分が演算され、垂直補間色差rvが求められる。つまり、入力画像のR画素位置では、rv=R-Gvも演算される。
 一方、入力画像におけるB画素位置においては、水平方向の補間値Ghが演算される。そして、B画素位置毎に、画素値Bと補間値Ghとの差分が演算され、水平補間色差bhが求められる。つまり、入力画像のB画素位置では、bh=B-Ghが演算される。
 さらに、B画素位置において、垂直方向の補間値Gvが演算される。そして、B画素位置毎に、画素値Bと補間値Gvとの差分が演算され、垂直補間色差bvが求められる。つまり、入力画像のB画素位置では、bv=B-Gvも演算される。
 R画素位置の仮Grは、垂直補間色差rvまたは水平補間色差rhにおける注目位置を中心とした参照画素毎に求められる。また、B画素位置の仮Gbは、垂直補間色差bvまたは水平補間色差bhにおける注目位置を中心とした参照画素毎に求められる。
 つぎに、入力画像中のR44画素が注目画素の場合における仮Grの求め方を説明する。なお、図7Aは、仮Grを求めるときの入力画像を示す図である。図中の各円内に記されたR、G、Bのいずれかの文字は、各画素の色成分を表す。R、G、Bのいずれかに続く数字は、左上から順にY方向の位置を示す0~9、X方向の位置を示す0~9の2桁の番号が付されている。
 図7Bは、仮Grを求める際に算出される水平補間色差を示す図である。図7Cは、仮Grを求める際に算出される垂直補間色差を示す図である。また、図7Bの各円内に記されたrh、bhは、R画素又はB画素の位置の水平補間色差を表す。図7Cの各円内に記されたrv、bvは、R画素又はB画素の位置の垂直補間色差を表す。さらに、rh、bh、rv、bvに続く番号は、入力画像の対応する画素と同一の番号である。
 水平補間色差rhは、例えば次のように算出される。
rh00=R00-Gh00
rh02=R02-Gh02
rh04=R04-Gh04
 水平補間色差bhは、例えば次のように算出される。
bh11=B11-Gh11
bh13=B13-Gh13
bh15=B15-Gh15
 垂直補間色差rvは、例えば次のように算出される。
rv00=R00-Gv00
rv02=R02-Gv02
rv04=R04-Gv04
 垂直補間色差bvは、例えば次のように算出される。
bv11=B11-Gv11
bv13=B13-Gv13
bv15=B15-Gv15
 なお、他の画素位置においても同様の演算が行われる。
 R44画素が注目画素の場合、R44画素の画素位置を中心とする複数の参照画素の画素値に基づいて、水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv及び分散Vrgvが求められる。
 複数の参照画素は、R44画素を中心として十字状に配列された9画素(図7B及び図7Cの太線の円)が該当する。ただし、参照画素は、十字状に配列された9画素に限定されるものではない。また、参照画素は、注目画素を中心として矩形に配列されたものでもよいが、画素数が少なく、広い領域をカバーできるものが好ましい。
 具体的には、水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv及び分散Vrgvは、次の式(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)に従って演算される。
 つぎに、入力画像中のB55画素が注目画素の場合における仮Gbの求め方を説明する。図8Aは、仮Gbを求めるときの入力画像を示す図である。図8Bは、仮Gbを求める際に算出される水平補間色差を示す図である。図8Cは、仮Gbを求める際に算出される垂直補間色差を示す図である。
 B55画素が注目画素の場合、B55画素の画素位置を中心とする複数の参照画素の画素値に基づいて、水平補間色差の平均Abgh及び分散Vbgh、垂直補間色差の平均Abgv及び分散Vbgvが求められる。複数の参照画素は、B55画素を中心として十字状に配列された9画素(図8B及び図8Cの太線の円)が該当するが、この例に限定されるものではない。
 具体的には、水平補間色差の平均Abgh及び分散Vbgh、垂直補間色差の平均Abgv及び分散Vbgvは、次の式(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)に従って演算される。
<仮G生成ルーチン>
 図9は、仮想色差(R-G)生成部33内の仮G生成部41による仮G生成ルーチンを説明するフローチャートである。ここでは、R画素位置における仮Gの生成について説明する。なお、B画素位置における仮Gの生成、つまり仮想色差(B-G)生成部34による仮Gの生成も、図9に示すルーチンと同様に行われる。
 仮G生成部41の入力画像は、ベイヤー配列の色フィルタアレイが配置されたイメージセンサ12から出力された画像である。このため、入力画像は、イメージセンサ12のG画素から出力されたG画像、R画素から出力されたR画像、及びB画素から出力されたB画像で構成される。
 ステップS11において、仮G生成部41内の水平補間部51及び垂直補間部54は、入力画像におけるR画素とB画素のそれぞれの画素位置における式(1)及び式(3)を演算する。これにより、中心画素の画素位置における水平方向に補間されたG成分の値である補間値Ghと、垂直方向に補間されたG成分の値である補間値Gvとが算出される。そして、ステップS12に進む。
 ステップS12において、水平補間色差演算部52及び垂直補間色差演算部55は、入力画像におけるR画素とB画素のそれぞれの画素位置における式(2)及び式(4)を演算する。これにより、水平補間色差rhと垂直補間色差rvが算出され、算出された各値が図示しないメモリに保持される。そして、ステップS13に進む。
 ステップS13において、水平補間色差統計量算出部53及び垂直補間色差統計量算出部56は、水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv、分散Vrgvを算出する。
 ステップS14において、仮G演算部57は、水平補間色差統計量算出部53及び垂直補間色差統計量算出部56で算出された水平補間色差の平均Argh及び分散Vrgh、垂直補間色差の平均Argv、分散Vrgv等を用いて、式(5)に従って水平方向及び垂直方向に重み付けを行って、R画素位置における仮Grを演算する。仮Grが生成されると、仮Gr生成ルーチンは終了する。
 一方、図3に示す仮R生成部42は、入力画像のG画素位置において、当該R画素位置の周囲にある複数のR画素の画素値を用いて、R成分値である仮Rを生成する。
 図10は、G画素位置における仮Rの生成を説明する図である。
 仮R生成部42は、例えば、R00画素とR02画素の間にあるG画素が中心画素になった場合、中心画素の左右両隣にあるR00画素とR02画素の各画素値R00、R02を用いて、式(9)に従って、水平方向に補間されたR成分値である仮R(r01)を算出する。
r01=(R00+R02)/2    ・・・(9)
 また、仮R生成部42は、例えば、R00画素とR20画素の間にあるG画素が中心画素になった場合、中心画素の上下両隣にあるR00画素とR20画素の各画素値R00、R20を用いて、式(10)に従って、垂直方向に補間されたR成分値である仮R(r10)を算出する。
r01=(R00+R20)/2    ・・・(10)
 以上のように、仮想色差(R-G)生成部33内の仮R生成部42では、入力画像のG画素位置において、水平方向又は垂直方向に隣接するR画素の画素値を補間することによって、仮Rが生成される。仮想色差(B-G)生成部34でも同様に、入力画像のG画素位置において、水平方向又は垂直方向に隣接するB画素の画素値を補間することによって、仮Bが生成される。
 図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に供給される。
 以上のように、仮想色差(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に供給される。
<高解像G画像の生成>
 図2に示す高解像G生成部35は、遅延部32から供給される入力G画像に基づいて、当該入力G画像の2倍の解像度を有する高解像G画像を生成する。具体的には、高解像G生成部35は、入力画像における注目画素に対応する画素およびその周辺の画素値を変数とし、予め学習により得られた係数を用いて積和演算を行うことにより、出力画像の注目画素の画素値を予測する。
 図11は、高解像G生成部35の構成例を示すブロック図である。
 高解像G生成部35は、Gコードタップ選択部61、Gフィルタタップ選択部62と、Gコード演算部63、G係数記憶部64、及びG積和演算部65を備える。 
 Gコードタップ選択部61は、遅延部32から供給される入力画像から、高解像G画像を生成するため必要となる所定パターンのG成分からなるコードタップ(以下、Gコードタップという。)を選択する。Gコードタップは、例えば、出力画像の注目画素に対応する位置の入力画像の画素を中心画素とした所定の個数の画素で構成される。Gコードタップ選択部61により選択されたGコードタップは、Gコード演算部63に供給される。
<コードタップの構成例>
 図12は、Gコードタップ選択部61で選択されるGコードタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
 出力画素は、図12に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。太線の丸印は、Gコードタップとなる入力画素を表す。なお、Gコードタップは、図12に示す構成例に限定されるものではなく、他の構成であってもよい。
 Gコードタップ選択部61は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についてのGコードタップとなる入力画素を選択し、選択したGコードタップをGコード演算部63に供給する。
 Gコード演算部63は、Gコードタップ選択部69で選択されたGコードタップに基づき、例えば、DR量子化による量子化やその他ダイナミックレンジの幅をコード化して特徴量等を抽出する。Gコード演算部63は、抽出した特徴量等の情報を用いて、所定の規則に従って注目画素をコード分類し、その結果、注目画素に対応するGコードを得る。Gコード演算部63は、注目画素に対応するGコードをG係数記憶部64に供給する。なお、Gコード演算部63の詳細構成については後述する。
 G係数記憶部64には、後述する学習によって求められたGコード毎のタップ係数が、予め、Gコードに対応づけられて記憶されている。そして、G係数記憶部64は、既に記憶されているタップ係数の中から、Gコード演算部63から供給されるGコードに対応するアドレスに記憶されているタップ係数を読み出し、読み出したタップ係数をG積和演算部65に供給する。
 Gフィルタタップ選択部62は、高解像G画像を生成するために必要となる所定パターンのG成分からなるフィルタタップ(以下、Gフィルタタップという。)を入力画像から選択して取得する。Gフィルタタップは、例えば、出力画像の注目画素に対応する位置の入力画像の画素を中心画素とした所定の個数の画素で構成される。Gフィルタタップ選択部62により選択されたGフィルタタップは、G積和演算部65に供給される。
<Gフィルタタップの構成例>
 図13は、Gフィルタタップ選択部62で選択されるフィルタタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
 出力画素は、図13に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、Gフィルタタップとなる入力画素を表す。なお、Gフィルタタップは、図13に示す構成例に限定されるものではなく、他の構成であってもよい。また、図13に示すGフィルタタップは、図13に示すGコードタップと異なる構成であってもよい。
 Gフィルタタップ選択部62は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についてのフィルタタップとなる入力画素を選択する。
 G積和演算部65は、予め設定された線形一次式において、Gフィルタタップ選択部62から出力されるGフィルタタップを変数として代入し、G係数記憶部64から供給された係数を用いてフィルタの演算を行う。すなわち、G積和演算部65は、入力G画像における注目画素に対応する出力画素の画素値を、式(11)に従い、Gフィルタタップを用いてフィルタ演算する。
Figure JPOXMLDOC01-appb-M000003
 ここで、Nは、Gフィルタタップの画素数である。Xは、Gフィルタタップ選択部62で選択されたGフィルタタップを構成する各G画素の画素値である。Wは、G係数記憶部64から読み出されたタップ係数である。
 G積和演算部65は、式(11)に示すフィルタ演算を行うことによって、注目画素に対応する出力画素を予測(演算)する。G積和演算部65は、入力画像のすべてのG画素の中から1つの注目画素が選択される毎に、当該注目画素に対応する出力画素を予測(演算)する。これにより、入力G画像の2倍の解像度である高解像G画像が生成される。
 図2に示す高解像G生成部35は、生成した高解像G画像を外部へ出力すると共に、加算器38へ供給する。
<Gコード演算部63の構成例>
 図14は、上述したGコード演算部63の構成例を示すブロック図である。Gコード演算部63は、量子化演算部91、及び、変換テーブル記憶部92を備える。
 量子化演算部91は、Gコードタップ選択部61から供給されるGコードタップを構成する入力画素の各画素値を、例えば1ビットのDR量子化を用いて量子化し、各入力画素の1ビットを所定の順番で配列したコードを、変換テーブル記憶部92に供給する。
 ここで、コード分類を行う1つの手法として、例えば、コードタップとしての画素値を量子化するDR(Dynamic Range)量子化がある。
 DR量子化では、注目画素のコードタップを構成する各画素の画素値が量子化され、量子化によって得られたDR量子化コードにしたがって、注目画素のコードが決定される。
 例えば、NビットDR量子化の場合、コードタップを構成する各画素の画素値の最大値MAXと最小値MINが検出される。そして、コードタップを構成する各画素の集合の局所的なダイナミックレンジDR(=MAX-MIN)が演算される。このダイナミックレンジDRに基づいて、コードタップを構成する各画素の画素値がNビットに量子化される。より具体的には、コードタップを構成する各画素の画素値から最小値MINが減算され、その減算値がDR/2で除算(量子化)される。以上の処理によって得られたコードタップを構成するNビットの各画素の画素値が所定の順番で並べられ、並べられたビット列がDR量子化コードとして出力される。
 したがって、コードタップが例えば1ビットDR量子化処理された場合、そのコードタップを構成する各画素の画素値は、最大値MAXと最小値MINとの平均で除算される(整数演算)。これにより、各画素の画素値が1ビットとされる(二値化)。そして、その1ビットの画素値を所定の順番で並べたビット列が、DR量子化コードとして出力される。DR量子化のみでコード分類が行われる場合、例えば、DR量子化コードが、Gコード演算部63で発生されるコードとなる。
 なお、Gコード演算部63は、例えば、コードタップを構成する画素の画素値のレベル分布のパターンを、そのままクラスコードとして出力することも可能である。この場合、コードタップがM個の画素の画素値で構成され、各画素の画素値にAビットが割り当てられるとすると、コード演算部34から出力されたコードの場合の数は、(2通りとなり、画素の画素値のビット数Aに指数的に比例した膨大な数となる。
 したがって、Gコード演算部63は、コードタップの情報量を前述のDR量子化又はベクトル量子化等によって圧縮することにより、コード分類を行うのが好ましい。
 図15は、1ビットDR量子化の例を説明する図である。なお、横軸は、コードタップを構成する入力画素の順番(又は位置)を表す。縦軸は、コードタップを構成する入力画素の画素値を表す。
 1ビットDR量子化では、コードタップを構成する入力画素の画素値の中の最大画素値Maxから最小画素値Minを減算することにより、単純ダイナミックレンジDRが求められる。そして、単純ダイナミックレンジDRを2等分するレベルを閾値として、コードタップを構成する各入力画素の画素値が2値化され、1ビットのコードに変換される。
 図13に示すコードタップの場合、例えば、8画素すべてのコードタップについて1ビットDR量子化が行われると、8ビットのDR量子化コードが得られる。量子化演算部91で得られたコードは、変換テーブル記憶部92に供給される。
 変換テーブル記憶部92には、変換テーブルが記憶されている。この変換テーブルは、量子化演算部91で得られたコード(入力コード)を最適化して、G係数記憶部64に対応できるコード(出力コード)に変換する。よって、量子化演算部91で得られたコードは、変換テーブル記憶部92に予め記憶された変換テーブルによって、G係数記憶部64用のコードに変換される。そして、変換されたコードは、G係数記憶部64に供給される。
 なお、G係数記憶部64の記憶容量が十分大きい場合、変換テーブル記憶部92は省略可能である。その場合は、量子化演算部91より得られたコードは、そのままG係数記憶部64に供給される。
 また、変換テーブル記憶部92に記憶されている変換テーブルは、出力コードを最適化するように、適宜更新可能である。これにより、変換テーブルは、例えば、ある入力コードの発生頻度が低い場合は、当該入力コードに対応する出力コードを代表的なコードに置き換えてもよい。また、変換テーブルは、異なる出力コードであっても近似する係数に対応づけられている場合、異なる出力コードを同一コードにしてもよい。
<高解像(R-G)画像の生成>
 図2に示す高解像(R-G)生成部36は、仮想色差(R-G)生成部33で生成された仮想色差(R-G)に基づいて、高解像G画像と同じ解像度である高解像(R-G)画像を生成する。
 図16は、高解像(R-G)生成部36の構成例を示すブロック図である。
 高解像G生成部35は、(R-G)コードタップ選択部71、(R-G)フィルタタップ選択部72と、(R-G)コード演算部73、(R-G)係数記憶部74、及び(R-G)積和演算部75を備える。
 (R-G)コードタップ選択部71は、仮想色差(R-G)生成部33で生成された仮想色差(R-G)画像の中から、高解像(R-G)画像を生成するために必要となる所定パターンの色差(R-G)成分からなるコードタップ(以下、(R-G)コードタップという。)を選択する。(R-G)コードタップ選択部71により選択された(R-G)コードタップは、(R-G)コード演算部73に供給される。
<(R-G)コードタップの構成例>
 図17は、(R-G)コードタップ選択部71で選択される(R-G)コードタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
 出力画素は、図17に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。太線の丸印は、(R-G)コードタップとなる入力画素を表す。なお、(R-G)コードタップは、図12に示す構成例に限定されるものではなく、他の構成であってもよい。
 (R-G)コードタップ選択部71は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についての(R-G)コードタップとなる入力画素を選択する。
 (R-G)コード演算部73は、(R-G)コードタップ選択部71で選択された(R-G)コードタップに基づき、例えば、DR量子化による量子化やその他ダイナミックレンジの幅をコード化して特徴量等を抽出する。(R-G)コード演算部73は、抽出した特徴量等の情報を用いて、所定の規則に従って注目画素をコード分類し、その結果、注目画素に対応する(R-G)コードを得る。Gコード演算部63は、注目画素に対応する(R-G)コードを(R-G)係数記憶部74に供給する。
 (R-G)係数記憶部74には、後述する学習によって求められた(R-G)コード毎のタップ係数が、予め、(R-G)コードに対応づけられている記憶されている。そして、(R-G)係数記憶部74は、既に記憶されているタップ係数の中から、(R-G)コード演算部73から供給される(R-G)コードに対応するアドレスに記憶されているタップ係数を読み出し、読み出したタップ係数を(R-G)積和演算部75に供給する。
 (R-G)フィルタタップ選択部72は、仮想色差(R-G)生成部33で生成された仮想色差(R-G)画像の中から、高解像(R-G)画像を生成するために必要となる所定パターンの(R-G)成分からなるフィルタタップ(以下、(R-G)フィルタタップという。)を選択して取得する。(R-G)フィルタタップ選択部72は、選択した(R-G)フィルタタップを(R-G)積和演算部75へ供給する。
<(R-G)フィルタタップの構成例>
 図18は、(R-G)フィルタタップ選択部72で選択される(R-G)フィルタタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
 出力画素は、図18に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、(R-G)フィルタタップとなる入力画素を表す。なお、(R-G)フィルタタップは、図18に示す構成例に限定されるものではなく、他の構成であってもよい。また、図18に示すGフィルタタップは、図17に示すGコードタップと異なる構成であってもよい。
 (R-G)フィルタタップ選択部72は、例えば、注目画素に対応する入力画素の位置に最も近い入力画素を基準として、注目画素についての(R-G)フィルタタップとなる入力画素を選択する。
 (R-G)積和演算部75は、予め設定された線形一次式において、(R-G)フィルタタップ選択部72から出力される(R-G)フィルタタップを変数として代入し、(R-G)係数記憶部74から供給された係数を用いてフィルタの演算を行う。すなわち、(R-G)積和演算部75は、入力(R-G)画像における注目画素に対応する出力画素の画素値を、上述した式(11)に従い、(R-G)フィルタタップを用いてフィルタ演算する。
 式(11)において、Nは、(R-G)フィルタタップの画素数である。Xは、(R-G)フィルタタップ選択部72で選択された(R-G)フィルタタップを構成する各画素の(R-G)成分値である。Wは、(R-G)係数記憶部74から読み出されたタップ係数である。
 (R-G)積和演算部75は、式(11)に示すフィルタ演算を行うことによって、注目画素に対応する出力画素を予測(演算)する。(R-G)積和演算部75は、入力画像のすべての(R-G)成分を有する画素の中から1つの注目画素が選択される毎に、当該注目画素に対応する出力画素を予測(演算)する。これにより、高解像G画像と同じ解像度である高解像(R-G)画像が生成される。
 そして、図2に示す高解像(R-G)生成部36は、生成した高解像(R-G)画像を加算器38へ供給する。
 高解像(B-G)生成部37は、高解像(R-G)生成部36と同様に構成されており、R画素に代えてB画素を取り扱う。
<(B-G)コードタップの構成例>
 図19は、(B-G)コードタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
 出力画素は、図19に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、(B-G)フィルタタップとなる入力画素を表す。なお、(B-G)コードタップは、図19に示す構成例に限定されるものではなく、他の構成であってもよい。
<(B-G)フィルタタップの構成例>
 図20は、(B-G)フィルタタップの構成例を示す図である。細い線の丸印は、入力画像である入力画素を表す。ドット柄の丸印は、出力画像の入力画素に対する画素位置位相のイメージを表す。
 出力画素は、図20に示すように、入力画素から位相をシフトさせた位置に存在する。したがって、入力画像は、半画素位相シフトした出力画像に変換される。また、十字の一点差線の中心画素は、注目画素になっている入力画素を表す。さらに太線の丸印は、(B-G)フィルタタップとなる入力画素を表す。なお、(B-G)フィルタタップは、図20に示す構成例に限定されるものではなく、他の構成であってもよい。また、図20に示す(B-G)フィルタタップは、図19に示すGコードタップと異なる構成であってもよい。
 高解像(B-G)生成部37は、高解像(R-G)生成部36と同様の処理を行って、高解像G画像と同じ解像度の高解像(B-G)画像を生成する。
 加算器38は、高解像G生成部35で生成された高解像G画像と、高解像(R-G)生成部36で生成された高解像(R-G)画像と、を加算することで、高解像G画像と同じ解像度である高解像R画像を生成する。
 加算器39は、高解像G生成部35で生成された高解像G画像と、高解像(B-G)生成部37で生成された高解像(B-G)画像と、を加算することで、高解像G画像と同じ解像度である高解像B画像を生成する。
<デモザイク処理ルーチン>
 図21は、デモザイク部16によるデモザイク処理ルーチンを示すフローチャートである。
 デモザイク部16内の図2及び図3等に示す各ブロックは、ベイヤー配列の色フィルタアレイが用いられたイメージセンサ12の出力値により構成される入力画像に対してステップS21以降の処理を実行する。
 ステップS21において、図3に示す仮G生成部41は、R画素位置において、近接するG画素の画素値Gから補間された仮Gを生成する。同様に、仮想色差(B-G)生成部34は、B画素位置において、近接するG画素の画素値Gから補間された仮Gを生成する。
 ステップS22において、仮R生成部42は、G画素位置において、近接するR画素の画素値Rから補間された仮Rを生成する。同様に、仮想色差(B-G)生成部34は、G画素位置において、近接するB画素の画素値Bから補間された仮Bを生成する。
 ステップS23において、仮想色差(R-G)演算部43は、仮G生成部41で生成された仮Gと入力画像のR画素値とを用いて、仮想色差(R-仮G)を生成する。また、仮想色差(R-G)演算部43は、仮R生成部42で生成された仮Rと入力画像の画素値Gとを用いて、仮想色差(仮R-G)を生成する。
 同様に、仮想色差(B-G)生成部34は、仮Gと入力画像のB画素値とを用いて仮想色差(B-仮G)を生成し、仮Bと入力画像の画素値Gとを用いて、仮想色差(仮B-G)を生成する。
 ステップS24において、注目画素選択部31は、入力画像に対する出力画像を構成する画素のうち、まだ、注目画素として選択されていない画素の1つを注目画素として選択する。すなわち、注目画素選択部31は、例えば、出力画像を構成する画素のうち、ラスタスキャン順で、まだ、注目画素とされていない画素を注目画素として選択する。
 ステップS25において、Gコードタップ選択部61は、入力画像に対する注目画素についてのGコードタップを選択する。(R-G)コードタップ選択部71は、入力画像に対する注目画素についての(R-G)コードタップを選択する。高解像(B-G)生成部37は、入力画像に対する注目画素についての(B-G)コードタップを選択する。
 ステップS26において、Gコード演算部63は、供給されたGコードタップを符号化して符号化コードを生成する。(R-G)コード演算部73は、供給された(R-G)コードタップを符号化して符号化コードを生成する。高解像(B-G)生成部37は、(B-G)コードタップを符号化して符号化コードを生成する。
 ステップS27において、Gフィルタタップ選択部62は、入力画像に対する注目画素についてのGフィルタタップを選択する。(R-G)フィルタタップ選択部72は、入力画像に対する注目画素についての(R-G)フィルタタップを選択する。高解像(B-G)生成部37は、入力画像に対する注目画素についての(B-G)フィルタタップを選択する。
 ステップS28において、G係数記憶部64から、ステップS26で演算された符号化コードに対応づけられたタップ係数であるG係数が読み出される。(R-G)係数記憶部74から、ステップS26で演算された符号化コードに対応づけられた(R-G)係数が読み出される。また、高解像(B-G)生成部37では、ステップS26で演算された符号化コードに対応づけられた(B-G)係数が内部記憶部から読み出される。
 ステップS29において、G積和演算部65は、注目画素について積和演算を行う。具体的には、G積和演算部65は、式(11)のX,X,・・・,Xに対してステップS27で選択されたGフィルタタップの各画素値を代入し、タップ係数wに対してステップS28で読み出されたG係数を代入し、式(11)の演算を行う。同様に、(R-G)積和演算部75及び高解像(B-G)生成部37も、式(11)に従って注目画素についてフィルタ演算を行う。
 ステップS30において、G画素の生成処理であるか否かが判定され、G画素の生成処理である場合はステップS32に進み、G画素の生成処理でない場合はステップS31に進む。
 ステップS31では、加算器38は、注目画素について、ステップS29の処理でフィルタ演算された画素値Gと、同様にフィルタ演算された色差成分(R-G)と、を加算することで、高解像B画像を構成する画素値Rを生成する。また、加算器39は、注目画素について、ステップS29の処理でフィルタ演算された画素値Gと、同様にフィルタ演算された色差成分(B-G)と、を加算することで、高解像B画像を構成する画素値Rを生成する。
 ステップS32では、注目画素選択部31が、まだ注目画素として選択されていない画素があるか否かを判定する。注目画素として選択されていない画素がある場合はステップS24に戻り、その画素がない場合は本ルーチンが終了する。
 図22は、デモザイク部16の入力画素に対する生成画素を示す図である。同図に示すように、G入力画素に対してG生成画素の解像度は2倍になる。R入力画素に対してR生成画素の解像度は4倍になる。B入力画素に対してB生成画素の解像度は4倍になる。
 以上のように、デモザイク部16は、ベイヤー配列の色フィルタが配置されたイメージセンサ12の入力画像の中から、G画素の画素値のみを用いて、コード分類型適応フィルタの学習結果を利用して、高解像G画像を生成することができる。
 さらに、デモザイク部16は、入力画像の中から、R画素及びG画素の画素値を用いて、コード分類型適応フィルタの学習結果を利用して、高解像(R-G)を生成する。そして、デモザイク部16は、高解像(R-G)と高解像G画像とに基づいて高解像R画像を生成する。すなわち、デモザイク部16は、B画素の画素値を用いることなく高解像R画像を生成することができる。同様に、デモザイク部16は、R画素の画素値を用いることなく高解像B画像を生成することができる。これにより、ジッパーノイズ、偽色、色にじみ、リンギング等が大幅に低減された高解像画像が生成される。
<コード分類型適応フィルタの学習原理>
 デモザイク処理のために使用されるタップ係数は、コード分類型適応フィルタの学習処理によって、以下の手順で求められる。
 ここでは、低画質画像(第1の画像)は、高画質画像(第2の画像)をLPF(low Pass Filter)によってフィルタリングするなどして画質(解像度)を低下させたものをいう。
 コード分類型適応フィルタの学習処理では、低画質画像からフィルタタップが選択され、そのフィルタタップとタップ係数を用いて、高画質画像の画素(高画質画素)の画素値が所定の演算によって求められる。所定の演算とは、例えば線形1次予測演算である。
 この場合、高画質画素の画素値yは、式(12)に示す線形1次式によって求められる。
Figure JPOXMLDOC01-appb-M000004
 フィルタタップは、N個の低画質画像の画素(低画質画素)x、x、・・・、x、・・・、xで構成される。xは、高画質画素yについてのフィルタタップを構成するN個の低画質画素のうち、n番目の低画質画素の画素値を表す。wは、n番目の低画質画素(の画素値)xに乗算されるn番目のタップ係数を表す。
 高画質画素の画素値yは、式(12)に示した線形1次式に限らず、例えば2次以上の高次の式によっても算出可能である。
 第kサンプル(k番目)の高画質画素の画素値の真値をyと表し、式(12)によって得られるその真値yの予測値をy’と表す。このとき、予測値y’の真値yに対する予測誤差eは、式(13)で表される。
Figure JPOXMLDOC01-appb-M000005
 式(13)の予測値y’は、式(12)に従って求められる。そこで、式(13)のy’を、式(12)に従って置き換えると、次の式(14)が得られる。
Figure JPOXMLDOC01-appb-M000006
 xn,kは、第kサンプルの高画質画素yについてのフィルタタップを構成するn番目の低画質画素を表す。
 式(14)(又は式(13))の予測誤差eを0とするタップ係数wが、高画質画素yを予測するために最適なタップ係数となる。しかし、すべての高画質画素yについて、そのようなタップ係数wを求めることは、一般的には困難である。
 そこで、タップ係数wが最適な値であることを表す規範として、例えば、最小自乗法を採用する。この場合、最適なタップ係数wは、次の式(15)で表される自乗誤差の総和Eが最小になるときの係数である。
Figure JPOXMLDOC01-appb-M000007
 Kは、高画質画素yと、その高画質画素yについてのフィルタタップを構成する低画質画素x1,k、x2,k、・・・、xn,kとのセットのサンプル数(学習用のサンプルの数)を表す。
 式(15)の自乗誤差の総和Eの最小値(極小値)は、式(16)に示すように、総和Eをタップ係数wで編微分した結果を0とするwによって与えられる。
Figure JPOXMLDOC01-appb-M000008
 そこで、前述の式(14)をタップ係数wで編微分すると、次の式(17)が得られる。
Figure JPOXMLDOC01-appb-M000009
 式(16)と式(17)から、式(18)が得られる。
Figure JPOXMLDOC01-appb-M000010
 式(18)のeに式(14)を代入すると、式(18)は次の式(19)に示す正規方程式で表される。
Figure JPOXMLDOC01-appb-M000011
 式(19)の正規方程式は、例えば、掃き出し法(Gauss-Jordanの消去法)などを用いることにより、タップ係数wについて解くことができる。
 式(19)の正規方程式をコード毎にたてて解くことにより、最適なタップ係数(自乗誤差の総和Eを最小にするタップ係数)wが、コード毎に求められる。このようにして求められたタップ係数wが、例えばG係数としてG係数記憶部64に記憶される。タップ係数は、例えば図23に示す学習装置100によって求められる。
<学習装置100の構成>
 図23は、学習装置100の構成例を示すブロック図である。学習装置100は、教師画像及び生徒画像を用いて学習することにより、高解像G画像、高解像(R-G)画像、高解像(B-G)画像をそれぞれ生成するために使用されるG係数、(R-G)係数、及び(B-G)係数を生成する。
 学習装置100は、生徒画像生成部101、教師画像生成部102、注目画素選択部103、遅延部104、仮想色差(R-G)生成部105、仮想色差(B-G)生成部106、G係数データ生成部107、(R-G)係数データ生成部108、(B-G)係数データ生成部109を備えている。
 学習装置100に入力される高解像度画像は、例えば、R成分、G成分及びB成分のそれぞれに対応する3つのイメージセンサからそれぞれ生成されたRGB各成分の高解像画像RGBである。
 図24は、高解像度画像から生成される生徒画像及び教師画像を説明するための図である。
 生徒画像生成部101は、学習装置100に入力される高解像度画像RGBをそれぞれダウンコンバートする。ここで、ダウンコンバートのフィルタ特性は、例えば、4画素平均処理、LPF処理等でよい。その後、生徒画像生成部102は、ダウンコンバートされた画像RGBから、ベイヤー配列に従ってRGBが配置された生徒画像を生成する。すなわち、生徒画像は、ベイヤー配列の色フィルタアレイが配置されたイメージセンサ12からそのまま出力された画像に対応する。
 教師画像生成部102は、学習装置100に入力される高解像度画像RGBをそれぞれダウンコンバートして、ダウンコンバート済みの画像RGBを半画素シフトすることで、RGB各成分の教師画像RGBを生成する。なお、ダウンコンバートのフィルタ特性は、生徒画像生成部101と同様である。
 注目画素選択部103は、教師画像生成部102で生成された教師画像の中の任意の1画素を注目画素として選択する。注目画素選択部103は、注目画素として選択した画素の座標値などの情報を、仮想色差(R-G)生成部105,G係数データ生成部107、(R-G)係数データ生成部108等の各ブロックに供給する。
 仮想色差(R-G)生成部105は、図2に示す仮想色差(R-G)生成部33と同様に構成され、同様の処理を行う。すなわち、仮想色差(R-G)生成部105は、生徒画像生成部101で生成された生徒画像のR成分及び成分Gを用いて、R画素位置及びG画素位置における色差(R-G)である仮想色差(R-G)を生成する。
 仮想色差(B-G)生成部106は、図2に示す仮想色差(B-G)生成部34と同様に構成され、同様の処理を行う。すなわち、仮想色差(B-G)生成部106は、生徒画像生成部101で生成された生徒画像の成分B及び成分Gを用いて、B画素位置及びG画素位置における色差(B-G)である仮想色差(B-G)を生成する。
 遅延部104は、仮想色差(R-G)生成部105及び仮想色差(B-G)生成部106の各出力タイミングに合うように、生徒画像生成部101で生成された生徒画像を遅延させてG係数データ生成部107に供給する。
<G係数データ生成部107の構成例>
 図25は、G係数データ生成部107の構成例を示す図である。
 G係数データ生成部107は、Gコードタップ選択部111、Gフィルタタップ選択部112、Gコード演算部113、G正規方程式加算部114、及びG係数データ演算部115を備える。
 Gコードタップ選択部111、Gフィルタタップ選択部112、及びGコード演算部113は、図11に示すGコードタップ選択部61、Gフィルタタップ選択部62、及びGコード演算部63と同様に構成され、同様の処理を行う。
 G正規方程式加算部114は、Gコード演算部113から供給されるコード毎に、教師画像生成部102で生成された教師画像Gの注目画素(教師データ)yと、Gフィルタタップ選択部112で選択された注目画素についてのGフィルタタップ(生徒データ(画素))xn,kとを対象とした足し込みを行う。
 そして、G正規方程式加算部114は、Gコード演算部113から供給されるコード毎に、フィルタタップ(生徒データ)xn,kを用い、式(19)の左辺の行列における生徒データどうしの乗算(xn,kn‘,k)と、サメーション(Σ)に相当する演算を行う。
 さらに、G正規方程式加算部114は、Gコード演算部113から供給されるコード毎に、Gフィルタタップ(生徒データ)xn,kと教師データyとを用い、式(19)の右辺のベクトルにおける生徒データxn,kと教師データyの乗算(xn,k)と、サメーション(Σ)に相当する演算を行う。
 すなわち、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)のサメーションで表される加算)。
 そして、G正規方程式加算部114は、入力された高解像度画像の教師データすべてを注目画素として、前述の足し込みを行うことにより、各コードについて、式(19)に示した正規方程式をたてる。G正規方程式加算部114は、各コードの正規方程式を、G係数データ演算部115に供給する。
 G係数データ演算部115は、G正規方程式加算部114から供給される各コードについての正規方程式を解くことにより、各コードについて、最適なタップ係数wを演算する。そして、G係数データ演算部115は、注目画素が設定された教師画像の種類(G成分の画像)に応じて、得られたタップ係数wを、フィルタ演算を行うために必要となるG係数として出力する。このようにして、得られたコード毎のG係数が、図11に示すG係数記憶部64に記憶される。
<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を備える。
 (R-G)コードタップ選択部121、(R-G)フィルタタップ選択部122、及び(R-G)コード演算部124は、図16に示す(R-G)コードタップ選択部71、(R-G)フィルタタップ選択部72、及び(R-G)コード演算部33と同様に構成され、同様の処理を行う。
 (R-G)生成部123は、ベイヤー配列のRGB色フィルタアレイのR画素位置及びG画素位置において、教師画像生成部102で生成されたR成分及びG成分の各教師画像RGの差分を演算することで、仮想色差ではなく実色差である(R-G)成分を生成する。(R-G)生成部123は、生成した(R-G)成分を教師データとして、(R-G)正規方程式加算部125へ供給する。
 (R-G)正規方程式加算部125は、(R-G)コード演算部114から供給されるコード毎に、(R-G)生成部123で生成された注目画素の色差成分(R-G)(教師データ)yと、(R-G)フィルタタップ選択部122で選択された注目画素についての(R-G)フィルタタップ(生徒データ(画素))xn,kとを対象とした足し込みを行う。
 すなわち、(R-G)正規方程式加算部125は、教師データとして教師画像のG成分の代わりに(R-G)成分を用いる点を除き、G正規方程式加算部114と同様の処理を行い、各(R-G)コードについて、式(19)に示した正規方程式をたてる。そして、(R-G)正規方程式加算部125は、各(R-G)コードの正規方程式を、(R-G)係数データ演算部126に供給する。
 (R-G)係数データ演算部126は、G係数データ演算部115と同様の処理を行って、(R-G)係数データを生成する。
<学習装置による学習処理ルーチン>
 図27は、図21の学習装置100による学習処理ルーチンを説明するフローチャートである。学習装置100は、3つのイメージセンサからそれぞれ生成されたRGB各成分の高解像画像RGBが入力されると、ステップS31以降の処理を実行する。
 ステップS31において、図23に示す生徒画像生成部102は、入力された高解像度画像RGBから、例えば、LPFのシミュレーションモデルを用いるなどして、高解像度画像をダウンコンバートして、ベイヤー配列に従ってRGBが配置された生徒画像(生徒データ)を生成する。
 ステップS32において、教師画像生成部103は、入力された高解像度画像RGBを、生徒画像と同様にしてダウンコンバートすると共に、生徒画像に対し半画素位相をシフトした教師画像(教師データ)を生成する。
 ステップ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)を生成する。
 また、仮想色差(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)を生成する。
 ステップS34において、注目画素選択部103は、教師画像生成部102で生成された教師画像を構成する画素の中の未選択の任意の1画素を注目画素として選択する。すなわち、注目画素選択部101は、教師画像を構成する画素のうち、ラスタスキャン順で、まだ注目画素とされていない画素を注目画素として選択する。
 ステップS35において、図25に示すGコードタップ選択部111及び(R-G)コードタップ選択部116は、供給される生徒画像から、注目画素についてのGコードタップ及び(R-G)コードタップをそれぞれ選択する。また、図23に示す(R-G)データ生成部109は、生徒画像から注目画素についての(B-G)コードタップを選択する。
 ステップS36において、Gコード演算部113は、供給されたGコードタップを符号化して符号化コードを生成する。(R-G)コード演算部124は、供給された(R-G)コードタップを符号化して符号化コードを生成する。図23に示す(B-G)係数データ生成部109は、(B-G)コードタップを符号化して符号化コードを生成する。
 ステップS37において、Gフィルタタップ選択部112及び(R-G)フィルタタップ選択部122は、それぞれの生徒画像から注目画素についてのGフィルタタップ及び(R-G)フィルタタップを選択する。また、(B-G)係数データ生成部109は、生徒画像から注目画素についての(B-G)フィルタタップを選択する。
 ステップ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も同様に正規化方程式を生成する。
 ステップS39において、注目画素選択部103は、次の注目画素があるか否かを判定する。肯定判定の場合、すなわち次の注目画素がある場合は、ステップS34に戻り、ステップS34以降の処理が繰り返し実行される。否定判定の場合、ステップS40に進む。
 ステップS40において、G係数データ演算部115は、G係数データを生成する。具体的には、G係数データ演算部115は、式(19)の正規方程式に対して、例えば掃き出し法(Gauss-Jordanの消去法)を用いることによりタップ係数wを演算する。
 G係数データ演算部115は、注目画素が設定された教師画像の種類(G成分の画像)に応じて、得られたタップ係数wを、G出力画像の予測演算を行うために必要となるG係数として出力する。
 同様に、(R-G)係数データ演算部126は、(R-G)係数データを演算し、(B-G)係数データ生成部109は、(B-G)係数データを演算する。
 このようにして、得られた符号化コード毎のG係数、(R-G)係数、および(B-G)係数は、高解像G生成部35、高解像(R-G)生成部36、高解像(B-G)生成部37にそれぞれ記憶される。
 本発明は、上述した実施形態に限定されるものではなく、特許請求の範囲に記載された事項の範囲内で設計変更されたものにも適用可能である。
 例えば、図1又は図2に示すデモザイク部16は、半導体集積回路や、上述した各ステップを実行するためのプログラムがインストールされたコンピュータ等によって実現可能である。また、このプログラムは、光ディスク、ハードディスク等の記録媒体からコンピュータにインストールされたものでもよいし、有線又は無線通信手段を経由して、外部からコンピュータに伝送されたものでもよい。
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 学習装置
 
 

 

Claims (9)

  1.  複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第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の学習処理により算出されたタップ係数である
     画像処理装置。
  2.  前記第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に記載の画像処理装置。
  3.  前記第2のタップ係数は、
     前記所定の被写体について、色成分、前記色成分の配列、及びサイズのそれぞれが前記第1の画像と同一である画像から、前記第1及び前記第2の各色成分の差分として得られた色差画像である第2の生徒画像と、
     前記所定の被写体について、前記第1の画像と同一サイズの前記第1の色成分の画像と前記同一サイズの前記第2の色成分の画像との差分として得られた色差画像であって、前記第1の生徒画像に対して水平方向及び垂直方向に半画素シフトした前記色差画像である第2の教師画像と、
     を用いた前記第2の学習処理であって、前記第2の生徒画像の各画素と前記第2の教師画像の各画素のマッピングされた正規方程式を解く前記第2の学習処理により算出されたタップ係数である
     請求項2に記載の画像処理装置。
  4.  前記色差成分生成部、前記第2のコードタップ選択部、前記第2のコード演算部、前記第2の係数記憶部、前記第2のフィルタタップ選択部、前記第2の画像生成部、及び前記演算部は、前記第1の画像において前記第1の色成分と異なる第2の色成分が複数存在する場合には、それぞれの第2の色成分毎に設けられる
     請求項2に記載の画像処理装置。
  5.  前記色差成分生成部は、
       前記第2の色成分の各画素の画素位置において、当該画素位置に近接する第1の色成分の各画素の画素値から補間することで、前記第1の色成分の補間画素値を演算する第1の補間画素値演算部と、
       前記第1の色成分の各画素の画素位置において、当該画素位置に近接する第2の色成分の各画素の画素値から補間することで、前記第2の色成分の補間画素値を演算する第2の補間画素値演算部と、
    前記第2の色成分の各画素の画素位置においては、当該画素位置における第1の色成分の補間画素値と、当該画素位置における第2の色成分の画素値と、の差分を演算することで前記色差成分を生成し、前記第1の色成分の各画素の画素位置においては、当該画素位置における第1の色成分の画素値と、当該画素位置における第2の色成分の補間画素値と、の差分を演算することで前記色差成分を生成する差分演算部と、
     を備えた請求項2に記載の画像処理装置。
  6.  第1の補間画素値演算部は、前記第2の色成分の各画素の画素位置において、当該画素位置の水平方向及び垂直方向にそれぞれ近接する前記第1の色成分の複数の画素がある場合、水平方向における第1の色成分の各画素の画素値から水平補間値を演算し、垂直方向における第1の色成分の各画素の画素値から垂直補間値を演算し、前記水平補間値及び前記垂直補間値のそれぞれの分散に基づいて、前記水平補間値及び前記垂直補間値の重み付け平均値を演算することで、前記第2の色成分の補間値を演算する
     請求項5に記載の画像処理装置。
  7.  複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第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の学習処理により算出されたタップ係数である
     画像処理方法。
  8.  コンピュータを、
     複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子から出力された第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の学習処理により算出されたタップ係数である
     前記記録媒体。
  9.  複数の色成分のそれぞれに対応する画素が所定の配列で構成された撮像素子と、
     前記撮像素子から出力された第1の画像に対して画像処理を行う請求項1に記載の画像処理装置と、
     を備えた撮像装置。
     
     
     

     
PCT/JP2018/041564 2018-03-10 2018-11-08 画像処理装置、画像処理方法、記録媒体及び撮像装置 WO2019176161A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-043672 2018-03-10
JP2018043672A JP6435560B1 (ja) 2018-03-10 2018-03-10 画像処理装置、画像処理方法、プログラム及び撮像装置

Publications (1)

Publication Number Publication Date
WO2019176161A1 true WO2019176161A1 (ja) 2019-09-19

Family

ID=64655830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/041564 WO2019176161A1 (ja) 2018-03-10 2018-11-08 画像処理装置、画像処理方法、記録媒体及び撮像装置

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532970A (zh) * 2020-10-26 2021-03-19 奥比中光科技集团股份有限公司 一种多抽头像素传感器的抽头非一致性校正方法、装置及tof相机

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014200033A (ja) * 2013-03-29 2014-10-23 ソニー株式会社 画像処理装置および方法、並びにプログラム
JP2015154308A (ja) * 2014-02-17 2015-08-24 ソニー株式会社 画像処理装置、画像処理方法、およびプログラム
JP6164564B1 (ja) * 2016-03-14 2017-07-19 リアロップ株式会社 画像処理装置、画像処理方法、記録媒体、プログラム及び撮像装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014200033A (ja) * 2013-03-29 2014-10-23 ソニー株式会社 画像処理装置および方法、並びにプログラム
JP2015154308A (ja) * 2014-02-17 2015-08-24 ソニー株式会社 画像処理装置、画像処理方法、およびプログラム
JP6164564B1 (ja) * 2016-03-14 2017-07-19 リアロップ株式会社 画像処理装置、画像処理方法、記録媒体、プログラム及び撮像装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532970A (zh) * 2020-10-26 2021-03-19 奥比中光科技集团股份有限公司 一种多抽头像素传感器的抽头非一致性校正方法、装置及tof相机
CN112532970B (zh) * 2020-10-26 2022-03-04 奥比中光科技集团股份有限公司 一种多抽头像素传感器的抽头非一致性校正方法、装置及tof相机

Also Published As

Publication number Publication date
JP2019161376A (ja) 2019-09-19
JP6435560B1 (ja) 2018-12-12

Similar Documents

Publication Publication Date Title
JP6758859B2 (ja) 撮像装置、撮像システム、および画像処理方法
JP4520886B2 (ja) カラー画像のデモザイク処理を行うための高品質グラディエント補正線形補間
JP4983093B2 (ja) 撮像装置および方法
JP6164564B1 (ja) 画像処理装置、画像処理方法、記録媒体、プログラム及び撮像装置
JP5306563B2 (ja) 撮像装置及び画像生成方法
JP4946581B2 (ja) 画像処理装置
JP2014194706A (ja) 画像処理装置、画像処理方法、及び、プログラム
US7868925B2 (en) Device, method, and program for generating high-resolution image data at a low data transfer rate
KR20070074467A (ko) 표시 장치 및 표시 방법, 학습 장치 및 학습 방법과프로그램
JP2013162347A (ja) 画像処理装置、画像処理方法、プログラム、および装置
JP2014200008A (ja) 画像処理装置および方法、並びにプログラム
JP6276580B2 (ja) 画素補間処理装置、撮像装置、プログラムおよび集積回路
JP2013009293A (ja) 画像処理装置、画像処理方法、プログラム、および記録媒体、並びに学習装置
US20140293088A1 (en) Image processing apparatus and method, and program
JP6435560B1 (ja) 画像処理装置、画像処理方法、プログラム及び撮像装置
JP2004519156A (ja) 画像検知器の出力信号用の輪郭フィルタ
JP2014200000A (ja) 画像処理装置および方法、並びにプログラム
JP4298446B2 (ja) 画像処理装置
WO2014156732A1 (ja) 画像処理装置および方法、並びにプログラム
JP4085396B2 (ja) 学習装置及び学習方法
JP3946913B2 (ja) 信号生成方法および装置並びに記録媒体
JP4433546B2 (ja) 画像信号処理装置、画像信号処理方法、学習装置、学習方法及び記録媒体
JP4305744B2 (ja) 信号処理装置および信号処理方法、プログラム、並びに記録媒体
JP5007728B2 (ja) 信号処理装置および信号処理方法、プログラム、並びに記録媒体
JP5007729B2 (ja) 信号処理装置および信号処理方法、プログラム、並びに記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18909351

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18909351

Country of ref document: EP

Kind code of ref document: A1