Method and apparatus for image conversion
View Patent ↗A method of, and an apparatus for, image conversion. The three color channels of a Bayer mosaic image are up-interpolated from input space to output space. The pixels sampled from each two-dimensional color plane of the Bayer image are convolved with a coefficient kernel for each color. To facilitate reconstruction and resampling, the color space for a dominant pixel color of the Bayer image is effectively rotated. The generation of each color value for a given pixel coordinate is carried out in parallel using an identical convolve unit and a dedicated coefficient kernel for each color.
1. A method for up-interpolating a Bayer mosaic image from input space to output space, said Bayer mosaic image input space comprising a plurality of four-pixel blocks, each pixel in said blocks being one of three different colors with two of said four pixels in each block being a dominant color and the other two of said four pixels being non-dominant colors, said method including the steps of:
reading a two dimensional color plane of said Bayer image for each said color;
mapping said pixels of said dominant color from said input space to said output space by:
multiplying each coordinate of said input space by 1/√2; and
scaling coordinates of said input space to a normalized coefficient kernel by multiplying said coordinates by 1/√2;
mapping said pixels of said non-dominant colors by multiplying each coordinate of said input space by ½;
for each color, convolving said input space pixels with a coefficient kernel for each color; and
writing all mapped pixels to a storage location.
2. The method of claim 1 wherein said three different colors are red, green and blue.
3. The method of claim 1 or 2 wherein said dominant color is green.
4. The method of claim 1 wherein said coefficient kernel is the same for said two non-dominant colors but different for said dominant color.
5. The method of claim 1 wherein said mapping step for said dominant color further includes sampling a 4×4 pixel block.
6. An apparatus for up-interpolating a Bayer mosaic image from input space pixel values to output space pixel values, said Bayer mosaic image comprising a plurality of four-pixel blocks, each pixel in said blocks being one of three different colors with two of said four pixels in each block being a dominant color and the other two of said four pixels being non-dominant colors, said apparatus comprising:
an input buffer for each color for storing said input space pixel values;
a coefficient kernel for each color, said coefficient kernel for said dominant color being normalized;
processing means configured for:
mapping said pixels of said dominant color from said input space to said output space by multiplying each coordinate of said input space by 1/√2;
scaling coordinates of said input space to a normalized coefficient kernel by multiplying said coordinates by 1/√2; and
mapping said pixels of said non-dominant colors by multiplying each coordinate of said input space by ½;
a convolve unit for each color for convolving said input space pixel values with said kernel coefficients of each color; and
an output buffer for storing mapped pixel values.
7. The apparatus of claim 6 further comprising processing means for sampling a 4×4 pixel block for said dominant color.