Ignition Rendering

API Reference

6.3.1
SegmentationCamera.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef IGNITION_RENDERING_SEGMENTATIONCAMERA_HH_
18 #define IGNITION_RENDERING_SEGMENTATIONCAMERA_HH_
19 
20 #include <functional>
21 #include <string>
22 
23 #include <ignition/common/Event.hh>
24 #include <ignition/math/Color.hh>
25 
27 
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
34  enum class SegmentationType
35  {
38  ST_SEMANTIC = 0,
39 
42  ST_PANOPTIC = 1
43  };
44 
45  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
51  class IGNITION_RENDERING_VISIBLE SegmentationCamera :
52  public virtual Camera
53  {
55  public: virtual ~SegmentationCamera() { }
56 
58  public: virtual void CreateSegmentationTexture() = 0;
59 
64  public: virtual uint8_t *SegmentationData() const = 0;
65 
71  public: virtual ignition::common::ConnectionPtr
72  ConnectNewSegmentationFrame(
73  std::function<void(const uint8_t *, unsigned int, unsigned int,
74  unsigned int, const std::string &)> _subscriber) = 0;
75 
78  public: virtual void SetSegmentationType(SegmentationType _type) = 0;
79 
82  public: virtual SegmentationType Type() const = 0;
83 
87  public: virtual void EnableColoredMap(bool _enable) = 0;
88 
91  public: virtual bool IsColoredMap() const = 0;
92 
95  public: virtual void SetBackgroundColor(const math::Color &_color) = 0;
96 
99  public: virtual void SetBackgroundLabel(int _label) = 0;
100 
103  public: virtual const math::Color &BackgroundColor() const = 0;
104 
107  public: virtual int BackgroundLabel() const = 0;
108 
116  public: virtual void LabelMapFromColoredBuffer(
117  uint8_t *_labelBuffer) const = 0;
118  };
119  }
120  }
121 }
122 #endif
Pixels of same label from different items have the same color & id.
SegmentationType
Segmentation types for Semantic / Panpoptic segmentation.
Definition: SegmentationCamera.hh:34
Poseable Segmentation camera used for rendering the scene graph. This camera is designed to produce s...
Definition: SegmentationCamera.hh:51
STL class.
Pixels of same label from different items, have different color & id. 1 channel for label id & 2 chan...
Posable camera used for rendering the scene graph.
Definition: Camera.hh:49
virtual ~SegmentationCamera()
Destructor.
Definition: SegmentationCamera.hh:55