NVIDIA DeepStream SDK API Reference
7.0 Release
lidar_3d_datatype.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4
*
5
* NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6
* property and proprietary rights in and to this material, related
7
* documentation and any modifications thereto. Any use, reproduction,
8
* disclosure or distribution of this material and related documentation
9
* without an express license agreement from NVIDIA CORPORATION or
10
* its affiliates is strictly prohibited.
11
*/
12
13
#ifndef _DS3D_COMMON_INFERENCE_DATATYPE__H
14
#define _DS3D_COMMON_INFERENCE_DATATYPE__H
15
16
#include <
ds3d/common/common.h
>
17
#include <
ds3d/common/idatatype.h
>
18
#include <
ds3d/common/func_utils.h
>
19
#include <
ds3d/common/defines.h
>
20
21
#undef DS3D_MAX_LABEL_SIZE
22
#define DS3D_MAX_LABEL_SIZE 128
23
24
/*
25
* Pointcloud Coordinate System
26
* pointcloud & box coordinate system, x -> front, y -> left, z -> up
27
*
28
*
29
* up z x front (yaw=0)
30
* ^ ^
31
* | /
32
* | /
33
* (yaw=0.5*pi) left y <------ 0
34
*/
35
namespace
ds3d
{
36
42
struct
Lidar3DBbox
{
43
float
centerX
= 0.0f;
44
float
centerY
= 0.0f;
45
float
centerZ
= 0.0f;
46
float
dx
= 0.0f;
// length, distance of x
47
float
dy
= 0.0f;
// width, distance of y
48
float
dz
= 0.0f;
// // height, distance of z
49
float
yaw
= 0.0f;
50
int
cid
= 0;
// class id
51
float
score
= 0.0f;
52
vec4f
bboxColor
= {{1.0f, 1.0f, 0, 1.0f}};
// RGBA, default value: yellow
53
char
labels
[
DS3D_MAX_LABEL_SIZE
] = {0};
54
55
Lidar3DBbox
() =
default
;
56
Lidar3DBbox
(
57
float
centerX_,
float
centerY_,
float
centerZ_,
float
length_,
float
width_,
float
height_,
58
float
yaw_,
int
cid_,
float
score_)
59
:
centerX
(centerX_),
centerY
(centerY_),
centerZ
(centerZ_),
dx
(length_),
dy
(width_),
60
dz
(height_),
yaw
(yaw_),
cid
(cid_),
score
(score_)
61
{
62
}
63
64
void
dump
()
const
{
65
LOG_DEBUG
(
"pos (%.3f %.3f %.3f) size (%.3f %.3f %.3f) score %.3f labels %s"
,
66
centerX
,
centerY
,
centerZ
,
dx
,
dy
,
dz
,
score
,
labels
);
67
}
68
};
69
75
struct
Object2DBbox
{
76
float
centerX
= 0.0f;
77
float
centerY
= 0.0f;
78
float
dx
= 0.0f;
// width, distance of x
79
float
dy
= 0.0f;
// height, distance of y
80
int
cid
= 0;
// class id
81
float
score
= 0.0f;
82
int
trackerId
= -1;
83
float
trackerScore
= 0.0f;
84
int
sourceId
= 0;
// objects in which source stream
85
vec4f
bboxColor
= {{0, 0, 0, 1.0f}};
// RGBA, black
86
char
labels
[
DS3D_MAX_LABEL_SIZE
] = {0};
87
};
88
94
struct
FusedDetection
{
95
Lidar3DBbox
obj3D
;
96
Object2DBbox
obj2D
;
97
float
score
= 0.0f;
98
vec4f
bboxColor
= {{1.0f, 0, 0, 1.0f}};
// RGBA, red
99
char
labels
[
DS3D_MAX_LABEL_SIZE
] = {0};
100
};
101
102
}
// namespace ds3d
103
104
#endif
ds3d::FusedDetection
Object fused bounding box description.
Definition:
lidar_3d_datatype.h:94
ds3d::Object2DBbox::trackerId
int trackerId
Definition:
lidar_3d_datatype.h:82
ds3d::FusedDetection::labels
char labels[DS3D_MAX_LABEL_SIZE]
Definition:
lidar_3d_datatype.h:99
ds3d::Lidar3DBbox::yaw
float yaw
Definition:
lidar_3d_datatype.h:49
ds3d::Lidar3DBbox::bboxColor
vec4f bboxColor
Definition:
lidar_3d_datatype.h:52
ds3d::FusedDetection::obj2D
Object2DBbox obj2D
Definition:
lidar_3d_datatype.h:96
ds3d::FusedDetection::obj3D
Lidar3DBbox obj3D
Definition:
lidar_3d_datatype.h:95
LOG_DEBUG
#define LOG_DEBUG
Definition:
logging.h:19
ds3d::Lidar3DBbox::Lidar3DBbox
Lidar3DBbox()=default
ds3d::Object2DBbox::labels
char labels[DS3D_MAX_LABEL_SIZE]
Definition:
lidar_3d_datatype.h:86
ds3d::Lidar3DBbox::cid
int cid
Definition:
lidar_3d_datatype.h:50
ds3d::Object2DBbox::trackerScore
float trackerScore
Definition:
lidar_3d_datatype.h:83
ds3d::Object2DBbox::centerX
float centerX
Definition:
lidar_3d_datatype.h:76
defines.h
ds3d::Lidar3DBbox::dx
float dx
Definition:
lidar_3d_datatype.h:46
ds3d::Object2DBbox::dx
float dx
Definition:
lidar_3d_datatype.h:78
ds3d::Object2DBbox
Object 2D bounding box description.
Definition:
lidar_3d_datatype.h:75
ds3d::Lidar3DBbox::labels
char labels[DS3D_MAX_LABEL_SIZE]
Definition:
lidar_3d_datatype.h:53
ds3d::Lidar3DBbox::score
float score
Definition:
lidar_3d_datatype.h:51
ds3d::Object2DBbox::bboxColor
vec4f bboxColor
Definition:
lidar_3d_datatype.h:85
ds3d::Object2DBbox::centerY
float centerY
Definition:
lidar_3d_datatype.h:77
ds3d::FusedDetection::score
float score
Definition:
lidar_3d_datatype.h:97
ds3d::Lidar3DBbox::dump
void dump() const
Definition:
lidar_3d_datatype.h:64
ds3d::Object2DBbox::score
float score
Definition:
lidar_3d_datatype.h:81
ds3d::Lidar3DBbox::Lidar3DBbox
Lidar3DBbox(float centerX_, float centerY_, float centerZ_, float length_, float width_, float height_, float yaw_, int cid_, float score_)
Definition:
lidar_3d_datatype.h:56
common.h
ds3d::Lidar3DBbox::dy
float dy
Definition:
lidar_3d_datatype.h:47
ds3d::FusedDetection::bboxColor
vec4f bboxColor
Definition:
lidar_3d_datatype.h:98
ds3d::Lidar3DBbox::dz
float dz
Definition:
lidar_3d_datatype.h:48
ds3d::Lidar3DBbox::centerX
float centerX
Definition:
lidar_3d_datatype.h:43
idatatype.h
func_utils.h
ds3d::__xyzw
Definition:
idatatype.h:26
DS3D_MAX_LABEL_SIZE
#define DS3D_MAX_LABEL_SIZE
Definition:
lidar_3d_datatype.h:22
ds3d::Object2DBbox::sourceId
int sourceId
Definition:
lidar_3d_datatype.h:84
ds3d::Object2DBbox::dy
float dy
Definition:
lidar_3d_datatype.h:79
ds3d::Object2DBbox::cid
int cid
Definition:
lidar_3d_datatype.h:80
ds3d
Definition:
lidar_3d_datatype.h:35
ds3d::Lidar3DBbox
Object 3D bounding box description.
Definition:
lidar_3d_datatype.h:42
ds3d::Lidar3DBbox::centerZ
float centerZ
Definition:
lidar_3d_datatype.h:45
ds3d::Lidar3DBbox::centerY
float centerY
Definition:
lidar_3d_datatype.h:44
Advance Information | Subject to Change | Generated by NVIDIA | Thu May 2 2024 13:33:37 | PR-09318-R32