Click or drag to resize

ICameraV2SensorType Property

Type of colour information returned by the the camera sensor, Interface Version 2 only

Namespace:  ASCOM.DeviceInterface
Assembly:  ASCOM.DeviceInterfaces (in ASCOM.DeviceInterfaces.dll) Version: 3c9121baba46811fe6e53a58a05935662261416d
SensorType SensorType { get; }

Property Value

Type: SensorType

Return Value

Type: SensorType
The SensorType enum value of the camera sensor
NotConnectedExceptionMust throw an exception if the information is not available. (Some drivers may require an active connection in order to retrieve necessary information from the camera.)

May throw a PropertyNotImplementedException if the sensor type is not known.

This is only available for the Camera Interface Version 2

SensorType returns a value indicating whether the sensor is monochrome, or what Bayer matrix it encodes. If this value cannot be determined by interrogating the camera, the appropriate value may be set through the user setup dialogue or the property may return a PropertyNotImplementedException. Please note that for some cameras, changing BinX, BinY or ReadoutMode may change the apparent type of the sensor and so you should change the value returned here to match if this is the case for your camera.

The following values are defined:

0 Monochrome Camera produces monochrome array with no Bayer encoding
1 Colour Camera produces color image directly, requiring not Bayer decoding
2 RGGB Camera produces RGGB encoded Bayer array images
3 CMYG Camera produces CMYG encoded Bayer array images
4 CMYG2 Camera produces CMYG2 encoded Bayer array images
5 LRGB Camera produces Kodak TRUESENSE Bayer LRGB array images

Please note that additional values may be defined in future updates of the standard, as new Bayer matrices may be created by sensor manufacturers in the future. If this occurs, then a new enumeration value shall be defined. The pre-existing enumeration values shall not change.

SensorType can possibly change between exposures, for example if Camera.ReadoutMode is changed, and should always be checked after each exposure.

In the following definitions, R = red, G = green, B = blue, C = cyan, M = magenta, Y = yellow. The Bayer matrix is defined with X increasing from left to right, and Y increasing from top to bottom. The pattern repeats every N x M pixels for the entire pixel array, where N is the height of the Bayer matrix, and M is the width.

RGGB indicates the following matrix:

X = 0X = 1
Y = 0 R G
Y = 1 G B

CMYG indicates the following matrix:

X = 0X = 1
Y = 0 Y C
Y = 1 G M

CMYG2 indicates the following matrix:

X = 0X = 1
Y = 0 C Y
Y = 1 M G
Y = 2 C Y
Y = 3 G M

LRGB indicates the following matrix (Kodak TRUESENSE):

X = 0X = 1X = 2X = 3
Y = 0 L R L G
Y = 1 R L G L
Y = 2 L G L B
Y = 3 G L B L

The alignment of the array may be modified by BayerOffsetX and BayerOffsetY. The offset is measured from the 0,0 position in the sensor array to the upper left corner of the Bayer matrix table. Please note that the Bayer offset values are not affected by subframe settings.

For example, if a CMYG2 sensor has a Bayer matrix offset as shown below, BayerOffsetX is 0 and BayerOffsetY is 1:

X = 0X = 1
Y = 0 G M
Y = 1 C Y
Y = 2 M G
Y = 3 C Y

It is recommended that this function be called only after a connection is established with the camera hardware, to ensure that the driver is aware of the capabilities of the specific camera model.

See Also