Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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.

ValueDescription

'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

The value of this property is only used if the ReturnedColorSpace property is set to 'bayer'.

For examples showing how to convert Bayer images, see Converting Bayer Images.

Characteristics

Access

Read/write

Data type

Character vector

Values

[ {'grbg'} | 'gbrg' | 'rggb'| 'bggr']

Was this topic helpful?