Skip to content

Commit e14578f

Browse files
authored
Merge pull request #554 from thomassedlmayer/feature/ha/new-color-models
2 parents cddc509 + e7bf055 commit e14578f

10 files changed

+304
-6
lines changed

osi_common.proto

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ message StatePoint
551551
//
552552
optional Orientation3d orientation = 3;
553553
}
554+
554555
//
555556
// \brief Detailed WavelengthRange message.
556557
//
@@ -611,3 +612,195 @@ message SpatialSignalStrength
611612
//
612613
optional double signal_strength = 3;
613614
}
615+
616+
//
617+
// \brief The description of a color within available color spaces.
618+
//
619+
// ColorDescription represents the visual, non-semantic appearance of an object, structure or feature within various available color spaces.
620+
//
621+
// Depending on the context, this may define the color of an object or structure a priori (e.g. GroundTruth objects)
622+
// or describe a perceived color (e.g. CameraDetections).
623+
//
624+
message ColorDescription
625+
{
626+
// Greyscale color model
627+
//
628+
optional ColorGrey grey = 1;
629+
630+
// RGB (Red, Green, Blue) color model
631+
//
632+
optional ColorRGB rgb = 2;
633+
634+
// RGBIR (Red, Green, Blue, Infrared) color model
635+
//
636+
optional ColorRGBIR rgbir = 3;
637+
638+
// HSV (Hue, Saturation, Value) color model
639+
//
640+
optional ColorHSV hsv = 4;
641+
642+
// LUV (Luminance, U-coordinate, V-coordinate) color model
643+
//
644+
optional ColorLUV luv = 5;
645+
646+
// CMYK (Cyan, Magenta, Yellow, Key) color model
647+
//
648+
optional ColorCMYK cmyk = 6;
649+
}
650+
651+
//
652+
// \brief Greyscale color model
653+
//
654+
// ColorGrey defines a greyscale.
655+
//
656+
message ColorGrey
657+
{
658+
// Definition of a greyscale
659+
//
660+
// Range: [0,1]
661+
//
662+
optional double grey = 1;
663+
}
664+
665+
//
666+
// \brief RGB color model
667+
//
668+
// ColorRGB provides values for red, green and blue.
669+
//
670+
message ColorRGB
671+
{
672+
// Red ratio
673+
//
674+
// Range: [0,1]
675+
//
676+
optional double red = 1;
677+
678+
// Green ratio
679+
//
680+
// Range: [0,1]
681+
//
682+
optional double green = 2;
683+
684+
// Blue ratio
685+
//
686+
// Range: [0,1]
687+
//
688+
optional double blue = 3;
689+
}
690+
691+
//
692+
// \brief RGBIR color model
693+
//
694+
// ColorRGBIR provides values for red, green, blue and infrared.
695+
//
696+
message ColorRGBIR
697+
{
698+
// Red ratio
699+
//
700+
// Range: [0,1]
701+
//
702+
optional double red = 1;
703+
704+
// Green ratio
705+
//
706+
// Range: [0,1]
707+
//
708+
optional double green = 2;
709+
710+
// Blue ratio
711+
//
712+
// Range: [0,1]
713+
//
714+
optional double blue = 3;
715+
716+
// Infrared
717+
//
718+
// Range: [0,1]
719+
//
720+
optional double infrared = 4;
721+
}
722+
723+
//
724+
// \brief HSV color model
725+
//
726+
// ColorHSV provides values for hue, saturation and value/brightness.
727+
//
728+
message ColorHSV
729+
{
730+
// Hue
731+
//
732+
// Unit: deg
733+
// Range: [0,360[
734+
//
735+
optional double hue = 1;
736+
737+
// Saturation
738+
//
739+
// Range: [0,1]
740+
//
741+
optional double saturation = 2;
742+
743+
// Value
744+
//
745+
// Range: [0,1]
746+
//
747+
optional double value = 3;
748+
}
749+
750+
//
751+
// \brief LUV color model
752+
//
753+
// ColorLUV provides values for luminance, U- and V-coordinate.
754+
//
755+
message ColorLUV
756+
{
757+
// Luminance
758+
//
759+
// Range: [0,1]
760+
//
761+
optional double luminance = 1;
762+
763+
// U-coordinate
764+
//
765+
// Range: [0,1]
766+
//
767+
optional double u = 2;
768+
769+
// V-Coordinate
770+
//
771+
// Range: [0,1]
772+
//
773+
optional double v = 3;
774+
}
775+
776+
//
777+
// \brief CMYK colors model
778+
//
779+
// ColorCMYK provides values for cyan, magenta, yellow and key/black.
780+
//
781+
message ColorCMYK
782+
{
783+
// Cyan ratio
784+
//
785+
// Range: [0,1]
786+
//
787+
optional double cyan = 1;
788+
789+
// Magenta ratio
790+
//
791+
// Range: [0,1]
792+
//
793+
optional double magenta = 2;
794+
795+
// Yellow ratio
796+
//
797+
// Range: [0,1]
798+
//
799+
optional double yellow = 3;
800+
801+
// Black ratio
802+
//
803+
// Range: [0,1]
804+
//
805+
optional double key = 4;
806+
}

osi_detectedlane.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option optimize_for = SPEED;
44

55
import "osi_lane.proto";
66
import "osi_detectedobject.proto";
7+
import "osi_common.proto";
78

89
package osi3;
910

@@ -104,6 +105,14 @@ message DetectedLaneBoundary
104105
//
105106
repeated double boundary_line_confidences = 5;
106107

108+
// The visual color of the material of the lane boundary.
109+
//
110+
// \note This does not represent the semantic classification but the visual
111+
// appearance. For semantic classification of the lane boundary use the color
112+
// field in \c CandidateLaneBoundary::classification.
113+
//
114+
optional ColorDescription color_description = 6;
115+
107116
//
108117
// \brief A candidate for a detected lane boundary as estimated by the
109118
// sensor.

osi_detectedobject.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ message DetectedStationaryObject
120120
//
121121
repeated CandidateStationaryObject candidate = 4;
122122

123+
// The dominating color of the material of the structure.
124+
//
125+
optional ColorDescription color_description = 5;
126+
123127
//
124128
// \brief A candidate for a detected stationary object as estimated
125129
// by the sensor.
@@ -221,6 +225,10 @@ message DetectedMovingObject
221225
//
222226
repeated CandidateMovingObject candidate = 8;
223227

228+
// The dominating color of the material of the moving object.
229+
//
230+
optional ColorDescription color_description = 9;
231+
224232
// Additional data that is specific to radar sensors.
225233
//
226234
// \note Field needs not to be set if simulated sensor is not a radar

osi_detectedroadmarking.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ message DetectedRoadMarking
5959
//
6060
repeated CandidateRoadMarking candidate = 4;
6161

62+
// The visual color of the material of the road marking.
63+
//
64+
// \note This does not represent the semantic classification but the visual
65+
// appearance. For semantic classification of the road marking use the color
66+
// field in \c CandidateRoadMarking::classification.
67+
//
68+
optional ColorDescription color_description = 5;
69+
6270
//
6371
// \brief A candidate for a detected road marking as estimated by the
6472
// sensor.

osi_detectedtrafficlight.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ message DetectedTrafficLight
4343
//
4444
repeated CandidateTrafficLight candidate = 4;
4545

46+
// The visual color of the traffic light.
47+
//
48+
// \note This does not represent the semantic classification but the visual
49+
// appearance. For semantic classification of the traffic light use the color
50+
// field in \c CandidateTrafficLight::classification.
51+
//
52+
optional ColorDescription color_description = 5;
53+
4654
//
4755
// \brief A candidate for a detected traffic light as estimated by
4856
// the sensor.

osi_featuredata.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,10 @@ message CameraDetection
853853

854854
// The dominant color of the shape.
855855
//
856+
// \attention DEPRECATED: This color enum will be removed in version
857+
// 4.0.0. Use the field \c #color_description (\c ColorDescription)
858+
// instead.
859+
//
856860
optional Color color = 28;
857861

858862
// The probability of the shape's color.
@@ -885,8 +889,16 @@ message CameraDetection
885889
//
886890
optional uint32 number_of_points = 32;
887891

892+
//
893+
// The dominant color of the shape.
894+
//
895+
optional ColorDescription color_description = 33;
896+
888897
// Definition of shape dominant color.
889898
//
899+
// \attention DEPRECATED: This color enum will be removed in version
900+
// 4.0.0. Use \c ColorDescription instead.
901+
//
890902
enum Color
891903
{
892904
// Color of the shape is unknown (must not be used in ground

osi_lane.proto

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,14 @@ message LaneBoundary
763763
//
764764
repeated ExternalReference source_reference = 4;
765765

766+
// The visual color of the material of the lane boundary.
767+
//
768+
// \note This does not represent the semantic classification but the visual
769+
// appearance. For semantic classification of the lane boundary use the color
770+
// field in \c Classification.
771+
//
772+
optional ColorDescription color_description = 5;
773+
766774
//
767775
// \brief A single point of a lane boundary.
768776
//
@@ -905,7 +913,10 @@ message LaneBoundary
905913
//
906914
optional Type type = 1;
907915

908-
// The color of the lane boundary in case of lane markings.
916+
// The semantic color of the lane boundary in case of lane markings.
917+
//
918+
// \note The color types represent the semantic classification of
919+
// lane markings only. They do not represent an actual visual appearance.
909920
//
910921
optional Color color = 2;
911922

@@ -987,10 +998,13 @@ message LaneBoundary
987998
TYPE_STRUCTURE = 13;
988999
}
9891000

990-
// The color of the lane boundary in case of a lane markings.
1001+
// The semantic color of the lane boundary in case of a lane markings.
9911002
// Lane markings that alternate in color must be represented by
9921003
// individual \c LaneBoundary segments.
9931004
//
1005+
// \note The color types represent the semantic color classification of
1006+
// lane markings only. They do not represent an actual visual appearance.
1007+
//
9941008
enum Color
9951009
{
9961010
// Color of marking is unknown. Value must not be used in ground

0 commit comments

Comments
 (0)