Skip to content

Commit 86b29be

Browse files
authored
Merge pull request #698 from RIFJo/620-pixel-layout-for-camerasensorview
(feat SensorModelling) add pixel_order field
2 parents db26a7b + a92e4ac commit 86b29be

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

osi_sensorview.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,10 @@ message CameraSensorView
313313

314314
// Raw image data.
315315
//
316-
// The raw image data in the memory layout and order specified by the
317-
// camera sensor input configuration.
316+
// The raw image data in the memory layout specified by the camera
317+
// sensor input configuration. The pixel order is specified in
318+
// CameraSensorViewConfiguration.pixel_order with the
319+
// default value PIXEL_ORDER_DEFAULT (i.e. left-to-right, top-to-bottom).
318320
//
319321
optional bytes image_data = 2;
320322
}

osi_sensorviewconfiguration.proto

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,53 @@ message CameraSensorViewConfiguration
729729
//
730730
repeated WavelengthData wavelength_data = 11;
731731

732+
// Indicates if and how the the pixel data is ordered
733+
//
734+
// The default value (PIXEL_ORDER_DEFAULT) indicates standard image
735+
// pixel order (left-to-right, top-to-bottom). The other values can
736+
// be used to indicate/request mirroring (right to left or bottom to top).
737+
//
738+
// \note For rotations of the pixel data, use the camera coordinate system.
739+
//
740+
optional PixelOrder pixel_order = 12;
741+
742+
// Pixel layout
743+
//
744+
// Pixel layout documents the order of pixels in the \c image_data
745+
// in CameraSensorView.
746+
//
747+
// \note this enum does not contain an entry to do mirroring upside down
748+
// and left-to-right at the same time, because this is equivalent to a
749+
// 180-degree rotation, which should be indicated in the sensor coordinate
750+
// system.
751+
//
752+
enum PixelOrder
753+
{
754+
// Pixel data is not mirrored (Default).
755+
// Pixels are ordered left-to-right, top-to-bottom.
756+
//
757+
PIXEL_ORDER_DEFAULT = 0;
758+
759+
// Known pixel order that is not supported by OSI.
760+
// Consider proposing an additional format if using
761+
// \c #PIXEL_ORDER_OTHER.
762+
//
763+
PIXEL_ORDER_OTHER = 1;
764+
765+
// Pixels are ordered right-to-left, top-to-bottom.
766+
// Pixel data is mirrored along the vertical axis.
767+
// The image is mirrored left-to-right.
768+
//
769+
PIXEL_ORDER_RIGHT_LEFT_TOP_BOTTOM = 2;
770+
771+
// Pixels are ordered left-to-right, bottom-to-top.
772+
// Pixel data is mirrored along the horizontal axis.
773+
// The image is mirrored top-to-bottom.
774+
//
775+
PIXEL_ORDER_LEFT_RIGHT_BOTTOM_TOP = 3;
776+
}
777+
778+
732779
// Channel format.
733780
//
734781
enum ChannelFormat

0 commit comments

Comments
 (0)