Patent ID: 8018501

Claim:
An image processing apparatus that generates a color image with sampling positions where RGB pixels coincide from an RGB Bayer array image in which a sampling density of G (green) pixels is higher than a sampling density of R (red) pixels and a sampling density of B (blue) pixels and in which the sampling positions of the pixels are different, the image processing apparatus comprising: interpolation candidate calculating means for calculating M types (M is an integer 2 or more) of G interpolation candidates G t (x 0 ,y 0 ) (t=1, . . . , M) for X(x 0 ,y 0 ) when a position on the RGB Bayer array image is expressed by (x,y) (x is an integer indicative of a pixel position in a horizontal direction, while y is an integer indicative of a pixel position in a vertical direction), and an R pixel or a B pixel of a G pixel missing position (x 0 ,y 0 ) is defined as X(x 0 ,y 0 ); color difference candidate calculating means for calculating a plurality of types of color difference candidates X(x 0 ,y 0 )−G t (x 0 ,y 0 ) based on the calculated M types of G interpolation candidates G t (x 0 ,y 0 ); and optimal color differences selecting means for calculating M types of color difference similarities, based on a plurality of color difference candidates X(x 0 +n,y 0 +m)−G t (x 0 +n,y 0 +m) of X that are calculated for the surrounding positions (x 0 +n,y 0 +m) based on G interpolation candidates G t (x 0 +n,y 0 +m) that are the same type t as the G interpolation candidates G t (x 0 ,y 0 ) used to calculate the color difference candidates X(x 0 ,y 0 )−G t (x 0 ,y 0 ) and that are calculated at surrounding positions (x 0 +n,y 0 +m) (n and m are arbitrary integers that are not 0 at the same time), and based on the color difference candidates X(x 0 ,y 0 )−G t (x 0 ,y 0 ) and for selecting, as a color difference, based on the calculated M types of color differences similarities, a color difference candidate X(x 0 ,y 0 )−G p (x 0 ,y 0 )(1≦p≦M) calculated based on a G interpolation candidate G p (x 0 ,y 0 ) among the M types of G interpolation candidates G t (x 0 ,y 0 ).