Patent ID: 8704922

Claim:
A mosaic image processing method comprising the steps of: (a) acquiring a mosaic image from a single-plate color imaging element including color filters arranged on a plurality of pixels formed by photoelectric conversion elements arranged in horizontal and vertical directions, the color filters having a color filter array where all colors are periodically arranged in each line in the horizontal and vertical directions; (b) calculating weighted average values of each color through weighted average filters with predetermined filter coefficients, based on the filter coefficients of the weighted average filters and pixel values of the pixels in a local area extracted from the mosaic image corresponding to the weighted average filters, wherein a relationship between the colors of the pixels and the filter coefficients in the local area extracted from the mosaic image corresponding to the weighted average filters is set so that proportions of sums of the filter coefficients of each color in the lines in the horizontal and vertical directions are equal; (c) calculating a pixel value of another color at a pixel position of a target pixel of demosaicing processing at a center section of the weighted average filters, and interpolating a pixel value of the target pixel based on a color ratio or a color difference between the calculated weighted average values of the color and the another color of the target pixel to calculate the pixel value of the another color; and (d) repeating the steps (b) and (c) while shifting the local area extracted from the mosaic image corresponding to the weighted average filters by a target pixel unit of the demosaicing processing.