From bac64103f9bc6e88596c0b5f4235db384d98dcd2 Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Tue, 27 Jul 2021 10:56:35 +0200 Subject: [PATCH 01/10] Add first draft of additional color models Signed-off-by: Thomas Sedlmayer --- osi_common.proto | 191 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) diff --git a/osi_common.proto b/osi_common.proto index dc9de96bd..ae5c37212 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -611,3 +611,194 @@ message SpatialSignalStrength // optional double signal_strength = 3; } + +// +// \brief The description of a color within available color spaces. +// +// ColorDescription represents the visual, non-semantic appearance of an object, structure or feature within various available color spaces. +// +// Depending on the context, this may define the color of an object or structure a priori (e.g. GroundTruth objects) +// or describe a perceived color (e.g. CameraDetections). +// +message ColorDescription +{ + // Greyscale color model + // + optional ColorGrey grey = 1; + + // RGB (Red, Green, Blue) color model + // + optional ColorRGB rgb = 2; + + // RGBIR (Red, Green, Blue, Infrared) color model + // + optional ColorRGBIR rgbir = 3; + + // HSV (Hue, Saturation, Value) color model + // + optional ColorHSV hsv = 4; + + // LUV (Luminance, U-coordinate, V-coordinate) color model + // + optional ColorLUV luv = 5; + + // CMYK (Cyan, Magenta, Yellow, Key) color model + // + optional ColorCMYK cmyk = 6; +} + +// +// \brief Greyscale color model +// +// ColorGrey defines a greyscale. +// +message ColorGrey +{ + // Definition of a greyscale + // + // Range: [0,1] + // + optional double grey = 1; +} + +// +// RGB color model +// +// ColorRGB provides values for red, green and blue. +// +message ColorRGB +{ + // Red ratio + // + // Range: [0,1] + // + optional double red = 1; + + // Green ratio + // + // Range: [0,1] + // + optional double green = 2; + + // Blue ratio + // + // Range: [0,1] + // + optional double blue = 3; +} + +// +// \brief RGBIR color model +// +// ColorRGBIR provides values for red, green, blue and infrared. +// +message ColorRGBIR +{ + // Red ratio + // + // Range: [0,1] + // + optional double red = 1; + + // Green ratio + // + // Range: [0,1] + // + optional double green = 2; + + // Blue ratio + // + // Range: [0,1] + // + optional double blue = 3; + + // Infrared + // + // Range: [0,1] + // + optional double infrared = 4; +} + +// +// \brief HSV color model +// +// ColorHSV provides values for hue, saturation and value/brightness. +// +message ColorHSV +{ + // Hue + // + // Range: [0,1] + // + optional double hue = 1; + + // Saturation + // + // Range: [0,1] + // + optional double saturation = 2; + + // Value + // + // Range: [0,1] + // + optional double value = 3; +} + +// +// \brief LUV color model +// +// ColorLUV provides values for luminance, U- and V-coordinate. +// +message ColorLUV +{ + // Luminance + // + // Range: [0,1] + // + optional double luminance = 1; + + // U-coordinate + // + // Range: [0,1] + // + optional double u = 2; + + // V-Coordinate + // + // Range: [0,1] + // + optional double v = 3; +} + +// +// \brief CMYK colors model +// +// ColorCMYK provides values for cyan, magenta, yellow and key/black. +// +message ColorCMYK +{ + // Cyan ratio + // + // Range: [0,1] + // + optional double cyan = 1; + + // Magenta ratio + // + // Range: [0,1] + // + optional double magenta = 2; + + // Yellow ratio + // + // Range: [0,1] + // + optional double yellow = 3; + + // Black ratio + // + // Range: [0,1] + // + optional double key = 4; +} From 0a207740c3e5da376ec88b685801201fe25f9e3c Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Wed, 28 Jul 2021 13:22:25 +0200 Subject: [PATCH 02/10] Clarify documentation of semantic colors Signed-off-by: Thomas Sedlmayer --- osi_lane.proto | 10 ++++++++-- osi_roadmarking.proto | 11 +++++++++-- osi_trafficlight.proto | 10 ++++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/osi_lane.proto b/osi_lane.proto index 05e4bbcdf..2bed7833f 100644 --- a/osi_lane.proto +++ b/osi_lane.proto @@ -905,7 +905,10 @@ message LaneBoundary // optional Type type = 1; - // The color of the lane boundary in case of lane markings. + // The semantic color of the lane boundary in case of lane markings. + // + // \note The color types represent the semantic classification of + // lane markings only. They do not represent an actual visual appearance. // optional Color color = 2; @@ -987,10 +990,13 @@ message LaneBoundary TYPE_STRUCTURE = 13; } - // The color of the lane boundary in case of a lane markings. + // The semantic color of the lane boundary in case of a lane markings. // Lane markings that alternate in color must be represented by // individual \c LaneBoundary segments. // + // \note The color types represent the semantic color classification of + // lane markings only. They do not represent an actual visual appearance. + // enum Color { // Color of marking is unknown. Value must not be used in ground diff --git a/osi_roadmarking.proto b/osi_roadmarking.proto index 694aadefc..4e1fad571 100644 --- a/osi_roadmarking.proto +++ b/osi_roadmarking.proto @@ -113,7 +113,11 @@ message RoadMarking // optional TrafficSign.MainSign.Classification.Type traffic_main_sign_type = 2; - // The monochrome color of the road marking. + // The semantic monochrome color of the road marking. + // + // \note The color types represent the semantic color classification of + // road markings only. They do not represent an actual visual appearance. + // \note Field need not be set (or set to \c #COLOR_OTHER) // if road marking type does not require it (e.g. for \c #type == // \c #TYPE_PAINTED_TRAFFIC_SIGN). @@ -286,7 +290,10 @@ message RoadMarking TYPE_GENERIC_TEXT = 7; } - // Definition of road marking colors + // Definition of semantic road marking colors + // + // \note The color types represent the semantic classification of + // road markings only. They do not represent an actual visual appearance. // enum Color { diff --git a/osi_trafficlight.proto b/osi_trafficlight.proto index d88528cf7..8cf5ca832 100644 --- a/osi_trafficlight.proto +++ b/osi_trafficlight.proto @@ -68,7 +68,10 @@ message TrafficLight // message Classification { - // The color of the traffic light. + // The semantic color of the traffic light. + // + // \note The color types represent the semantic color classification of a + // traffic light only. They do not represent an actual visual appearance. // // \note If the color of the traffic light is known (from history or // geometrical arrangement) and the state \c #mode is @@ -116,7 +119,10 @@ message TrafficLight // optional bool is_out_of_service = 6; - // Definition of colors for traffic lights. + // Definition of semantic colors for traffic lights. + // + // \note The color types represent the semantic classification of a traffic light + // only. They do not represent an actual visual appearance. // enum Color { From d407ecbf2f2794a6f5786999b9128dbc73829bab Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Wed, 28 Jul 2021 14:49:24 +0200 Subject: [PATCH 03/10] Add new color fields, mark old ones as deprecated Signed-off-by: Thomas Sedlmayer --- osi_featuredata.proto | 9 +++++++++ osi_object.proto | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/osi_featuredata.proto b/osi_featuredata.proto index 0c9adafae..548f714a8 100644 --- a/osi_featuredata.proto +++ b/osi_featuredata.proto @@ -853,6 +853,10 @@ message CameraDetection // The dominant color of the shape. // + // \attention DEPRECATED: This color enum will be removed in version + // 4.0.0. Use the field \c #color_description (\c ColorDescription) + // instead. + // optional Color color = 28; // The probability of the shape's color. @@ -885,6 +889,11 @@ message CameraDetection // optional uint32 number_of_points = 32; + // + // The dominant color of the shape. + // + optional ColorDescription color_description = 33; + // Definition of shape dominant color. // enum Color diff --git a/osi_object.proto b/osi_object.proto index af2d9a232..485ec8f68 100644 --- a/osi_object.proto +++ b/osi_object.proto @@ -94,12 +94,21 @@ message StationaryObject // The dominating color of the material of the structure. // + // \attention DEPRECATED: This color enum will be removed in version + // 4.0.0. Use the field \c #color_description (\c ColorDescription) + // instead. + // optional Color color = 4; // The attributes of the emitting structure if stationary object is classified as such. // optional EmittingStructureAttribute emitting_structure_attribute = 5; + // + // The dominating color of the material of the structure. + // + optional ColorDescription color_description = 6; + // Definition of object types. // enum Type @@ -266,6 +275,10 @@ message StationaryObject // Definition of colors for structures. // + // \attention DEPRECATED: This color enum will be removed in version + // 4.0.0. Use \c ColorDescription instead. + // + // enum Color { // Color is unknown (must not be used in ground truth). From a9c179e92a7baeba1d4ded51f6802a3b0ed5e081 Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Mon, 2 Aug 2021 08:56:31 +0200 Subject: [PATCH 04/10] Add color description to moving objects Signed-off-by: Thomas Sedlmayer --- osi_featuredata.proto | 3 +++ osi_object.proto | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/osi_featuredata.proto b/osi_featuredata.proto index 548f714a8..328030657 100644 --- a/osi_featuredata.proto +++ b/osi_featuredata.proto @@ -896,6 +896,9 @@ message CameraDetection // Definition of shape dominant color. // + // \attention DEPRECATED: This color enum will be removed in version + // 4.0.0. Use \c ColorDescription instead. + // enum Color { // Color of the shape is unknown (must not be used in ground diff --git a/osi_object.proto b/osi_object.proto index 485ec8f68..a6389c01c 100644 --- a/osi_object.proto +++ b/osi_object.proto @@ -678,6 +678,11 @@ message MovingObject // \note OSI uses singular instead of plural for repeated field names. // repeated double assigned_lane_percentage = 2; + + // + // The dominating color of the material of the moving object. + // + optional ColorDescription color_description = 3; } // From 0b5573adb2672b0edbb0ecb3f9b6947205631ded Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Mon, 2 Aug 2021 09:03:30 +0200 Subject: [PATCH 05/10] Change unit of hue (ColorHSV) to degree Signed-off-by: Thomas Sedlmayer --- osi_common.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osi_common.proto b/osi_common.proto index ae5c37212..e4fbf03ce 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -728,7 +728,8 @@ message ColorHSV { // Hue // - // Range: [0,1] + // Unit: deg + // Range: [0,360[ // optional double hue = 1; From f37a9baf17b20fdce068099b0947b70f01cb2e09 Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Mon, 2 Aug 2021 09:19:32 +0200 Subject: [PATCH 06/10] Add color description to traffic light Signed-off-by: Thomas Sedlmayer --- osi_trafficlight.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osi_trafficlight.proto b/osi_trafficlight.proto index 8cf5ca832..1f1d23b36 100644 --- a/osi_trafficlight.proto +++ b/osi_trafficlight.proto @@ -119,6 +119,12 @@ message TrafficLight // optional bool is_out_of_service = 6; + // + // The visual color of the traffic light. This does not represent the semantic + // classification but the visual appearance. + // + optional ColorDescription color_description = 7; + // Definition of semantic colors for traffic lights. // // \note The color types represent the semantic classification of a traffic light From 7cbde88ccd5d9a7e6bcb5f46d3bbd05b0774f8e1 Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Mon, 2 Aug 2021 09:20:12 +0200 Subject: [PATCH 07/10] Add color description to lane boundaries Signed-off-by: Thomas Sedlmayer --- osi_lane.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osi_lane.proto b/osi_lane.proto index 2bed7833f..9bc70681e 100644 --- a/osi_lane.proto +++ b/osi_lane.proto @@ -922,6 +922,12 @@ message LaneBoundary // repeated Identifier limiting_structure_id = 3; + // + // The visual color of the material of the lane boundary. This does not + // represent the semantic classification but the visual appearance. + // + optional ColorDescription color_description = 4; + // The lane boundary type. // There is no special representation for double lines, e.g. solid / // solid or dashed / solid. In such cases, each lane will define its own From f7e81f46f387394a031724c6e13b45204c485c9e Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Mon, 2 Aug 2021 09:20:53 +0200 Subject: [PATCH 08/10] Add color description to road markings Signed-off-by: Thomas Sedlmayer --- osi_roadmarking.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osi_roadmarking.proto b/osi_roadmarking.proto index 4e1fad571..2d221c775 100644 --- a/osi_roadmarking.proto +++ b/osi_roadmarking.proto @@ -248,6 +248,12 @@ message RoadMarking // optional string sub_code = 11; + // + // The visual color of the material of the road marking. This does not + // represent the semantic classification but the visual appearance. + // + optional ColorDescription color_description = 12; + // Definition of road marking types. // enum Type From b060570133e734d4d393c90394d35faea5103791 Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Tue, 3 Aug 2021 19:22:08 +0200 Subject: [PATCH 09/10] Relocate color description fields Signed-off-by: Thomas Sedlmayer --- osi_detectedlane.proto | 9 +++++++++ osi_detectedobject.proto | 8 ++++++++ osi_detectedroadmarking.proto | 8 ++++++++ osi_detectedtrafficlight.proto | 8 ++++++++ osi_lane.proto | 14 ++++++++------ osi_object.proto | 21 ++++++++++----------- osi_roadmarking.proto | 14 ++++++++------ osi_trafficlight.proto | 14 ++++++++------ 8 files changed, 67 insertions(+), 29 deletions(-) diff --git a/osi_detectedlane.proto b/osi_detectedlane.proto index b1e541914..34cf5e0b2 100644 --- a/osi_detectedlane.proto +++ b/osi_detectedlane.proto @@ -4,6 +4,7 @@ option optimize_for = SPEED; import "osi_lane.proto"; import "osi_detectedobject.proto"; +import "osi_common.proto"; package osi3; @@ -104,6 +105,14 @@ message DetectedLaneBoundary // repeated double boundary_line_confidences = 5; + // The visual color of the material of the lane boundary. + // + // \note This does not represent the semantic classification but the visual + // appearance. For semantic classification of the lane boundary use the color + // field in \c CandidateLaneBoundary::classification. + // + optional ColorDescription color_description = 6; + // // \brief A candidate for a detected lane boundary as estimated by the // sensor. diff --git a/osi_detectedobject.proto b/osi_detectedobject.proto index 83a9ab598..078ee7e00 100644 --- a/osi_detectedobject.proto +++ b/osi_detectedobject.proto @@ -120,6 +120,10 @@ message DetectedStationaryObject // repeated CandidateStationaryObject candidate = 4; + // The dominating color of the material of the structure. + // + optional ColorDescription color_description = 5; + // // \brief A candidate for a detected stationary object as estimated // by the sensor. @@ -221,6 +225,10 @@ message DetectedMovingObject // repeated CandidateMovingObject candidate = 8; + // The dominating color of the material of the moving object. + // + optional ColorDescription color_description = 9; + // Additional data that is specific to radar sensors. // // \note Field needs not to be set if simulated sensor is not a radar diff --git a/osi_detectedroadmarking.proto b/osi_detectedroadmarking.proto index efd5b578d..f142a9449 100644 --- a/osi_detectedroadmarking.proto +++ b/osi_detectedroadmarking.proto @@ -59,6 +59,14 @@ message DetectedRoadMarking // repeated CandidateRoadMarking candidate = 4; + // The visual color of the material of the road marking. + // + // \note This does not represent the semantic classification but the visual + // appearance. For semantic classification of the road marking use the color + // field in \c CandidateRoadMarking::classification. + // + optional ColorDescription color_description = 5; + // // \brief A candidate for a detected road marking as estimated by the // sensor. diff --git a/osi_detectedtrafficlight.proto b/osi_detectedtrafficlight.proto index 16e27f452..acaa425a1 100644 --- a/osi_detectedtrafficlight.proto +++ b/osi_detectedtrafficlight.proto @@ -43,6 +43,14 @@ message DetectedTrafficLight // repeated CandidateTrafficLight candidate = 4; + // The visual color of the traffic light. + // + // \note This does not represent the semantic classification but the visual + // appearance. For semantic classification of the traffic light use the color + // field in \c CandidateTrafficLight::classification. + // + optional ColorDescription color_description = 5; + // // \brief A candidate for a detected traffic light as estimated by // the sensor. diff --git a/osi_lane.proto b/osi_lane.proto index 9bc70681e..5369ea69b 100644 --- a/osi_lane.proto +++ b/osi_lane.proto @@ -763,6 +763,14 @@ message LaneBoundary // repeated ExternalReference source_reference = 4; + // The visual color of the material of the lane boundary. + // + // \note This does not represent the semantic classification but the visual + // appearance. For semantic classification of the lane boundary use the color + // field in \c Classification. + // + optional ColorDescription color_description = 5; + // // \brief A single point of a lane boundary. // @@ -922,12 +930,6 @@ message LaneBoundary // repeated Identifier limiting_structure_id = 3; - // - // The visual color of the material of the lane boundary. This does not - // represent the semantic classification but the visual appearance. - // - optional ColorDescription color_description = 4; - // The lane boundary type. // There is no special representation for double lines, e.g. solid / // solid or dashed / solid. In such cases, each lane will define its own diff --git a/osi_object.proto b/osi_object.proto index a6389c01c..3030a3311 100644 --- a/osi_object.proto +++ b/osi_object.proto @@ -75,6 +75,10 @@ message StationaryObject // repeated ExternalReference source_reference = 5; + // The dominating color of the material of the structure. + // + optional ColorDescription color_description = 6; + // // \brief Classification data for a stationary object. // @@ -95,8 +99,8 @@ message StationaryObject // The dominating color of the material of the structure. // // \attention DEPRECATED: This color enum will be removed in version - // 4.0.0. Use the field \c #color_description (\c ColorDescription) - // instead. + // 4.0.0. Use the field \c #color_description (\c ColorDescription) of + // \c StationaryObject instead. // optional Color color = 4; @@ -104,11 +108,6 @@ message StationaryObject // optional EmittingStructureAttribute emitting_structure_attribute = 5; - // - // The dominating color of the material of the structure. - // - optional ColorDescription color_description = 6; - // Definition of object types. // enum Type @@ -464,6 +463,10 @@ message MovingObject // repeated ExternalReference source_reference = 10; + // The dominating color of the material of the moving object. + // + optional ColorDescription color_description = 11; + // Definition of object types. // enum Type @@ -679,10 +682,6 @@ message MovingObject // repeated double assigned_lane_percentage = 2; - // - // The dominating color of the material of the moving object. - // - optional ColorDescription color_description = 3; } // diff --git a/osi_roadmarking.proto b/osi_roadmarking.proto index 2d221c775..0b9ce9a95 100644 --- a/osi_roadmarking.proto +++ b/osi_roadmarking.proto @@ -82,6 +82,14 @@ message RoadMarking // repeated ExternalReference source_reference = 4; + // The visual color of the material of the road marking. + // + // \note This does not represent the semantic classification but the visual + // appearance. For semantic classification of the road marking use the color + // field in \c Classification. + // + optional ColorDescription color_description = 5; + // // \brief \c Classification data for a road surface marking. // @@ -248,12 +256,6 @@ message RoadMarking // optional string sub_code = 11; - // - // The visual color of the material of the road marking. This does not - // represent the semantic classification but the visual appearance. - // - optional ColorDescription color_description = 12; - // Definition of road marking types. // enum Type diff --git a/osi_trafficlight.proto b/osi_trafficlight.proto index 1f1d23b36..ace90bccd 100644 --- a/osi_trafficlight.proto +++ b/osi_trafficlight.proto @@ -63,6 +63,14 @@ message TrafficLight // repeated ExternalReference source_reference = 5; + // The visual color of the traffic light. + // + // \note This does not represent the semantic classification but the visual + // appearance. For semantic classification of the traffic light use the color + // field in \c Classification. + // + optional ColorDescription color_description = 6; + // // \brief \c Classification data for a traffic light. // @@ -119,12 +127,6 @@ message TrafficLight // optional bool is_out_of_service = 6; - // - // The visual color of the traffic light. This does not represent the semantic - // classification but the visual appearance. - // - optional ColorDescription color_description = 7; - // Definition of semantic colors for traffic lights. // // \note The color types represent the semantic classification of a traffic light From e7bf05599c8b3648d3ffbd74fa8972ff78277fc1 Mon Sep 17 00:00:00 2001 From: Thomas Sedlmayer Date: Mon, 9 Aug 2021 16:19:17 +0200 Subject: [PATCH 10/10] Add brief tag and remove spaces Signed-off-by: Thomas Sedlmayer --- osi_common.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osi_common.proto b/osi_common.proto index e4fbf03ce..01fb932f2 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -551,6 +551,7 @@ message StatePoint // optional Orientation3d orientation = 3; } + // // \brief Detailed WavelengthRange message. // @@ -662,12 +663,12 @@ message ColorGrey } // -// RGB color model +// \brief RGB color model // // ColorRGB provides values for red, green and blue. // message ColorRGB -{ +{ // Red ratio // // Range: [0,1]