# Patent

## Title
Image processing device

## Abstract

An image processing device includes: a first smoothing unit calculating, regarding multiple positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein pixel values have been smoothed along a second direction differing from the first, for a first channel; a second smoothing unit calculating, regarding multiple positions along the first direction in the neighbor region, a first-stage smoothing value wherein pixel values have been smoothed along the second direction, for a second channel; an intensity estimating unit estimating the intensity of the first-stage smoothing value of the second channel, based on the first-stage smoothing values of the first and second channels; and a third smoothing unit calculating a second-stage smoothing value for the second channel, the first-stage smoothing value of the second channel intensity-estimated by the intensity estimating unit having been smoothed along the first direction.

## Background
CROSS REFERENCES TO RELATED APPLICATIONS
The present invention contains subject matter related to Japanese Patent Application JP 2007-098997 filed in the Japanese Patent Office on Apr. 5, 2007, the entire contents of which are incorporated herein by reference.
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to an image processing device, and particularly to an image processing device for performing demosaicing processing of a mosaic image, and to a processing method thereof and a program for causing a computer to execute the same.
2. Description of the Related Art
Solid-state imaging devices such as CCD Charge Coupled Device) image sensors and CMOS (Complementary Metal Oxide Semiconductor) image sensors are normally configured with photoreceptors arrayed in a grid, with electric charges occurring due to photoelectric conversion at each photoreceptor being sequentially read out. Since a normal photoreceptor has a singular spectral property, the color of image signals acquired from a solid-state imaging device is that of one channel (i.e., monochromatic). To obtain color images (e.g., tri-channel images such as RGB) with a single solid-state imaging device, a solid-state imaging device is employed which has filters with differing spectral properties (colors) for each photoreceptor. An imaging apparatus using one such color solid-state imaging device is often called a single-sensor apparatus or single-chip apparatus. Since a single-channel image is obtained from the color solid-state imaging device, each pixel only acquires color of the filter of the corresponding photoreceptor, and consequently, an image which is mosaic-like image with regard to color is obtained. Due to this reason, an output image of such a color solid-state imaging device is called a mosaic image.
In order to obtain a multi-channel image from a color imaging device, there is the need to interpolate between the color information of each pixel of the mosaic image according to the surrounding pixel positions, using appropriate image processing. Such image processing is generally called demosaicing processing, color interpolation processing, synchronization, and so forth.
As can be understood from the above description, demosaicing processing is indispensable for single-sensor color imaging apparatuses using a color solid-state imaging device, and various techniques have been developed over the years.
An issue in demosaicing processing is that the sampling frequency and phase of each color of the color filter is different, affecting the image quality in many ways. With the primary-color Bayer array (hereafter, referred to simply as “Bayer array”) which is the most commonly-used color array today, color filters of the three primaries of R (Red), G (Green), and B (Blue) are used, with G being arrayed in a checkerboard pattern and R and B in line-sequence. With a Bayer array, G signals are present in all phases, both horizontal and vertical, but R and B are in line-sequence and accordingly signals corresponding to these only exist every other line in the horizontal or vertical direction. That is to say, the sampling frequency of R and B is half of the sampling frequency of G, so the limit of reproducible image signal frequency is also 1⁄2 for R and B as compared with G.
Accordingly, in the event that high-frequency components are present in the image signals, a phenomenon can occur wherein the G component of the high-frequency components can be correctly reconstructed but deterioration in amplitude and aliasing occur in the R component and B component, observed as offset in color balance in the output image. This phenomenon is known as false color (color moiré). Moreover, while the sampling frequencies of R and B are the same, the sampling phases differ. Accordingly, the color offset due to aliasing differ between R and G on the image, even further intensifying the false color phenomenon of R and B.
Various attempts have been made in the related art of mosaic processing to reduce this false color phenomenon which deteriorates the image quality of output images. A technique has been proposed wherein the estimation value of R intensity at the position of a pixel of interest by an expression

R=G·(M—R/M—G)

using approximate ratio of M_R (the average value of R) to of M_G (the average value of G), for example (see Japanese Unexamined Patent Application Publication No. 60-58398 (FIG. 1)). This attempts to improve frequency proprieties by using the G sampling information for reconstructing R, as compared with reconstructing R signals with simple R samples alone.

SUMMARY OF THE INVENTION
However, this related art is problematic in that resolution deteriorates at the time of calculating low-frequency components near the Nyquist frequency, resulting in false color.
There has been recognized the need for demosaicing processing in which multiple channels of a mosaic output image from a single-sensor solid-state color imaging device are synchronized, wherein occurrence of false color can be reduced in images having high-frequency components such as black and white lines repeated in increments of single pixels.
According to an embodiment of the present invention, an image processing device includes: a first smoothing unit configured to calculate, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from the first direction, for a first channel; a second smoothing unit configured to calculate, regarding a plurality of positions along the first direction in the neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along the second direction, for a second channel; an intensity estimating unit configured to estimate the intensity of the first-stage smoothing value of the second channel, based on the first-stage smoothing values of the first and second channels; and a third smoothing unit configured to calculate a second-stage smoothing value for the second channel, wherein the first-stage smoothing value of the second channel subjected to intensity estimating by the intensity estimating unit has been smoothed along the first direction. This acts so that the intensity of the first-stage smoothing value of the second channel is estimated, based on the first-stage smoothing value of the first channel (e.g., G) and second channel (e.g., R and B).
Also, the intensity estimating unit may include: a high-frequency component calculating unit configured to calculate, regarding each position along the first direction, a high-frequency component of the first-stage smoothing value of the first channel, at the position; a low-frequency component calculating unit configured to calculate, regarding each position along the first direction, a low-frequency component of the first-stage smoothing value of the second channel, at the position; and a correction value calculating unit configured to calculate a correction value for the second channel at the position, from the high-frequency component of the first-stage smoothing value of the first channel at each position along the first direction, and the low-frequency component of the first-stage smoothing value of the second channel at the position. This acts to correct the first-stage smoothing value of the second channel from the high-frequency component of the first-stage smoothing value of the first channel and the low-frequency component of the first-stage smoothing value of the second channel.
Also, the intensity estimating unit may include: a high-frequency component calculating unit configured to calculate, regarding each position along the first direction, a high-frequency component of the first-stage smoothing value of the first channel, at the position; a first low-frequency component calculating unit configured to calculate, regarding each position along the first direction, a low-frequency component of the first-stage smoothing value of the second channel, at the position; a second low-frequency component calculating unit configured to calculate, regarding each position along the first direction, a low-frequency component of the first-stage smoothing value of the first channel, at the position; a high-frequency estimating unit configured to estimate the high-frequency component in the first-stage smoothing value of the second channel at the position, by adjusting the high-frequency component in the first-stage smoothing value of the first channel, based on the ratio between the low-frequency component in the first-stage smoothing value of the first channel at each position along the first direction and the low-frequency component in the first-stage smoothing value of the second channel; and a correction value calculating unit configured to calculate a correction value for the second channel at the position, from the low-frequency component of the first-stage smoothing value of the second channel at each position along the first direction, and the estimated high-frequency component of the first-stage smoothing value of the second channel at the position. This acts to correct the first-stage smoothing value of the second channel from the low-frequency component of the first-stage smoothing value of the second channel and the high-frequency component of the first-stage smoothing value of the second channel that has been estimated.
Also, the image processing device may further include a fourth smoothing unit configured to calculate a second-stage smoothing value of the first channel, wherein the first-stage smoothing value of the first channel has been smoothed along the first direction. This acts to further calculate the second channel smoothing value of the first channel. Also, in this case, the image processing device may further include a second intensity estimating unit configured to estimate the intensity of the first channel at the position of the pixel of interest; and a synthesizing unit configured to synthesize the intensity of the second channel at the position of the pixel of interest, from the intensity of the first channel, the second-stage smoothing value of the first channel, and the second-stage smoothing value of the second channel. This acts to generate an interpolation value for the second channel.
Also, according to an embodiment of the present invention, an image processing device includes: an interpolation unit configured to generate interpolation values, regarding a plurality of directions in a neighbor region of a predetermined pixel of interest in an input image taken as interpolation directions, along each of the interpolation directions; a direction determining unit configured to determine the direction of texture of the neighbor region; and a synthesizing unit configured to synthesize interpolation values along each of the interpolation directions, based on determination results of the texture direction; the interpolation unit including, for each of the plurality of directions, a first smoothing unit configured to calculate, regarding a plurality of positions along a reference direction differing from the interpolation direction in the neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along the interpolation direction, for a first channel; second smoothing unit configured to calculate, regarding a plurality of positions along the reference direction in the neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along the interpolation direction, for a second channel; an intensity estimating unit configured to estimate the intensity of the first-stage smoothing value of the second channel, based on the first-stage smoothing values of the first and second channels; and a third smoothing unit configured to calculate a second-stage smoothing value for the second channel, wherein the first-stage smoothing value of the second channel subjected to intensity estimating by the intensity estimating unit has been smoothed along the reference direction. This acts to suppress false color by estimating the intensity of the first-stage smoothing value based on the first-stage smoothing values of the first channel and second channel. Also, in this case, the plurality of directions may be a combination of two or more of the horizontal direction, vertical direction, lower-left-to-upper-right direction, and upper-left-to-lower-right direction.
Also, according to an embodiment of the present invention, an image processing device includes: an imaging unit configured to image a subject and generate an input image; a first smoothing unit configured to calculate, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from the first direction, for a first channel; a second smoothing unit configured to calculate, regarding a plurality of positions along the first direction in the neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along the second direction, for a second channel; an intensity estimating unit configured to estimate the intensity of the first-stage smoothing value of the second channel, based on the first-stage smoothing values of the first and second channels; and a third smoothing unit configured to calculate a second-stage smoothing value for the second channel, wherein the first-stage smoothing value of the second channel subjected to intensity estimating by the intensity estimating unit has been smoothed along the first direction. This acts to estimate the intensity of the first-stage smoothing value of the second channel based on the first-stage smoothing value of the first channel and second channel of the imaged image.
Also, the imaging unit may be an image sensor with a primary-color Bayer array color filter disposed on the front face, or the imaging unit may be an image sensor with a color filter disposed on the front face; the color filter having pixels corresponding to a particular color disposed in a checkerboard pattern, with at least three remaining colors disposed in the remaining pixel positions. The particular color may be a filter color having spectral sensitivity close to that of the human visibility curve. Also, of the at least three colors, a first color may be disposed in a square-grid pattern of every other pixel in the horizontal direction and vertical direction at pixel positions other than the particular color, with second and third colors being disposed in a diagonal grid every other pixel in the diagonal direction at remaining pixel positions. In this case, for the first color may be employed a filter color having spectral properties with sensitivity at the long-wavelength side as compared with the particular color; and for at least one of the second and third colors may be employed a filter color having spectral properties with sensitivity at the short-wavelength side as compared with the particular color. Also, the particular color may be a filter color having spectral sensitivity to infrared rays as well.
Also, according to an embodiment of the present invention, an image processing device method includes the steps of: calculating of, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from the first direction, for a first channel; calculating of, regarding a plurality of positions along the first direction in the neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along the second direction, for a second channel; estimating the intensity of the first-stage smoothing value of the second channel, based on the first-stage smoothing values of the first and second channels; and calculating of a second-stage smoothing value for the second channel, wherein the first-stage smoothing value of the second channel subjected to intensity estimating has been smoothed along the first direction. Also provided is a program for causing a computer to execute these procedures. This acts so that the intensity of the first-stage smoothing value of the second channel is estimated, based on the first-stage smoothing value of the first channel and second channel.
According to embodiments of the present invention, excellent advantages can be had in that occurrence of false color can be reduced in images including high-frequency components as well.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a diagram illustrating an example of an imaging apparatus according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an example of processing functions of an image processing circuit 23 according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a Bayer array as an example of a color filter disposed to the front face of an imaging device according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a functional configuration example of a demosaicing processing unit 232 according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a functional configuration example of a horizontal direction interpolation processing unit 210 according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the processing of the horizontal direction interpolation processing unit 210 according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a functional configuration example of an intensity estimating unit 2140 according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating another functional configuration example of the intensity estimating unit 2140 according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a functional configuration example of a horizontal direction interpolation processing unit 310 according to an embodiment of the present invention;
FIGS. 10A and 10B are diagrams illustrating an example of an interpolation filter used with an embodiment of the present invention;
FIG. 11 is a diagram illustrating another functional configuration example of the horizontal direction interpolation processing unit 310 according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating a functional configuration example of a chroma signal alias intensity calculating unit 330 according to an embodiment of the present invention;
FIG. 13 is a diagram illustrating another functional configuration example of a demosaicing processing unit 232 according to an embodiment of the present invention;
FIG. 14 is a diagram illustrating a configuration example of the horizontal direction interpolation processing unit 210 shown in FIG. 13;
FIG. 15 is a diagram illustrating a processing procedure example of an image processing circuit 23 according to an embodiment of the present invention;
FIG. 16 is a diagram illustrating a processing procedure example of the demosaicing processing by the demosaicing processing unit 232 according to an embodiment of the present invention;
FIG. 17 is a diagram illustrating a processing procedure example of interpolation processing with a direction interpolation unit 200 according to an embodiment of the present invention;
FIG. 18 is a diagram illustrating a processing procedure example of texture direction determination processing with a direction determination unit 300 according to an embodiment of the present invention;
FIG. 19 is a diagram illustrating a processing procedure example of unidirectional interpolation processing with the horizontal direction interpolation processing unit 310 and a vertical direction interpolation processing unit 320 according to an embodiment of the present invention;
FIG. 20 is a diagram illustrating a processing procedure example of chroma signal alias intensity calculation processing with chroma signal alias intensity calculating units 330 and 340 according to an embodiment of the present invention; and
FIGS. 21A and 21B are diagrams illustrating an example of another color filter disposed to the front face of an imaging device according to an embodiment of the present invention.



DESCRIPTION OF THE PREFERRED EMBODIMENTS
Embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram illustrating an example of an imaging apparatus according to an embodiment of the present invention. The imaging apparatus is generally configured of an optical system, signal processing system, recording system, display system, and control system.
The optical system is configured of a lens 11 for converging a light image of a subject, an aperture 12 for adjusting the quantity of light of the light image, and an imaging device 13 for converting the converged light image into electrical signals by photoelectrical conversion. The imaging device 13 is realized by way of, for example, a CCD image sensor, CMOS image sensor, or the like.
The signal processing system is configured of a sampling circuit 21 for sampling electrical signals from the imaging device 13, an A/D conversion circuit 22 for converting analog signal supplied from the sampling circuit 21 into digital signals, and an image processing circuit 23 for subjecting the digital signals input from the A/D conversion circuit 22 to predetermined image processing. The sampling circuit 21 is realized by a CDS (Correlated Double Sampling) circuit, for example. Thus, noise occurring at the imaging device 13 is alleviated. Also, the image processing circuit 23 is realized by a DSP (Digital Signal Processor), for example. Details of processing executed by the image processing circuit 23 will be described later.
The recording system is configured of memory 32 for recording image signals, and a codec 31 for encoding image signals processed by the image processing circuit 23 and recording these in the memory 32, and also reading out image signals from the memory 32 and decoding these to be supplied to the image processing circuit 23. The memory 32 may be a magnetic disk, optical disc, magneto-optical disk, semiconductor memory, or the like.
The display system is configured of a display driver 41 for outputting image signals processed at the image processing circuit 23 to a display unit 42, and a display unit 42 for displaying images corresponding to input image signals. The display unit 42 is realized by an LCD (Liquid Crystal Display) or the like for example, and also functions as a viewfinder.
The control system is configured of a timing generator 51 for controlling the operating timing of the imaging device 13, sampling circuit 21, A/D conversion circuit 22, and image processing circuit 23, an operation input reception unit 52 for receiving shutter operations and other command input form the user, a driver 53 for connecting to peripheral devices, and a control unit 54 for controlling the overall imaging apparatus. Connected to the driver 53 is a magnetic disk, optical disc, magneto-optical disk, semiconductor memory, or the like. The control unit 54 reads out a control program stored in these via the driver 53, and executes control based on the control program that has been read out and commands and the like from the user input from the operation input reception unit 52, and so forth. The image processing circuit 23, codec 31, memory 32, display device 41, timing generator 51, operation input reception unit 52, and control unit 54 are mutually connected by way of a bus 59.
With this imaging apparatus, a light image of a subject (incident light) is input to the imaging device 13 via the lens 11 and aperture 12, and is subjected to photoelectric conversion into electrical signals by the imaging device 13. The obtained electrical signals are subjected to removal of noise component by the sampling circuit 21, a d digitized by the A/D conversion circuit 22, and then temporarily stored in image memory (not shown) built into the image processing circuit 23.
Note that in a normal state, the image memory built into the image processing circuit 23 constantly has image signals overwritten at a constant frame rate, by control performed by the timing generator 51 on the signal processing system. Image signals in the image memory built into the image processing circuit 23 are output to the display unit 42 via the display driver 41, and a corresponding image is displayed on the display unit 42.
The display unit 42 also serves as the viewfinder of the imaging apparatus. In the event that the user presses a shutter button included in the operation input reception unit 52, the control unit 54 controls the timing generator 51 to holds image signals immediately following the shutter button being pressed, i.e., controls the signal processing system such that the such that image signals are not overwritten on the image memory of the image processing circuit 23. The image data held in the image memory of the image processing circuit 23 is encoded by the codec 31 and recorded in the memory 32. Thus, acquisition of one picture of image data is completed, by these operations of the imaging apparatus.
FIG. 2 is a diagram illustrating an example of the processing functions of the image processing circuit 23 according to an embodiment of the present invention. The image processing circuit 23 includes a white balance processing unit 231, a demosaic processing unit 232, a matrix processing unit 233, a gamma correction unit 234, and a YC conversion unit 235. This image processing circuit 23 is for taking a mosaic image M digitized by the A/D conversion circuit 22 as an input image, and performing image processing. A mosaic image stores intensity signals corresponding to one of the colors R, G, B for pixels, with the color array thereof being a Bayer array such as shown in FIG. 3.
The white balance processing unit 231 subjects the mosaic image M to white balance processing. The white balance processing unit 231 applies appropriate coefficients according to the colors of the pixel intensities of the mosaic image M, such that the color balance of an achromatic subject region is achromatic. A mosaic image MW subjected to white balance processing is supplied to the demosaic processing unit 232.
The demosaic processing unit 232 performs interpolation processing (demosaicing processing) such that the intensities of all channels of R, G, and B, are present at all pixel positions of the mosaic image MW. A demosaiced image [R, G, B]T which has been subjected to this interpolation processing is supplied to the matrix processing unit 233. Note that a matrix AT means a transposed matrix of a matrix A.
The matrix processing unit 233 applies a 3-by-3 linear matrix with coefficients set beforehand to each of the pixels [R, G, B]T output from the demosaic processing unit 232, and performs conversion into a three-primary-color intensity value [Rm, Gm, Bm]T. A linear matrix is conversion coefficients for color reproduction closer to human perception. The intensity value [Rm, Gm, Bm]T following conversion is supplied to the gamma correction unit 234.
The gamma correction unit 234 subjects the intensity value [Rm, Gm, Bm]T to gamma correction. Gamma correction is correction for reproducing the input image on the display unit 42 as a display true to the input image. The output [Rγ, Gγ, Bγ]T of the gamma correction unit 234 is supplied to the YC conversion unit 235.
The YC conversion unit 235 subjects the gamma-corrected three-channel image [Rγ, Gγ, Bγ]T to matrix processing and chroma component band limiting, thereby outputting brightness signal (Y) and color-difference signals (Cr, Cb). The brightness signal and color-difference signals are supplied to the codec 31 downstream from the image processing circuit 23.
Note that the display driver 41 is usually supplied with RGB signals. RGB signals are the brightness signals and color-difference signals which are the output of the YC conversion unit 235 that have been converted into RGB signals.
FIG. 3 is a diagram illustrating a Bayer array as an example of a color filter disposed on the front face of an imaging device according to an embodiment of the present invention. With this Bayer array, G color pixels are disposed in checkerboard fashion, with R color pixels being disposed in a square-grid pattern of every other pixel in the horizontal direction and vertical direction at other pixel positions, and B color pixels being disposed in a square-grid pattern of every other pixel in the horizontal direction and vertical direction at remaining pixel positions.
The G color is a filter color of spectral properties close to the human visibility curve. The R color is a filter color of spectral properties having sensitivity toward the relatively long wavelength side. On the other hand, the B color is a filter color of spectral properties having sensitivity toward the relatively short wavelength side.
These can be sectioned into a first channel (G) disposed in checkerboard fashion, and a second channel (R and B) which is the rest. With the first channel, the color exists regarding which direction smoothing is performed, either the horizontal direction or vertical direction. In the other hand, with the second channel, in the event of smoothing in one of the horizontal direction or vertical direction, there may be cases where that color does not exist. In this case, the intensity of the second channel can be estimated using the intensity of the first channel.
FIG. 4 is a diagram illustrating a functional configuration example of a demosaicing processing unit 232 according to an embodiment of the present invention. The demosaicing processing unit 232 has a neighbor region extracting unit 100, a direction interpolation unit 200, a direction determining unit 300, and a synthesizing unit 400. Demosaicing processing is processing for sequentially interpolating or estimating the intensity of color that does not exist at each color position, so that all colors exist at all pixel positions. That is to say, the processes to be described next are processes which are performed a pixel-of-interest positions which are sequentially set, and which end after being repeated for all pixels.
The neighbor region extracting unit 100 is for extracting a neighbor region of a predetermined size around a pixel-of-interest position, from the mosaic image MW which has been subjected to white balance processing. With the embodiment according to the present invention, we will say that a rectangular region of 9×9 pixels centered on a pixel-of-interest position is extracted as a neighbor region.
For example, in the event of realizing the neighbor region extracting unit 100 as software, an operation should be performed so as to secure pixel values within the rectangular region of 9×9 pixels neighboring the pixel-of-interest position within memory in the form of an array. Also, in the event of realizing the neighbor region extracting unit 100 as hardware, normal imaging apparatus signal processing systems often change signals from the image sensor into data in the form of a one-dimensional system of horizontal line pixel intensities, so in such a case, an arrangement can be made wherein delay lines capable of holding pixel intensities for one line worth are used so as to ensure access to pixels in horizontal lines adjacent above and below. Preparing at least eight delay lines is sufficient to secure access to the rectangular region of 9×9 pixels.
The direction interpolation unit 200 is for performing interpolation processing along each of multiple directions regarding the pixel-of-interest position, and outputting interpolation results in each of the multiple directions. With the embodiment of the present invention, the direction interpolation unit 200 has a horizontal direction interpolation processing unit 210 for performing interpolation processing along the horizontal direction, and a vertical direction interpolation processing unit 220 for performing interpolation processing along the vertical direction. The horizontal direction interpolation processing unit 210 outputs horizontal direction interpolation values [Rh, Gh, Bh]T to a signal line 219, and the vertical direction interpolation processing unit 220 outputs vertical direction interpolation values [Rv, Gv, Bv]T to a signal line 229.
The direction determining unit 300 determines texture direction for the pixel-of-interest position, and instructs how to synthesize interpolation values along the multiple directions. With the embodiment of the present invention, the direction determining unit 300 calculates the weights Sh and Sv of the interpolation values in the horizontal direction and vertical direction. The direction determining unit 300 has a horizontal direction interpolation processing unit 310 for performing interpolation processing along the horizontal direction, and vertical direction interpolation processing unit 320 for performing interpolation processing along the vertical direction. Interpolation values output from the horizontal direction interpolation processing unit 310 and vertical direction interpolation processing unit 320 via signal lines 319 and 329 are input to chroma signal alias intensity calculating units 330 and 340, respectively. The chroma signal alias intensity calculating units 330 and 340 are for calculating the alias intensity of chroma signals included in interpolation values. The horizontal direction alias intensity Vh and vertical direction alias intensity Vv output from the chroma signal alias intensity calculating units 330 and 340 via signal lines 339 and 349 are supplied to a direction evaluation unit 350.
The direction evaluation unit 350 calculates the weights Sh and Sv of the interpolation values in the horizontal direction and vertical direction, based on the horizontal-direction and vertical-direction alias intensities Vh and Vv. The weights Sh and Sv of the interpolation values in the horizontal direction and vertical direction, calculated by the direction evaluation unit 350, are output via signal lines 369 and 379. For example, in the event that the horizontal direction alias intensity Vh is smaller than the vertical direction alias intensity Vv, the horizontal direction interpolation value weight Sh is set to “1”, and the vertical direction interpolation value weight Sv is set to “0”. On the other hand, otherwise, the horizontal direction interpolation value weight Sh is set to “0”, and the vertical direction interpolation value weight Sv is set to “1”. Also, as another calculation method, the weights Sh and Sv may be calculated according to the following expressions from the ratio of alias intensity.

Sh=1−/Vh/(Vh+Vv)

Sv=1−/Vv/(Vh+Vv)

The synthesizing unit 400 is for synthesizing the interpolation values output by the direction interpolation unit 200, based on the interpolation value weights Sh, and Sv output by the direction determining unit 300. The synthesizing unit 400 calculates the mosaic image [R, G, B]T by the following expression for example, and outputs this to a signal line 409.




  
    [
    
      
        
          R
        
      
      
        
          G
        
      
      
        
          B
        
      
    
    ]
  
  =
  
    
      
        S
        h
      
      ⁡
      
        [
        
          
            
              
                R
                h
              
            
          
          
            
              
                G
                h
              
            
          
          
            
              
                B
                h
              
            
          
        
        ]
      
    
    +
    
      
        S
        v
      
      ⁡
      
        [
        
          
            
              
                R
                v
              
            
          
          
            
              
                G
                v
              
            
          
          
            
              
                B
                v
              
            
          
        
        ]
      
    
  




Thus, in the event that the texture direction is a vertical direction as with vertical stripes for example, synthesizing can be performed with weight on interpolation values in the vertical direction, and in the event that the texture direction is a horizontal direction as with horizontal stripes for example, synthesizing can be performed with weight on interpolation values in the horizontal direction.
FIG. 5 is a diagram illustrating a functional configuration example of the horizontal direction interpolation processing unit 210 according to the embodiment of the present invention. The horizontal direction interpolation processing unit 210 includes horizontal direction smoothing units 2110 and 2120, intensity estimating units 2130 and 2140, vertical direction smoothing units 2170 and 2180, and a synthesizing unit 2190.
The horizontal direction smoothing unit 2110 is for performing smoothing in the horizontal direction at positions following the vertical direction (hereafter called vertical sample positions) for the G channel of the RGB channels included in the neighbor region of the pixel-of-interest position. Smoothing values generated by the horizontal direction smoothing unit 2110 are output to a signal line 2119.
The horizontal direction smoothing unit 2120 is for performing smoothing in the horizontal direction at vertical sample positions for the R channel and B channel of the RGB channels included in the neighbor region of the pixel-of-interest position. Note that with the R channel and B channel, there are cases wherein there are no pixels of the relevant channel on a horizontal line of a given vertical sample position, so in such a case a smoothing value cannot be obtained, and the smoothing value remains non-existent. Smoothing values generated by the horizontal direction smoothing unit 2120 are output to a signal line 2129.
The intensity estimating unit 2130 is for performing estimation of the intensity of the pixel-of-interest position, for the G channel of the RGB channels included in the neighbor region of the pixel-of-interest position. In the event that a G channel pixel exists at the pixel-of-interest position, the intensity estimating unit 2130 takes that value as the intensity, and in the event that a G channel pixel does not exist at the pixel-of-interest position, the intensity estimating unit 2130 estimates the average value of the pixel intensities of G channel pixels neighboring in the horizontal direction as the intensity. The estimated intensity is output to a signal line 2139 as a G channel interpolation value.
The intensity estimating unit 2140 is for performing estimation of the intensity of the smoothing values of the R channel and B channel from the horizontal direction smoothing unit 2120 by the intensity of the G channel smoothing value from the horizontal direction smoothing unit 2110. The intensity estimated by the intensity estimating unit 2140 is output to a signal line 2149 as an interpolated smoothing value of the R channel and B channel.
The vertical direction smoothing unit 2170 is for further smoothing, in the vertical direction, the intensity of the horizontal direction smoothing value of the G channel from the horizontal direction smoothing unit 2110. The value thus generated is output to a signal line 2179 as a low-frequency component of the G channel.
The vertical direction smoothing unit 2180 is for further smoothing, in the vertical direction, the intensity of the horizontal direction smoothing value of the R channel and B channel that has been interpolated, from the intensity estimating unit 2140. The value thus generated is output to a signal line 2179 as a low-frequency component of the R channel and B channel.
The synthesizing unit 2190 is for synthesizing the intensities of the R channel and B channel of the pixel-of-interest position, based on the low-frequency component of the G channel from the vertical direction smoothing unit 2170, the low-frequency component of the R channel and B channel from the vertical direction smoothing unit 2180, and the G channel interpolation value from the intensity estimating unit 2130. Now, taking the R channel as an example of a channel to be synthesized, the intensity RC of the R channel is a synthesized value of the high-frequency component RH and low-frequency component RL of the R channel. Also, the R channel high-frequency component RH can be obtained from the ratio of G channel high-frequency component and low-frequency component. Accordingly, the R channel intensity RC is obtained by multiplying the ratio of the low-frequency components of the R channel and G channel by the G channel intensity GC, as shown in the following expression. This holds true for the B channel as well.

RC=RH+RL=RL*((GC−GL)/GL)+RL=(RL/GL)*GC 

The R channel and B channel intensity synthesized by the synthesizing unit 2190 is output to a signal line 2199 as the R channel and B channel interpolation value. Also, the R channel and B channel interpolation value, and the G channel interpolation value output from the intensity estimating unit 2130, are output to a signal line 219 as interpolation processing results following the horizontal direction.
Note that while description has been made regarding a functional configuration example of the horizontal direction interpolation processing unit 210, the basic configuration of the vertical direction interpolation processing unit 220 is the same, only with the horizontal direction and vertical direction inverted.
FIG. 6 is a model diagram of the processing of the horizontal direction interpolation processing unit 210 according to the embodiment of the present invention. In FIG. 6, (a) illustrates the way in which horizontal direction smoothing is performed on a 9×9 pixel Bayer array. Smoothing is performed by the horizontal direction smoothing unit 2110 for the G channel, and smoothing is performed by the horizontal direction smoothing unit 2120 for the R channel and B channel.
In FIG. 6, (b) illustrates the smoothing results with the horizontal direction smoothing units 2110 and 2120. The G channel exists on all lines, so smoothing values are obtained for all vertical sample positions. On the other hand, the R channel and B channel exist every other line, so it can be seen that smoothing values are not obtained for all vertical sample positions, and there are blank places.
The intensity estimating unit 2140 estimates the intensity regarding the R channel and B channel smoothing values, and as shown in (c) in FIG. 6, arranges such that smoothing values are present for all vertical sample positions for the R channel and B channel as well.
In FIG. 6, (c) illustrates the way in which vertical direction smoothing is performed on the obtained horizontal direction smoothing values. Smoothing is performed for the G channel with the vertical direction smoothing unit 2170, and smoothing is performed for the R channel and B channel with the vertical direction smoothing unit 2180.
In FIG. 6, (d) illustrates the smoothing results of the vertical direction smoothing units 2170 and 2180. These smoothing values are the low-frequency components of each channel, and are supplied to the synthesizing unit 2190.
FIG. 7 is a diagram illustrating a functional configuration example of the intensity estimating unit 2140 according to the embodiment of the present invention. The intensity estimating unit 2140 includes a high-frequency component calculating unit 2141, a low-frequency component calculating unit 2143, and a corrected value calculating unit 2145.
The high-frequency component calculating unit 2141 is for calculating the high-frequency component of the smoothing value generated by the horizontal direction smoothing unit 2110 at each vertical sample position. If we say that the vertical sample position being reference is position i, the smoothing value of the G channel at position i is G[i], and the smoothing values of the G channel at adjacent positions to the position i are G[i−1] and G[i+1]. Now, in the event that there is an R channel pixel at position i, the G channel high-frequency component GH[i] is calculated by

GH[i]=((G[i+1]+G[i−1])/2−G[i])/2,

and in the event that there is no R channel pixel at position i, this is calculated by

GH[i]=(G[i]−(G[i+1]+G[i−1])/2)/2.

While description has been made here regarding a method for calculating the high-frequency component of the G channel taking the R channel position as a reference, the B channel may be used as a reference instead of the R channel.

The low-frequency component calculating unit 2143 is for calculating the low-frequency component of the smoothing value generated by the horizontal direction smoothing unit 2120 at each vertical sample position. If we say that the vertical sample position being reference is position i, the smoothing value of the R channel at position i is R[i], and the smoothing values of the R channel at adjacent positions to the position i at the vertical sample position are R[i−1] and R[i+1]. Now, in the event that there is an R channel pixel at position i, the R channel low-frequency component RL[i] is calculated by

RL[i]=R[i], 

and in the event that there is no R channel pixel at position i, this is calculated by

RL[i]=(R[i+1]+R[i−1])/2.

This is also the same in cases of calculating the B channel low-frequency component BL[i] as well.

The corrected value calculating unit 2145 is for correcting the smoothing value of the R channel or B channel at each vertical sample position, from the high-frequency component of the G channel generated by the high-frequency component calculating unit 2141 and the R channel or B channel low-frequency component generated by the low-frequency component calculating unit 2143. If we say that the vertical sample position being reference is position i, the R channel corrected value RC[i] can be calculated by adding the R channel low-frequency component RL[i] and the G channel high-frequency component GH[i] with the following expression.

RC[i]=RL[i]+GH[i]

This holds true for the B channel as well, and the B channel corrected value BC[i] can be obtained by adding the B channel low-frequency component BL[i] and the G channel high-frequency component GH[i].
While description has been made here regarding an example of calculating the R channel corrected value by adding the R channel or B channel low-frequency component to the G channel high-frequency component, the R channel or B channel corrected value may be calculated by estimating the high-frequency component of the R channel or B channel, as described below.
FIG. 8 is a diagram illustrating another functional configuration example of the intensity estimating unit 2140 according to an embodiment of the present invention. This intensity estimating unit 2140 includes a high-frequency component calculating unit 2141, a low-frequency component calculating unit 2142, a low-frequency component calculating unit 2143, a high-frequency component estimating unit 2144, and a corrected value calculating unit 2145. That is to say, this is a configuration wherein the low-frequency component calculating unit 2142 and high-frequency component estimating unit 2144 have been added to the example in FIG. 7.
The low-frequency component calculating unit 2142 is for calculating the low-frequency component of the smoothing value generated by the horizontal direction smoothing unit 2110 at each vertical sample position. If we say that the vertical sample position being referenced is position i, and the G channel smoothing value at position i is G[i], the G channel low-frequency component GL[i] is calculated by

GL[i]=G[i]. 

The high-frequency component estimating unit 2144 is for estimating the R channel or B channel high-frequency component by adjusting the high-frequency component of the G channel generated by the high-frequency component calculating unit 2141, based on the ratio between the low-frequency component of the G channel generated by the low-frequency component calculating unit 2142 and the R channel or B channel low-frequency component generated by the low-frequency component calculating unit 2143. If we say that the vertical sample position being reference is position i, the G channel high-frequency component at the position i is GH[i], the G channel low-frequency component is GL[i], and the R channel low-frequency component is RL[i], the R channel high-frequency component RH[i] can be calculated from the following expression.

RH[i]=(RL[i]/GL[i])·GH[i]

Thus, the corrected value calculating unit 2145 can calculate by adding the R channel low-frequency component RL[i] and the R channel high-frequency component RH[i] as shown in the following expression.

RC[i]=RL[i]+RH[i]

Note that while description has been made regarding the R channel, this holds true for the B channel as well.
FIG. 9 is a diagram illustrating a functional configuration example of the horizontal direction interpolation processing unit 310 according to the embodiment of the present invention. The horizontal direction interpolation processing unit 310 includes a G intensity estimating unit 311 and an RB intensity estimating unit 312.
The G intensity estimating unit 311 is for estimating the G channel at a position with no G channel pixel, in the neighbor region extracted by the neighbor region extracting unit 100. As for a method of this estimation, estimation can be made by obtaining the average value of the intensity of the pixels adjacent in the horizontal direction, using the interpolation filter shown in FIG. 10A, for example. The G channel estimation value is output to the signal line 318. Note that the G intensity estimating unit at the vertical direction interpolation processing unit 320 is the same, and estimation can be made by obtaining the average value of the intensity of the pixels adjacent in the vertical direction, using the interpolation filter shown in FIG. 10B, for example.
The RB intensity estimating unit 312 is for estimating the R channel and B channel at a position with no R channel or B channel pixel, in the neighbor region extracted by the neighbor region extracting unit 100. As for a method of this estimation, estimation can be made by obtaining the average value of the intensity of the pixels adjacent in the horizontal direction, using the interpolation filter shown in FIG. 10A, for example. However, there are cases regarding the R channel and B channel that the channel is not present on the line, so in that case, the R channel and B channel intensity can be estimated based on the G channel intensity estimated by the G intensity estimating unit 311. The R channel and B channel intensity estimated by the RB intensity estimating unit 312, and the G channel intensity estimated by the G intensity estimating unit 311, are output to the signal line 319.
With the example shown in FIG. 9, the intensities of channels that do not exist are estimated for all pixels in the neighbor region. Accordingly, intensities of the channels in the 9×9 pixels corresponding to the neighbor region are output to the signal line 319. Conversely, an arrangement may be made as described below, wherein following performing smoothing in one direction, the intensity of the lacking channels alone is estimated.
FIG. 11 is a diagram illustrating another functional configuration example of the horizontal direction interpolation processing unit 310 according to an embodiment of the present invention. This horizontal direction interpolation processing unit 310 has a horizontal direction smoothing unit 313, a horizontal direction smoothing unit 314, and an RB intensity estimating unit 315.
The horizontal direction smoothing unit 313 is for performing smoothing in the horizontal direction for the G channel included in the neighbor region of the pixel-of-interest position, at vertical sample positions. Smoothing values generated by this horizontal direction smoothing unit 313 are output to a signal line 317.
The horizontal direction smoothing unit 314 is for performing smoothing in the horizontal direction at vertical sample positions for the R channel and B channel included in the neighbor region of the pixel-of-interest position. Note that with the R channel and B channel, there are cases wherein there are no pixels of the relevant channel on a horizontal line of a given vertical sample position, so in such a case a smoothing value cannot be obtained, and the smoothing value remains non-existent. Smoothing values generated by the horizontal direction smoothing unit 314 are output to a signal line 316.
The RB intensity estimating unit 315 is for performing estimation of the intensity of the smoothing value of the R channel and B channel with the horizontal direction smoothing unit 314, using the intensity of the smoothing value of the G channel from the horizontal direction smoothing unit 313. The R channel and B channel estimation value estimated by the RB intensity estimating unit 315, and the G channel intensity smoothed by the horizontal direction smoothing unit 313, are output to the signal line 319.
With this example in FIG. 11, processing is performed smoothing the pixels of the neighbor region in the horizontal direction. Accordingly, the intensities of the channels in the 1×9 pixels obtained by smoothing the pixels of the neighbor region in the horizontal direction are output to the signal line 319. That is to say, interpolation processing can be performed at higher speeds as compared with the example in FIG. 9 by smoothing one line worth in the interpolation direction instead of interpolating each pixel in the neighbor region. Accordingly, a case of calculating chroma signal alias intensity based on the output (1×9 pixels) of the horizontal direction interpolation processing unit 310 according to the example in FIG. 11 will now be described.
FIG. 12 is a diagram illustrating a functional configuration example of a chroma signal alias intensity calculating unit 330 according to an embodiment of the present invention. The chroma signal alias intensity calculating unit 330 includes a degree-of-similarity calculating unit 331 and a chroma signal variance calculating unit 332.
The degree-of-similarity calculating unit 331 is for calculating the degree of similarity between the interpolation value of the line including the pixel of interest, and the interpolation value of the neighbor region. The degree-of-similarity calculating unit 331 calculates a degree of similarity Wi at an i'th vertical sample position by the following expression, for example. Now, Gcenter is an interpolation value of the G channel at a vertical sample position including the pixel of interest, and Gi is an interpolation value of the G channel at an i'th vertical sample position. Let us say that the interpolation values of the G channel have been normalized such that the maximum value is 1.

wi=1−|Gi−Gcenter|

Note that the calculation expression for degree of similarity for the degree-of-similarity calculating unit 331 is not restricted to the above expression, and the degree of similarity Wi may be calculated by the following expression, for example. Here, Gmean is the average value of the G channel interpolation values, and Gvar is the variance of the G channel interpolation values.

Wi=((Gi−Gmean)·(Gcenter−Gmean)/Gvar)×0.5+0.5

The degree of similarity obtained in this way is used for weighting for calculating variance of chroma signals at the chroma signal variance calculating unit 332.
The chroma signal variance calculating unit 332 is for calculating the weighting variance values of chroma signals. Now, a chroma signal is chrominance (color difference) of a pixel signal, and is obtained by subtracting brightness signal Y (Luminance) from the pixel signal. With the embodiment of the present invention, the color difference Cr of red and the color difference Cb of blue are calculated from the following expression. Note that Y=0.3R+0.6G+0.1B.

Cr=R−Y 

Cb=B−Y 

The chroma signal variance calculating unit 332 calculates the variance VCr of the color difference Cr of red and the variance VCb of the color difference Cb of blue by the following expressions. Here, N is the sum of samples, with N=9 in an arrangement assuming FIG. 11. Also, Cri and Cbi are the intensity of the red and blue chroma signals at the i'th vertical sample position. The overlined symbols represent average values.




  
    
      
        
          V
          Cr
        
        =
        
        ⁢
        
          
            1
            N
          
          ⁢
          
            
              ∑
              
                i
                =
                1
              
              N
            
            ⁢
            
              
                
                  W
                  i
                
                ⁡
                
                  (
                  
                    
                      Cr
                      i
                    
                    -
                    
                      Cr
                      _
                    
                  
                  )
                
              
              2
            
          
        
      
    
  
  
    
      
        
          V
          Cb
        
        =
        
        ⁢
        
          
            1
            N
          
          ⁢
          
            
              ∑
              
                i
                =
                1
              
              N
            
            ⁢
            
              
                
                  W
                  i
                
                ⁡
                
                  (
                  
                    
                      Cb
                      i
                    
                    -
                    
                      Cb
                      _
                    
                  
                  )
                
              
              2
            
          
        
      
    
  




Consequently, the value V=VCr+VCb obtained by adding the variance values of chroma signals is the alias intensity of the chroma signals. The alias intensity V is output from a signal line 339 as a horizontal direction alias intensity Vh.
Note that this holds true for the chroma signal alias intensity calculating unit 340 as well, with the alias intensity V being output from a signal line 349 as a vertical direction alias intensity Vv.
With the configuration shown in FIG. 4, interpolation processing at the direction interpolation unit 200 (processing by the horizontal direction interpolation processing unit 210 and the vertical direction interpolation processing unit 220) and interpolation processing at the direction determining unit 300 (processing by the horizontal direction interpolation processing unit 310 and the vertical direction interpolation processing unit 320) are performed independently. However, these have mutually overlapping portions, so results at one or the other can be shared. A configuration example of this case will be described below.
FIG. 13 is a diagram illustrating another functional configuration example of a demosaicing processing unit 232 according to an embodiment of the present invention. In the example in FIG. 13, the horizontal direction interpolation processing unit 310 and the vertical direction interpolation processing unit 320 have been removed from the example in FIG. 4. Instead, the signals lines 218 and 228 from the horizontal direction interpolation processing unit 210 and the vertical direction interpolation processing unit 220 are input to the chroma signal alias intensity calculating units 330 and 340, respectively.
FIG. 14 is a diagram illustrating a configuration example of the horizontal direction interpolation processing unit 210 shown in FIG. 13. With this horizontal direction interpolation processing unit 210, signal lines 2119 and 2149 which are input to the vertical direction smoothing units 2170 and 2180 are output as signal lines 218. Output of the signal lines 218 is equivalent to the signal line 319 in FIG. 11. Accordingly, the signals supplied to the chroma signal alias intensity calculating unit 330 is the same as in the example in FIG. 4.
Note that while description has been made regarding the horizontal direction interpolation processing unit 210, the basic configuration of the vertical direction interpolation processing unit 220 is the same, only with the horizontal direction and vertical direction inverted.
Next, the operations of the image processing device according to the embodiment of the present invention will be described with reference to the drawings.
FIG. 15 is a diagram illustrating a processing procedure example of the image processing circuit 23 according to the embodiment of the present invention. Upon a mosaic image being acquired from the A/D conversion circuit 22 (step S901), the white balance processing unit 231 subjects the mosaic image to white balance processing (step S902). The demosaicing processing unit 232 performs interpolation processing (demosaicing processing) so that the intensity of all of the channels R, G, and B are present for all pixels of the mosaic image which has been subjected to white valance (Step S903). The matrix processing unit 233 applies a linear matrix to each of the pixels in the output of the demosaicing processing unit 232, and converts in to three-primary-color intensity values (step S904). The gamma correction unit 234 subjects the matrix-processed intensity values to gamma correction (step S905). The YC conversion unit 235 subjects the gamma-corrected three-channel image to matrix processing and chroma component band limiting, thereby outputting brightness signal (Y) and color-difference signals (Cr, Cb) (step S906).
FIG. 16 is a diagram illustrating a processing procedure example of demosaicing processing (step S903 in FIG. 15) by the demosaicing processing unit 232 according to the embodiment of the present invention. Demosaicing processing is processing for sequentially interpolating or estimating the intensity of color that does not exist at each color position, so that all colors exist at all pixel positions. This processing is realized by repeating loop L991 for each pixel position (p, q) (wherein p=1 through m, q=1 through n).
First, a current pixel position (p, q) is set as the pixel-of-interest position (step S911), whereupon the neighbor region extracting unit 100 extracts, from the mosaic image subjected to while balance processing, a neighbor region of a predetermined size around the pixel-of-interest position (e.g., 9×9) (step S912). The direction interpolation unit 200 performs interpolation processing along each of multiple directions regarding the pixel-of-interest position, and outputs interpolation results for each of the multiple directions (step S913). The direction determining unit 300 determines texture direction for the pixel-of-interest position, and instructs how to synthesize the interpolation values along the multiple directions (step S914). The synthesizing unit 400 synthesizes the interpolation values output by the direction interpolation unit 200, based on the weight of interpolation values output by the direction determining unit 300, and outputs as an interpolation value of the pixel-of-interest position (step S915).
FIG. 17 is a diagram illustrating a processing procedure example of interpolation processing (step S913 in FIG. 16) with the direction interpolation unit 200 according to the embodiment of the present invention. The horizontal direction smoothing unit 2110 performs horizontal direction smoothing at vertical sample positions for the G channel of the RGB channels included in the neighbor region of the pixel-of-interest position (step S921). Also, the horizontal direction smoothing unit 2120 performs smoothing in the horizontal direction at vertical sample positions for the R channel and B channel of the RGB channels included in the neighbor region of the pixel-of-interest position (step S922). The intensity estimating unit 2140 performs estimation of the intensity of the smoothing values of the R channel and B channel from the horizontal direction smoothing unit 2120 by the intensity of the G channel smoothing value from the horizontal direction smoothing unit 2110 (step S923).
The vertical direction smoothing unit 2170 further smoothes, in the vertical direction, the intensity of the horizontal direction smoothing value of the G channel from the horizontal direction smoothing unit 2110 (step S924). Also, the vertical direction smoothing unit 2180 further smoothes, in the vertical direction, the intensity of the horizontal direction smoothing value of the R channel and B channel that has been interpolated, from the intensity estimating unit 2140 (step S925).
Also, the intensity estimating unit 2130 performs estimation of the intensity of the pixel-of-interest position, for the G channel of the RGB channels included in the neighbor region of the pixel-of-interest position (step S926). The synthesizing unit 2190 then synthesizes the intensities of the R channel and B channel of the pixel-of-interest position, based on the low-frequency component of the G channel from the vertical direction smoothing unit 2170, the low-frequency component of the R channel and B channel from the vertical direction smoothing unit 2180, and the G channel interpolation value from the intensity estimating unit 2130 (step S927).
Note that these procedures may be executed in different order as long as they follow the relation of dependence of operations in FIG. 5.
FIG. 18 is a diagram illustrating a processing procedure example of texture direction determination processing (step S914 in FIG. 16) with the direction determining unit 300 according to the embodiment of the present invention. The horizontal direction interpolation processing unit 310 performs interpolation processing following the horizontal direction (step S931). The chroma signal alias intensity calculating unit 330 calculates the alias intensity of the chroma signals included in the interpolation values in the horizontal direction (Step S932).
Also, the vertical direction interpolation processing unit 320 performs interpolation processing following the vertical direction (step S933). The chroma signal alias intensity calculating unit 340 calculates the alias intensity of the chroma signals included in the interpolation values in the vertical direction (Step S934).
The direction evaluation unit 350 calculates the weights of the interpolation values in the horizontal direction and vertical direction, based on the horizontal-direction and vertical-direction alias intensities (step S935).
Note that these procedures may be executed in different order as long as they follow the relation of dependence of operations in FIG. 4.
FIG. 19 is a diagram illustrating a processing procedure example of unidirectional interpolation processing (steps S931 and S933 in FIG. 18) with the horizontal direction interpolation processing unit 310 and the vertical direction interpolation processing unit 320 according to the embodiment of the present invention. The horizontal direction interpolation processing unit 310 in FIG. 9 performs interpolation processing so that R, G, and B signals are all present for all pixels in then neighbor region. This processing is realized by repeating loops L992 and L993 for each pixel position (s, t) (wherein s=1 through 9, t=1 through 9 with the embodiment of the present invention).
In loop L992, in the event that the color of the pixel position (s, t) is not G (step S941), the G intensity estimating unit 311 estimates the intensity of the G channel at the pixel position (s, t) (step S942). Upon the processing of step S941 having been performed for all pixels within the neighbor region, the loop L992 ends, and goes to loop L993.
In loop L 993, at the pixel position (s, t), the RB intensity estimating unit 312 estimates the R channel and B channel each for positions with no R channel or B channel pixels (step S943). Upon R, G, and B being present for all pixels in the neighbor region, the unidirectional interpolation processing ends.
Note that the processing of the vertical direction interpolation processing unit 320 is the same as the processing of the horizontal direction interpolation processing unit 310, only with the horizontal direction and vertical direction inverted.
FIG. 20 is a diagram illustrating a processing procedure example of chroma signal alias intensity calculation processing (steps S932 and S934 in FIG. 18) with the chroma signal alias intensity calculating units 330 and 340 according to the embodiment of the present invention.
In the chroma signal alias intensity calculating unit 330, the degree-of-similarity calculating unit 331 calculates the degree of similarity between the interpolation value of the line including the pixel of interest, and the interpolation value of the neighbor region (step S951). The chroma signal variance calculating unit 332 then calculates the weighting variance values of chroma signals (step S952).
Note that the processing of the chroma signal alias intensity calculating unit 340 is the same as the processing of the chroma signal alias intensity calculating unit 330, only with the horizontal direction and vertical direction inverted.
While an example of using the Bayer array three-primary-color filter shown in FIG. 3 has been described with the embodiment of the present invention, the present invention is applicable to other color arrays as well. For example, this may be a four-color array wherein an E (emerald) filter has been added in addition to RGB, as shown in FIG. 21A. This four-color array is an array wherein half of the B pixel positions in a three-color Bayer array have been replaced with those with somewhat differing spectral properties. In the case of this four-color array, the interpolation values of the channels R, G, B, and E can be calculated with the direction interpolation unit 200, and the interpolation values be synthesized at the synthesizing unit 400 based on the texture direction determined at the direction determining unit 300.
With this four-color array, G color pixels are disposed in checkerboard fashion, with R color pixels being disposed in a square-grid pattern of every other pixel in the horizontal direction and vertical direction at other pixel positions, and B and E color pixels being disposed in a diagonal grid pattern of every other pixel in the diagonal direction at remaining pixel positions.
The G color is a filter color of spectral properties close to the human visibility curve. The R color is a filter color of spectral properties having sensitivity toward the relatively long wavelength side. On the other hand, the B and E colors are filter colors of spectral properties having sensitivity toward the relatively short wavelength side.
This four-color array can be generalized as shown in FIG. 21B. In the example above, G is equivalent to C1, R is equivalent to C2, B is equivalent to C3, and E is equivalent to C4. These can be sectioned into a first channel (C1) disposed in checkerboard fashion, and a second channel (C2 through C4) which is the rest. With the first channel, the color exists regarding which direction smoothing is performed, either the horizontal direction or vertical direction. In the other hand, with the second channel, in the event of smoothing in one of the horizontal direction or vertical direction, there may be cases where that color does not exist. In this case, the intensity of the second channel can be estimated using the intensity of the first channel.
This also holds true for arrays of five or more colors. That is to say, as long as the first channel is disposed in checkerboard fashion, the second channel can include four or more colors arrayed in an orderly fashion.
Now, while a filter color of spectral properties close to the human visibility curve has been assumed as the first channel disposed in checkerboard fashion, the invention is not restricted to this, and this may be a filter color having spectral sensitivity to infrared rays as well. As an example of such, a plain filter which passes light rays of all colors can be conceived.
Also, while the embodiment of the present invention has assumed that the pixels are arrayed systematically in the horizontal direction and vertical direction, the invention is not restricted to this, and may be disposed at a 45° inclination, for example.
Also, while the embodiment of the present invention has assumed that the texture direction is to be determined by interpolation in the horizontal direction and vertical direction, the invention is not restricted to this, and in addition to the horizontal direction and vertical direction, interpolation and texture direction determination may be performed in the lower-left-to-upper-right direction (ascending) and upper-left-to-lower-right direction (descending).
In this way, according to the embodiment of the present invention, occurrence of false color at the pixel-of-interest position can be suppressed by calculating the high-frequency component of the first channel with the high-frequency component calculating unit 2141, and correcting the low-frequency component of the second channel with the corrected value calculating unit 2145.
Also, the embodiment of the present invention illustrates an example for carrying out the present invention, and has correlation with the claimed elements of the invention, but the invention is not restricted to this embodiment, and various modifications may be made without departing from the essence of the present invention.
That is to say, the first smoothing unit described in the Summary of the Invention corresponds to, for example, the horizontal direction smoothing unit 2110, the second smoothing unit described in the Summary of the Invention corresponds to, for example, the horizontal direction smoothing unit 2120, the second intensity estimating unit described in the Summary of the Invention corresponds to, for example, the intensity estimating unit 2130, the intensity estimating unit described in the Summary of the Invention corresponds to, for example, the intensity estimating unit 2140, the fourth smoothing unit described in the Summary of the Invention corresponds to, for example, the vertical direction smoothing unit 2170, the third smoothing unit described in the Summary of the Invention corresponds to, for example, the vertical direction smoothing unit 2180, and the synthesizing unit described in the Summary of the Invention corresponds to, for example, the synthesizing unit 2190.
Also, the high-frequency component calculating unit described in the Summary of the Invention corresponds to, for example, the frequency component calculating unit 2141, the first low-frequency component calculating unit described in the Summary of the Invention corresponds to, for example, the low-frequency component calculating unit 2142, the second low-frequency component calculating unit described in the Summary of the Invention corresponds to, for example, the low-frequency component calculating unit 2143, the high-frequency component estimating unit described in the Summary of the Invention corresponds to, for example, the high-frequency component estimating unit 2144, and the corrected value calculating unit described in the Summary of the Invention corresponds to, for example, the corrected value calculating unit 2145.
Also, the interpolation unit described in the Summary of the Invention corresponds to, for example, the direction interpolation unit 200, the direction determining unit described in the Summary of the Invention corresponds to, for example, the direction determining unit 300, and the synthesizing unit described in the Summary of the Invention corresponds to, for example, the synthesizing unit 400.
Also, the imaging unit described in the Summary of the Invention corresponds to, for example, the imaging device 13. Also, the particular color described in the Summary of the Invention corresponds to, for example, the G (green) color, the first color described in the Summary of the Invention corresponds to, for example, the R (red) color, the second color described in the Summary of the Invention corresponds to, for example, the B (blue) color, and the third color described in the Summary of the Invention corresponds to, for example, the E (emerald) color.
Also, the first smoothing procedure described in the Summary of the Invention corresponds to, for example, step S921, the second smoothing procedure described in the Summary of the Invention corresponds to, for example, step S922, the intensity estimating procedure described in the Summary of the Invention corresponds to, for example, step S923, and the third smoothing procedure described in the Summary of the Invention corresponds to, for example, step S925.
The processing procedures described in the embodiment of the present invention may be taken as a method having the series of procedures, or may be taken as a program for causing a computer to execute the series of procedures or a recording medium storing the program.
It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and alterations may occur depending on design requirements and other factors insofar as they are within the scope of the appended claims or the equivalents thereof.

## Claims

1. An image processing device comprising:
first smoothing means configured to calculate, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from said first direction, for a first channel;
second smoothing means configured to calculate, regarding a plurality of positions along said first direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said second direction, for a second channel;
intensity estimating means configured to estimate an intensity of said first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels,
wherein said intensity estimating means comprises:
high-frequency component calculating means configured to calculate, regarding each position along said first direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
first low-frequency component calculating means configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
second low-frequency component calculating means configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
high-frequency estimating means configured to estimate a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
correction value calculating means configured to calculate said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.

2. The image processing device according to claim 1, further comprising:
third smoothing means configured to calculate a second-stage smoothing value for said second channel, wherein said first-stage smoothing value of said second channel subjected to intensity estimating by said intensity estimating means has been smoothed along said first direction.

3. The image processing device according to claim 1, further comprising:
fourth smoothing means configured to calculate a second-stage smoothing value of said first channel, wherein said first-stage smoothing value of said first channel has been smoothed along said first direction.

4. The image processing device according to claim 3, further comprising:
second intensity estimating means configured to estimate an intensity of said first channel at the position of said pixel of interest; and
synthesizing means configured to synthesize an intensity of said second channel at the position of said pixel of interest, based on:
the intensity of said first channel,
the second-stage smoothing value of said first channel, and
the second-stage smoothing value of said second channel.

5. An image processing device comprising:
interpolation means configured to generate interpolation values, regarding a plurality of directions in a neighbor region of a predetermined pixel of interest in an input image taken as interpolation directions, along each of said interpolation directions;
direction determining means configured to determine a direction of texture of said neighbor region; and
synthesizing means configured to synthesize interpolation values along each of said interpolation directions, based on determination results of said direction of texture;
said interpolation means including, for each of said plurality of directions,
first smoothing means configured to calculate, regarding the plurality of positions along a reference direction differing from said interpolation direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said interpolation direction, for a first channel;
second smoothing means configured to calculate, regarding the plurality of positions along said reference direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said interpolation direction, for a second channel;
intensity estimating means configured to estimate an intensity of said first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels,
wherein said intensity estimating means comprises:
high-frequency component calculating means configured to calculate, regarding each position along said reference direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
first low-frequency component calculating means configured to calculate, regarding each position along said reference direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
second low-frequency component calculating means configured to calculate, regarding each position along said reference direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
high-frequency estimating means configured to estimate a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
correction value calculating means configured to calculate said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.

6. The image processing device according to claim 5, wherein said plurality of directions is a combination of two or more of the horizontal direction, vertical direction, lower-left-to-upper-right direction, and upper-left-to-lower-right direction.

7. An image processing device comprising:
imaging means configured to image a subject and generate an input image;
first smoothing means configured to calculate, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from said first direction, for a first channel;
second smoothing means configured to calculate, regarding a plurality of positions along said first direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said second direction, for a second channel;
intensity estimating means configured to estimate an intensity of said first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels,
wherein said intensity estimating means comprises:
high-frequency component calculating means configured to calculate, regarding each position along said first direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
first low-frequency component calculating means configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
second low-frequency component calculating means configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
high-frequency estimating means configured to estimate a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
correction value calculating means configured to calculate said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.

8. The image processing device according to claim 7, wherein said imaging means comprises an image sensor with a primary-color Bayer array color filter disposed on a front face.

9. The image processing device according to claim 7, wherein said imaging means comprises an image sensor with a color filter disposed on a front face;
said color filter having pixels corresponding to a particular color disposed in a checkerboard pattern, with at least three remaining colors disposed in the remaining pixel positions.

10. The image processing device according to claim 9, wherein said particular color is a filter color having spectral sensitivity close to that of a human visibility curve.

11. The image processing device according to claim 9, wherein of said at least three colors, a first color is disposed in a square-grid pattern of every other pixel in the horizontal direction and vertical direction at pixel positions other than said particular color, and second and third colors are disposed in a diagonal grid every other pixel in the diagonal direction at remaining pixel positions.

12. The image processing device according to claim 11, wherein said first color is a filter color having spectral properties with sensitivity at a long-wavelength side as compared with said particular color;
and wherein at least one of said second and third colors is a filter color having spectral properties with sensitivity at a short-wavelength side as compared with said particular color.

13. The image processing device according to claim 9, wherein said particular color is a filter color having spectral sensitivity to infrared rays as well.

14. An image processing device method comprising the steps of:
first calculating of, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from said first direction, for a first channel;
second calculating of, regarding a plurality of positions along said first direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said second direction, for a second channel;
estimating an intensity of said first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels; and
wherein estimating the intensity comprises:
calculating, regarding each position along said first direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
calculating, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
calculating, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
estimating a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
calculating said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.

15. A nontransitory computer-readable storage medium encoded with a computer program, which when executed by a computer, causes the computer to execute the steps of:
first calculating of, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from said first direction, for a first channel;
second calculating of, regarding a plurality of positions along said first direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said second direction, for a second channel;
estimating an intensity of said first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels; and
third calculating of a second-stage smoothing value for said second channel, wherein said first-stage smoothing value of said second channel subjected to intensity estimating has been smoothed along said first direction,
wherein estimating the intensity comprises:
calculating, regarding each position along said first direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
calculating, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
calculating, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
estimating a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
calculating said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.

16. An image processing device comprising:
a first smoothing unit configured to calculate, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from said first direction, for a first channel;
a second smoothing unit configured to calculate, regarding a plurality of positions along said first direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said second direction, for a second channel;
an intensity estimating unit configured to estimate an intensity of said first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels; and
a third smoothing unit configured to calculate a second-stage smoothing value for said second channel, wherein said first-stage smoothing value of said second channel subjected to intensity estimating by said intensity estimating unit has been smoothed along said first direction,
wherein said intensity estimating unit comprises:
a high-frequency component calculating unit configured to calculate, regarding each position along said first direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
a first low-frequency component calculating unit configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
a second low-frequency component calculating unit configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
a high-frequency estimating unit configured to estimate a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
a correction value calculating unit configured to calculate said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.

17. An image processing device comprising:
an interpolation unit configured to generate interpolation values, regarding a plurality of directions in a neighbor region of a predetermined pixel of interest in an input image taken as interpolation directions, along each of said interpolation directions;
a direction determining unit configured to determine a direction of texture of said neighbor region; and
a synthesizing unit configured to synthesize interpolation values along each of said interpolation directions, based on determination results of said direction of texture;
said interpolation unit including, for each of said plurality of directions,
a first smoothing unit configured to calculate, regarding a plurality of positions along a reference direction differing from said interpolation direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said interpolation direction, for a first channel;
a second smoothing unit configured to calculate, regarding a plurality of positions along said reference direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said interpolation direction, for a second channel;
an intensity estimating unit configured to estimate an intensity of said first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels; and
a third smoothing unit configured to calculate a second-stage smoothing value for said second channel, wherein said first-stage smoothing value of said second channel subjected to intensity estimating by said intensity estimating unit has been smoothed along said reference direction,
wherein said intensity estimating unit comprises:
a high-frequency component calculating unit configured to calculate, regarding each position along said reference direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
a first low-frequency component calculating unit configured to calculate, regarding each position along said reference direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
a second low-frequency component calculating unit configured to calculate, regarding each position along said reference direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
a high-frequency estimating unit configured to estimate a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
a correction value calculating unit configured to calculate said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.

18. An image processing device comprising:
an imaging unit configured to image a subject and generate an input image;
a first smoothing unit configured to calculate, regarding a plurality of positions along a first direction in a neighbor region of a predetermined pixel of interest in an input image, a first-stage smoothing value wherein smoothing of pixel values has been performed along a second direction differing from said first direction, for a first channel;
a second smoothing unit configured to calculate, regarding a plurality of positions along said first direction in said neighbor region, a first-stage smoothing value wherein smoothing of pixel values has been performed along said second direction, for a second channel;
an intensity estimating unit configured to estimate an intensity of said, first-stage smoothing value of said second channel, based on said first-stage smoothing values of said first and second channels; and
a third smoothing unit configured to calculate a second-stage smoothing value for said second channel, wherein said first-stage smoothing value of said second channel subjected to intensity estimating by said intensity estimating unit has been smoothed along said first direction,
wherein said intensity estimating unit comprises:
a high-frequency component calculating unit configured to calculate, regarding each position along said first direction, a high-frequency component of said first-stage smoothing value of said first channel, at said position;
a first low-frequency component calculating unit configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said first channel, at said position;
a second low-frequency component calculating unit configured to calculate, regarding each position along said first direction, a low-frequency component of said first-stage smoothing value of said second channel, at said position;
a high-frequency estimating unit configured to estimate a high-frequency component in said first-stage smoothing value of said second channel at said position, by adjusting the high-frequency component in said first-stage smoothing value of said first channel based on a ratio between the low-frequency component in said first-stage smoothing value of said first channel and the low-frequency component in said first-stage smoothing value of said second channel; and
a correction value calculating unit configured to calculate said intensity of said first-stage smoothing value of said second channel at said position, from said low-frequency component of said first-stage smoothing value of said second channel at each position along said first direction, and said estimated high-frequency component of said first-stage smoothing value of said second channel at said position.