diff --git a/osi_sensorview.proto b/osi_sensorview.proto index a890261a7..1dd54c459 100644 --- a/osi_sensorview.proto +++ b/osi_sensorview.proto @@ -313,8 +313,10 @@ message CameraSensorView // Raw image data. // - // The raw image data in the memory layout and order specified by the - // camera sensor input configuration. + // The raw image data in the memory layout specified by the camera + // sensor input configuration. The pixel order is specified in + // CameraSensorViewConfiguration.pixel_order with the + // default value PIXEL_ORDER_DEFAULT (i.e. left-to-right, top-to-bottom). // optional bytes image_data = 2; } diff --git a/osi_sensorviewconfiguration.proto b/osi_sensorviewconfiguration.proto index e5c45c8f7..fc3720ebc 100644 --- a/osi_sensorviewconfiguration.proto +++ b/osi_sensorviewconfiguration.proto @@ -729,6 +729,53 @@ message CameraSensorViewConfiguration // repeated WavelengthData wavelength_data = 11; + // Indicates if and how the the pixel data is ordered + // + // The default value (PIXEL_ORDER_DEFAULT) indicates standard image + // pixel order (left-to-right, top-to-bottom). The other values can + // be used to indicate/request mirroring (right to left or bottom to top). + // + // \note For rotations of the pixel data, use the camera coordinate system. + // + optional PixelOrder pixel_order = 12; + + // Pixel layout + // + // Pixel layout documents the order of pixels in the \c image_data + // in CameraSensorView. + // + // \note this enum does not contain an entry to do mirroring upside down + // and left-to-right at the same time, because this is equivalent to a + // 180-degree rotation, which should be indicated in the sensor coordinate + // system. + // + enum PixelOrder + { + // Pixel data is not mirrored (Default). + // Pixels are ordered left-to-right, top-to-bottom. + // + PIXEL_ORDER_DEFAULT = 0; + + // Known pixel order that is not supported by OSI. + // Consider proposing an additional format if using + // \c #PIXEL_ORDER_OTHER. + // + PIXEL_ORDER_OTHER = 1; + + // Pixels are ordered right-to-left, top-to-bottom. + // Pixel data is mirrored along the vertical axis. + // The image is mirrored left-to-right. + // + PIXEL_ORDER_RIGHT_LEFT_TOP_BOTTOM = 2; + + // Pixels are ordered left-to-right, bottom-to-top. + // Pixel data is mirrored along the horizontal axis. + // The image is mirrored top-to-bottom. + // + PIXEL_ORDER_LEFT_RIGHT_BOTTOM_TOP = 3; + } + + // Channel format. // enum ChannelFormat