Skip to content

Commit 102ef46

Browse files
RIFJopmai
authored andcommitted
(feat SensorModelling) add pixel_order field
refers to OpenSimulationInterface#620 Adds a "pixel_order" field and enum to allow mirrored versions of the pixel layouts. This is the result of the discussions with the participants in the sensor modelling workgroup meetings. Signed-off-by: RIFJo <jochmann@rt.rif-ev.de>
1 parent db26a7b commit 102ef46

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

osi_sensorview.proto

+4-2
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 sensor
317+
// input configuration. Default pixel order is left-to-right, top-to-bottom
318+
///(think of scan lines in a TV), but modifications can be
319+
// requested/indicated in CameraSensorViewConfiguration.pixel_order.
318320
//
319321
optional bytes image_data = 2;
320322
}

osi_sensorviewconfiguration.proto

+46
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,52 @@ message CameraSensorViewConfiguration
729729
//
730730
repeated WavelengthData wavelength_data = 11;
731731

732+
// Indicates if and how the the pixel data is ordered
733+
//
734+
// By default, the pixel data is is left-to-right, top-to-bottom.
735+
//
736+
// \note for rotations of the pixel data, use the camera coordinate system
737+
//
738+
optional PixelOrder pixel_order = 12;
739+
740+
// Pixel layout
741+
//
742+
// Pixel layout documents the order of pixels in the \c image_data
743+
// in CameraSensorView.
744+
//
745+
// \note this enum does not contain an entry to do mirroring upside down
746+
// and left-to-right at the same time, because this is equivalent to a 180°
747+
// rotation, which should be indicated in the sensor coordinate system
748+
//
749+
enum PixelOrder
750+
{
751+
// Pixel order is unknown (must not be used).
752+
//
753+
PIXEL_ORDER_UNKNOWN = 0;
754+
755+
// Unspecified but unknown pixel order.
756+
// Consider proposing an additional format if using
757+
// \c #PIXEL_ORDER_OTHER.
758+
//
759+
PIXEL_ORDER_OTHER = 1;
760+
761+
// Pixel data is not mirrored (Default).
762+
// Pixels are ordered left-to-right, top-to-bottom
763+
//
764+
PIXEL_ORDER_DEFAULT = 2;
765+
766+
// Pixel data is mirrored along the vertical axis.
767+
// The image is mirrored left-to-right.
768+
//
769+
PIXEL_ORDER_MIRRORED_LEFT_RIGHT = 3;
770+
771+
// Pixel data is mirrored along the horizontal axis.
772+
// The image is mirrored top-to-bottom.
773+
//
774+
PIXEL_ORDER_MIRRORED_UP_DOWN = 4;
775+
}
776+
777+
732778
// Channel format.
733779
//
734780
enum ChannelFormat

0 commit comments

Comments
 (0)