Patent ID: 6977681

Claim:
An image processing apparatus for generating new image data having pixel values having all color information for each interpolation point set on a two-dimensional plane, from original image data made up of many pixels which are arrayed in a matrix on the two-dimensional plane and each of which has only a pixel value representing a predetermined color information level obtained by an image sensor having individual color filters, comprising: a replacement unit for, for a pixel value of a pixel that need not be replaced by another pixel value among pixel values contained in the original image data, adding replacement information representing non-replacement of the pixel value to the pixel value, and outputting the pixel value as replacement information-added image data, and for a pixel value of a pixel that needs to be replaced by another pixel value, replacing the pixel value by a predetermined pixel value, adding replacement information indicating replacement of the pixel value to the replaced pixel value, and outputting the pixel value as replacement information-added image data; and an interpolation unit for outputting interpolated pixel values having all color information by interpolating a pixel value at an interpolation point for each color information on the basis of a predetermined arithmetic expression from pixel values of pixels of the same color falling within a predetermined interpolation region containing the interpolation point among all replacement information-added image data output from said replacement unit, and when replacement information of any pixel used for calculation indicates replacement, using an arithmetic expression different from the arithmetic expression, wherein when target calculation pixels used to calculate the interpolated pixel value include a pixel whose replacement information indicates, an arithmetic expression is used, which has a reduced weight coefficient as compared to a normal arithmetic expression for calculating the interpolated pixel value, or has a weight coefficient of 0 for the pixel or a plurality of target calculation pixels including the pixel.