Hello,
I'm working with CARLA 0.9.14 build from source.
I have 2 semantic segmentation cameras in my scene. The first schould output the typical colored image, where every object gets the color based on its tag. That works fine.
For that second semantic segmentation camera I want a different coloring. I want that every object gets the color BLACK, except for Vegetation, which should get WHITE.
My idea was to create an additional ColorPalette and use it instead of CityScapesPalette, when calling "convert" on the output image.
I did the following:
I added a new uint8_t array in root/LibCarla/source/carla/image/CityScapesPalette.h, giving every tag the Color {0u, 0u, 0u}, except for vegetation, which got {255u, 255u, 255u}.
I copied the static function GetColor(uint8_t tag) of the class CityScapesPalette in the same file, calling it GetColorVegetation(uint8_t tag) and using my custom array.
In the file root/LibCarla/source/carla/image/ColorConverter.h I copied the struct CityScapesPalette inside the class ColorConverter, calling it VegetationPalette and using image::CityScapesPalette::GetColorVegetation instead of image::CityScapesPalette::GetColor.
I called make rebuild, make PytonAPI and then make Launch
But when calling convert(carla.ColorConverter.VegetationPalette) on the image of the second semantic camera, i get the error: AttributeError: type object 'ColorConverter' has no attribute 'VegetationPalette'
Where do I have to register the new function or struct, so that I can use it in the Python API? Is that even possible?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello, I'm working with CARLA 0.9.14 build from source.
I have 2 semantic segmentation cameras in my scene. The first schould output the typical colored image, where every object gets the color based on its tag. That works fine. For that second semantic segmentation camera I want a different coloring. I want that every object gets the color BLACK, except for Vegetation, which should get WHITE. My idea was to create an additional ColorPalette and use it instead of CityScapesPalette, when calling "convert" on the output image.
I did the following:
root/LibCarla/source/carla/image/CityScapesPalette.h
, giving every tag the Color{0u, 0u, 0u}
, except for vegetation, which got{255u, 255u, 255u}
.GetColor(uint8_t tag)
of the class CityScapesPalette in the same file, calling itGetColorVegetation(uint8_t tag)
and using my custom array.root/LibCarla/source/carla/image/ColorConverter.h
I copied the structCityScapesPalette
inside the classColorConverter
, calling itVegetationPalette
and usingimage::CityScapesPalette::GetColorVegetation
instead ofimage::CityScapesPalette::GetColor
.make rebuild
,make PytonAPI
and thenmake Launch
But when calling
convert(carla.ColorConverter.VegetationPalette)
on the image of the second semantic camera, i get the error:AttributeError: type object 'ColorConverter' has no attribute 'VegetationPalette'
Where do I have to register the new function or struct, so that I can use it in the Python API? Is that even possible?
Thanks for you answers!