From dda82223dbc74a530d68a89e831ca4c700fc27cc Mon Sep 17 00:00:00 2001 From: bernatx Date: Thu, 15 Dec 2022 18:23:26 +0100 Subject: [PATCH] Rearranging labels --- .../source/carla/image/CityScapesPalette.h | 26 ++++---- LibCarla/source/carla/rpc/ObjectLabel.h | 61 ++++++++++--------- 2 files changed, 46 insertions(+), 41 deletions(-) diff --git a/LibCarla/source/carla/image/CityScapesPalette.h b/LibCarla/source/carla/image/CityScapesPalette.h index 6c23a4ece..083216e3c 100644 --- a/LibCarla/source/carla/image/CityScapesPalette.h +++ b/LibCarla/source/carla/image/CityScapesPalette.h @@ -19,25 +19,17 @@ namespace detail { // Please update documentation if you change this. uint8_t CITYSCAPES_PALETTE_MAP[][3u] = { { 0u, 0u, 0u}, // unlabeled = 0u - {110u, 190u, 160u}, // static = 1u - {170u, 120u, 50u}, // dynamic = 2u - { 55u, 90u, 80u}, // other = 3u - { 45u, 60u, 150u}, // water = 4u - {157u, 234u, 50u}, // road line = 6u + // cityscape {128u, 64u, 128u}, // road = 7u {244u, 35u, 232u}, // sidewalk = 8u { 70u, 70u, 70u}, // building = 11u {102u, 102u, 156u}, // wall = 12u - {100u, 40u, 40u}, // fence = 13u - { 81u, 0u, 81u}, // ground = 14u - {150u, 100u, 100u}, // bridge = 15u - {230u, 150u, 140u}, // rail track = 16u + {190u, 153u, 153u}, // fence = 13u {153u, 153u, 153u}, // pole = 17u - {180u, 165u, 180u}, // guard rail = 18u {250u, 170u, 30u}, // traffic light = 19u {220u, 220u, 0u}, // traffic sign = 20u {107u, 142u, 35u}, // vegetation = 21u - {145u, 170u, 100u}, // terrain = 22u + {152u, 251u, 152u}, // terrain = 22u { 70u, 130u, 180u}, // sky = 23u {220u, 20u, 60u}, // pedestrian = 24u {255u, 0u, 0u}, // rider = 25u @@ -46,7 +38,17 @@ namespace detail { { 0u, 60u, 100u}, // bus = 28u { 0u, 80u, 100u}, // train = 31u { 0u, 0u, 230u}, // motorcycle = 32u - {119u, 11u, 32u} // bicycle = 33u + {119u, 11u, 32u}, // bicycle = 33u + // custom + {110u, 190u, 160u}, // static = 1u + {170u, 120u, 50u}, // dynamic = 2u + { 55u, 90u, 80u}, // other = 3u + { 45u, 60u, 150u}, // water = 4u + {157u, 234u, 50u}, // road line = 6u + { 81u, 0u, 81u}, // ground = 14u + {150u, 100u, 100u}, // bridge = 15u + {230u, 150u, 140u}, // rail track = 16u + {180u, 165u, 180u} // guard rail = 18u //{ 0u, 0u, 90u}, // caravan //{ 0u, 0u, 110u}, // trailer diff --git a/LibCarla/source/carla/rpc/ObjectLabel.h b/LibCarla/source/carla/rpc/ObjectLabel.h index 9810bd723..4df7f79c5 100644 --- a/LibCarla/source/carla/rpc/ObjectLabel.h +++ b/LibCarla/source/carla/rpc/ObjectLabel.h @@ -14,35 +14,38 @@ namespace carla { namespace rpc { enum class CityObjectLabel : uint8_t { - None = 0u, - Static = 1u, - Dynamic = 2u, - Other = 3u, - Water = 4u, - RoadLines = 6u, - Roads = 7u, - Sidewalks = 8u, - Buildings = 11u, - Walls = 12u, - Fences = 13u, - Ground = 14u, - Bridge = 15u, - RailTrack = 16u, - Poles = 17u, - GuardRail = 18u, - TrafficLight = 19u, - TrafficSigns = 20u, - Vegetation = 21u, - Terrain = 22u, - Sky = 23u, - Pedestrians = 24u, - Rider = 25u, - Car = 26u, - Truck = 27u, - Bus = 28u, - Train = 31u, - Motorcycle = 32u, - Bicycle = 33u, + None = 0u, + // cityscape labels + Roads = 1u, + Sidewalks = 2u, + Buildings = 3u, + Walls = 4u, + Fences = 5u, + Poles = 6u, + TrafficLight = 7u, + TrafficSigns = 8u, + Vegetation = 9u, + Terrain = 10u, + Sky = 11u, + Pedestrians = 12u, + Rider = 13u, + Car = 14u, + Truck = 15u, + Bus = 16u, + Train = 17u, + Motorcycle = 18u, + Bicycle = 19u, + // custom + Static = 20u, + Dynamic = 21u, + Other = 22u, + Water = 23u, + RoadLines = 24u, + Ground = 25u, + Bridge = 26u, + RailTrack = 27u, + GuardRail = 28u, + Any = 0xFF };