Bayer grid is usually what you get from CCD/CMOS sensors. All digital
Cameras interpolate from that format to RGB/YUV. Usually the equation is
a second-degree one (at least) so that you weigh the proximal few
layers of the missing color by distance (like a gaussian filter, sort
of) to get the missing components.
- Marcel
Olin Lathrop wrote:
{Quote hidden}> Mario Mendes Jr. wrote:
>
>> Does anyone here know how to get RGB from a Bayer mask image? Given the
>> array bellow,
>>
>> 1 2 3 4 5 6
>> 1 G B G B G B
>> 2 R G R G R G
>> 3 G B G B G B
>> 4 R G R G R G
>> 5 G B G B G B
>> 6 R G R G R G
>
>
> I've never heard of a "Bayer" mask, but why can't you just interpolate the
> missing components? This sounds like the obvious brute force way. Have
> you
> tried it?
>
> When green is not present, it's the average of the 4 surrounding green
> pixels. For red and blue, it's the average of either the two
> above/below or
> left/right or the four corners. There are probably more clever ways, but
> this is to trivial I would try it first and see if it's good enough.
>
>
> ******************************************************************
> Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC
> consultant in 2004 program year.
http://www.embedinc.com/products