User`s guide
18 Properties — Alphabetical List
18-2
BayerSensorAlignment
Specify sensor alignment for Bayer demosaicing
Description
If the ReturnedColorSpace property is set to 'bayer', then the Image Acquisition
Toolbox software will demosaic Bayer patterns returned by the hardware. This color
space setting will interpolate Bayer pattern encoded images into standard RGB images.
If your camera uses Bayer filtering, the toolbox supports the Bayer pattern and can
return color if desired.
In order to perform the demosaicing, the toolbox needs to know the pixel alignment of the
sensor. This is the order of the red, green, and blue sensors and is normally specified by
describing the four pixels in the upper-left corner of the sensor. It is the band sensitivity
alignment of the pixels as interpreted by the camera's internal hardware. You must get
this information from the camera's documentation and then specify the value for the
alignment, as described in the following table.
There are four possible sensor alignments.
Value Description
'gbrg' The 2-by-2 sensor alignment is
green blue
red green
'grbg' The 2-by-2 sensor alignment is
green red
blue green
'bggr' The 2-by-2 sensor alignment is
blue green
green red
'rggb' The 2-by-2 sensor alignment is
red green
green blue