DriveWorks SDK Reference
4.0.0 Release
For Test and Development only
PointCloudPlaneExtractor.h
Go to the documentation of this file.
1
// This code contains NVIDIA Confidential Information and is disclosed
3
// under the Mutual Non-Disclosure Agreement.
4
//
5
// Notice
6
// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7
// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9
// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10
//
11
// NVIDIA Corporation assumes no responsibility for the consequences of use of such
12
// information or for any infringement of patents or other rights of third parties that may
13
// result from its use. No license is granted by implication or otherwise under any patent
14
// or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15
// expressly authorized by NVIDIA. Details are subject to change without notice.
16
// This code supersedes and replaces all information previously supplied.
17
// NVIDIA Corporation products are not authorized for use as critical
18
// components in life support devices or systems without express written approval of
19
// NVIDIA Corporation.
20
//
21
// Copyright (c) 2018-2019 NVIDIA Corporation. All rights reserved.
22
//
23
// NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24
// rights in and to this software and related documentation and any modifications thereto.
25
// Any use, reproduction, disclosure or distribution of this software and related
26
// documentation without an express license agreement from NVIDIA Corporation is
27
// strictly prohibited.
28
//
30
47
#ifndef DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
48
#define DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
49
50
#include <
dw/core/base/Types.h
>
51
#include <
dw/core/context/Context.h
>
52
#include <
dw/pointcloudprocessing/pointcloud/PointCloud.h
>
53
54
#ifdef __cplusplus
55
extern
"C"
{
56
#endif
57
58
typedef
struct
dwPointCloudPlaneExtractorObject*
dwPointCloudPlaneExtractorHandle_t
;
59
65
typedef
struct
66
{
67
uint32_t
maxPointCount
;
68
dwOrientedBoundingBox3f
box
;
69
}
dwPlaneExtractorBoxFilterParams
;
70
77
typedef
struct
78
{
79
uint32_t
maxInputPointCount
;
80
uint32_t
ransacIterationCount
;
81
uint32_t
optimizerIterationCount
;
82
float32_t
minInlierFraction
;
83
float32_t
maxInlierDistance
;
84
dwMatrix3f
rotation
;
85
bool
cudaPipelineEnabled
;
86
dwPlaneExtractorBoxFilterParams
boxFilterParams
;
87
}
dwPointCloudPlaneExtractorParams
;
88
92
typedef
struct
93
{
94
dwTransformation3f
transformation
;
95
dwVector3f
normal
;
96
float32_t
offset
;
97
bool
valid
;
98
}
dwPointCloudExtractedPlane
;
101
110
DW_API_PUBLIC
111
dwStatus
dwPointCloudPlaneExtractor_initialize
(dwPointCloudPlaneExtractorHandle_t* obj,
112
const
dwPointCloudPlaneExtractorParams
* params,
113
dwContextHandle_t
ctx);
114
121
DW_API_PUBLIC
122
dwStatus
dwPointCloudPlaneExtractor_reset
(dwPointCloudPlaneExtractorHandle_t obj);
123
130
DW_API_PUBLIC
131
dwStatus
dwPointCloudPlaneExtractor_release
(dwPointCloudPlaneExtractorHandle_t obj);
132
139
DW_API_PUBLIC
140
dwStatus
dwPointCloudPlaneExtractor_getDefaultParameters
(
dwPointCloudPlaneExtractorParams
* params);
141
149
DW_API_PUBLIC
150
dwStatus
dwPointCloudPlaneExtractor_bindInput
(
const
dwPointCloud
* pointCloud,
151
dwPointCloudPlaneExtractorHandle_t obj);
159
DW_API_PUBLIC
160
dwStatus
dwPointCloudPlaneExtractor_getCUDAStream
(cudaStream_t* stream,
161
dwPointCloudPlaneExtractorHandle_t obj);
162
170
DW_API_PUBLIC
171
dwStatus
dwPointCloudPlaneExtractor_setCUDAStream
(
const
cudaStream_t stream,
172
dwPointCloudPlaneExtractorHandle_t obj);
173
183
DW_API_PUBLIC
184
dwStatus
dwPointCloudPlaneExtractor_bindOutput
(
dwPointCloud
* inliers,
185
dwPointCloud
* outliers,
186
dwPointCloudExtractedPlane
* outputPlane,
187
dwPointCloudPlaneExtractorHandle_t obj);
188
197
DW_API_PUBLIC
198
dwStatus
dwPointCloudPlaneExtractor_process
(dwPointCloudPlaneExtractorHandle_t obj);
199
200
#ifdef __cplusplus
201
}
202
#endif
203
204
#endif // DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
Types.h
NVIDIA DriveWorks API: Core Types
dwPointCloudPlaneExtractorHandle_t
struct dwPointCloudPlaneExtractorObject * dwPointCloudPlaneExtractorHandle_t
Definition:
PointCloudPlaneExtractor.h:58
dwPointCloudPlaneExtractor_setCUDAStream
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_setCUDAStream(const cudaStream_t stream, dwPointCloudPlaneExtractorHandle_t obj)
Sets CUDA stream of point cloud plane extractor.
float32_t
float float32_t
Specifies POD types.
Definition:
Types.h:70
dwPointCloudExtractedPlane
Defines extracted 3D plane.
Definition:
PointCloudPlaneExtractor.h:92
dwPointCloud
Defines point cloud data structure.
Definition:
PointCloud.h:68
dwPointCloudPlaneExtractor_bindOutput
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindOutput(dwPointCloud *inliers, dwPointCloud *outliers, dwPointCloudExtractedPlane *outputPlane, dwPointCloudPlaneExtractorHandle_t obj)
Binds output buffers to point cloud plane extractor.
dwPlaneExtractorBoxFilterParams::box
dwOrientedBoundingBox3f box
oriented bounding box
Definition:
PointCloudPlaneExtractor.h:68
dwPointCloudPlaneExtractorParams::maxInlierDistance
float32_t maxInlierDistance
maximum inlier distance to the estimated plane
Definition:
PointCloudPlaneExtractor.h:83
dwVector3f
Defines a three-element floating-point vector.
Definition:
Types.h:319
dwPointCloudPlaneExtractor_release
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t obj)
Releases point cloud plane extractor.
dwPlaneExtractorBoxFilterParams
Defines parameters for point cloud box filter.
Definition:
PointCloudPlaneExtractor.h:65
dwOrientedBoundingBox3f
Data structure representing an oriented bounding box in the local object coordinate frame The box is ...
Definition:
Types.h:486
dwTransformation3f
Specifies a 3D rigid transformation.
Definition:
Types.h:462
dwPointCloudExtractedPlane::transformation
dwTransformation3f transformation
rotation and translation of the plane given the estimated normal vector and plane offset ...
Definition:
PointCloudPlaneExtractor.h:94
dwPointCloudExtractedPlane::normal
dwVector3f normal
normal vector of the ground plane
Definition:
PointCloudPlaneExtractor.h:95
dwStatus
dwStatus
Status definition.
Definition:
Status.h:180
dwPointCloudPlaneExtractorParams::maxInputPointCount
uint32_t maxInputPointCount
maximum number of points in input point cloud
Definition:
PointCloudPlaneExtractor.h:79
dwPointCloudPlaneExtractorParams::rotation
dwMatrix3f rotation
rotation that aligns the point cloud with ground plane
Definition:
PointCloudPlaneExtractor.h:84
dwPointCloudPlaneExtractor_initialize
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t *obj, const dwPointCloudPlaneExtractorParams *params, dwContextHandle_t ctx)
Initializes point cloud plane extractor.
dwPointCloudPlaneExtractorParams::cudaPipelineEnabled
bool cudaPipelineEnabled
Setting to true will process with CUDA pipeline.
Definition:
PointCloudPlaneExtractor.h:85
dwPointCloudPlaneExtractorParams::optimizerIterationCount
uint32_t optimizerIterationCount
optimization iteration number
Definition:
PointCloudPlaneExtractor.h:81
dwPointCloudPlaneExtractorParams
Defines plane extraction parameter.
Definition:
PointCloudPlaneExtractor.h:77
dwMatrix3f
Defines a 3x3 matrix of floating point numbers.
Definition:
Types.h:237
dwPointCloudPlaneExtractorParams::ransacIterationCount
uint32_t ransacIterationCount
ransac iteration number
Definition:
PointCloudPlaneExtractor.h:80
dwPointCloudPlaneExtractor_reset
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t obj)
Resets point cloud plane extractor.
PointCloud.h
NVIDIA DriveWorks API: Point Cloud Processing
dwPointCloudPlaneExtractorParams::minInlierFraction
float32_t minInlierFraction
minimum inlier percentage for ransac plane fitting
Definition:
PointCloudPlaneExtractor.h:82
dwPointCloudPlaneExtractor_getDefaultParameters
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getDefaultParameters(dwPointCloudPlaneExtractorParams *params)
Gets default point cloud plane extractor parameters.
dwPointCloudExtractedPlane::valid
bool valid
If this is false, it indicates the ransac plane fitting and optimization failed to produce a 3D groun...
Definition:
PointCloudPlaneExtractor.h:97
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition:
Context.h:79
Context.h
NVIDIA DriveWorks API: Core Methods
dwPointCloudPlaneExtractor_process
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t obj)
Extracts 3D ground plane and stores the results to output buffer.
dwPointCloudPlaneExtractor_getCUDAStream
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getCUDAStream(cudaStream_t *stream, dwPointCloudPlaneExtractorHandle_t obj)
Gets CUDA stream of point cloud plane extractor.
dwPointCloudExtractedPlane::offset
float32_t offset
offset distance of the ground plane to the coordinate origin
Definition:
PointCloudPlaneExtractor.h:96
dwPlaneExtractorBoxFilterParams::maxPointCount
uint32_t maxPointCount
maximum number of accepted points
Definition:
PointCloudPlaneExtractor.h:67
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition:
Exports.h:54
dwPointCloudPlaneExtractorParams::boxFilterParams
dwPlaneExtractorBoxFilterParams boxFilterParams
box filter parameters
Definition:
PointCloudPlaneExtractor.h:86
dwPointCloudPlaneExtractor_bindInput
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindInput(const dwPointCloud *pointCloud, dwPointCloudPlaneExtractorHandle_t obj)
Binds point cloud buffer to plane extractor.
Advance Information | Subject to Change | Prepared and Provided under NDA | Generated by NVIDIA | PR-08397-V5.0