Gazebo Rendering
API Reference
9.0.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-rendering
include
gz
rendering
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 GZ_RENDERING_SEGMENTATIONCAMERA_HH_
18
#define GZ_RENDERING_SEGMENTATIONCAMERA_HH_
19
20
#include <functional>
21
#include <string>
22
23
#include <
gz/common/Event.hh
>
24
#include <
gz/math/Color.hh
>
25
26
#include "
gz/rendering/Camera.hh
"
27
28
29
namespace
gz
30
{
31
namespace
rendering
32
{
34
enum class
SegmentationType
35
{
38
ST_SEMANTIC
= 0,
39
42
ST_PANOPTIC
= 1
43
};
44
45
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
51
class
GZ_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
gz::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