Bayer Filter
The Bayer Filter module will rearrange the current image pixels from a Bayer format to an RGB color format. The
Bayer pixel format is used by most CCD cameras to sample red, green and blue colors using different color
sensors. These color sensors then produce an image that has the red, green and blue colors interlaced around
each other. In order to create a reasonable color representation these single channel color pixels need to
be combined in such a way as to produce a color image.
For a more in depth review of the Bayer format in addition to an interactive demo see
The Imaging Source.
Interface
Instructions
1. Select which type of interpolation mode you would like to use in creating a color image.
Nearest Neighbor - uses the nearest RGB value for each pixel
Average - uses a combined average of the nearest RGB values for each pixel
Note: In some cases the image might need to be flipped horizontally in order for the colors to be correctly produced.
This flipping causes the ordering of the RGB pixels to change which may help your specific format. Normally the Bayer
module expects pixels as
RGRGRGRGRG
GBGBGBGBGB
RGRGRGRGRG
GBGBGBGBGB
but flipping the image horizontally BEFORE the Bayer module will produce
GBGBGBGBGB
RGRGRGRGRG
GBGBGBGBGB
RGRGRGRGRG
Example
| Bayer Source Image | Colorized |
 |  |
For more information
The Imaging Source
Wikipedia - Bayer Filter
|