Click or drag to resize

IVideoFrameImageArray Property

Returns a safearray of int32 containing the pixel values from the video frame. The array could be one of: ImageArray[Pixels], ImageArray[Height, Width], ImageArray[NumPlane, Pixels] or ImageArray[NumPlane, Height, Width].

Namespace:  ASCOM.DeviceInterface
Assembly:  ASCOM.DeviceInterfaces (in ASCOM.DeviceInterfaces.dll) Version: 3351c4f3fa64146a7efd5b51ed4591e32a0a5484
Syntax
Object ImageArray { get; }

Property Value

Type: Object
The image array.
Exceptions
ExceptionCondition
NotConnectedExceptionIf the device is not connected
DriverExceptionAn error occurred that is not described by one of the more specific ASCOM exceptions. Include sufficient detail in the message text to enable the issue to be accurately diagnosed by someone other than yourself.
Remarks

Must be implemented, must not throw an ASCOM.PropertyNotImplementedException.

The application must inspect the Safearray parameters to determine the dimensions and also the SensorType to determine if the image is Color or not. The following table should be used to determine the format of the data:

DimensionsSensorTypeArray Format
1; int[]Monochrome, RGGB, CMYG, CMYG2, LRGBA row major ImageArray[Pixels] of Height * Width elements. The pixels in the array start from the top left part of the image and are listed by horizontal lines/rows. The second pixel in the array is the second pixel from the first horizontal row and the second last pixel in the array is the second last pixels from the last horizontal row.
1; int[]Color

Invalid configuration.

2; int[,]Monochrome, RGGB, CMYG, CMYG2, LRGBImageArray[Height, Width] of Height x Width elements.
2; int[,]ColorImageArray[NumPlane, Pixels] of NumPlanes x Height * Width elements. The order of the three colour planes is first is R, the second is G and third is B. The pixels in second dimension of the array start from the top left part of the image and are listed by horizontal lines/rows. The second pixel is the second pixel from the first horizontal row and the second last pixel is the second last pixels from the last horizontal row.
3; int[,,]Monochrome, RGGB, CMYG, CMYG2, LRGB

Invalid configuration.

3; int[,,]ColorImageArray[NumPlane, Height, Width] of NumPlanes x Height x Width elements. The order of the three colour planes is first is R, the second is G and third is B.

In Color SensorType mode, if the application cannot handle multispectral images, it should use just the first plane.

See Also