DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

PointCloudPlaneExtractor.h
Go to the documentation of this file.
1 //
3 // Notice
4 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 //
9 // NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10 // information or for any infringement of patents or other rights of third parties that may
11 // result from its use. No license is granted by implication or otherwise under any patent
12 // or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13 // expressly authorized by NVIDIA. Details are subject to change without notice.
14 // This code supersedes and replaces all information previously supplied.
15 // NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16 // components in life support devices or systems without express written approval of
17 // NVIDIA CORPORATION & AFFILIATES.
18 //
19 // SPDX-FileCopyrightText: Copyright (c) 2018-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20 // SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21 //
22 // NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23 // property and proprietary rights in and to this material, related
24 // documentation and any modifications thereto. Any use, reproduction,
25 // disclosure or distribution of this material and related documentation
26 // without an express license agreement from NVIDIA CORPORATION or
27 // its affiliates is strictly prohibited.
28 //
30 
47 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
48 #define DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
49 
50 #include <dw/core/base/Types.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;
70 
77 typedef struct
78 {
79  uint32_t maxInputPointCount;
88 
92 typedef struct
93 {
97  bool valid;
101 
111 dwStatus dwPCPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t* const obj,
112  dwPointCloudPlaneExtractorParams const* const params,
113  dwContextHandle_t const ctx);
114 
122 dwStatus dwPCPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t const obj);
123 
131 dwStatus dwPCPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t const obj);
132 
141 
150 dwStatus dwPCPlaneExtractor_bindInput(dwPointCloud const* const pointCloud,
151  dwPointCloudPlaneExtractorHandle_t const obj);
160 dwStatus dwPCPlaneExtractor_getCUDAStream(cudaStream_t* const stream,
161  dwPointCloudPlaneExtractorHandle_t const obj);
162 
171 dwStatus dwPCPlaneExtractor_setCUDAStream(cudaStream_t const stream,
172  dwPointCloudPlaneExtractorHandle_t const obj);
173 
185  dwPointCloud* const outliers,
186  dwPointCloudExtractedPlane* const outputPlane,
187  dwPointCloudPlaneExtractorHandle_t const obj);
188 
198 dwStatus dwPCPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t const obj);
199 
201 // DEPRECATED API FUNCTIONS
202 
212 DW_DEPRECATED("dwPointCloudPlaneExtractor_initialize() is renamed / deprecated and will be removed in the next major release,"
213  " use dwPCPlaneExtractor_initialize() instead")
214 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
215 dwStatus dwPointCloudPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t* const obj,
216  dwPointCloudPlaneExtractorParams const* const params,
217  dwContextHandle_t const ctx);
218 
226 DW_DEPRECATED("dwPointCloudPlaneExtractor_reset() is renamed / deprecated and will be removed in the next major release,"
227  " use dwPCPlaneExtractor_reset() instead")
228 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
229 dwStatus dwPointCloudPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t const obj);
230 
238 DW_DEPRECATED("dwPointCloudPlaneExtractor_release() is renamed / deprecated and will be removed in the next major release,"
239  " use dwPCPlaneExtractor_release() instead")
240 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
241 dwStatus dwPointCloudPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t const obj);
242 
250 DW_DEPRECATED("dwPointCloudPlaneExtractor_getDefaultParameters() is renamed / deprecated and will be removed in the next major release,"
252 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
254 
263 DW_DEPRECATED("dwPointCloudPlaneExtractor_bindInput() is renamed / deprecated and will be removed in the next major release,"
264  " use dwPCPlaneExtractor_bindInput() instead")
265 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
267  dwPointCloudPlaneExtractorHandle_t const obj);
276 DW_DEPRECATED("dwPointCloudPlaneExtractor_getCUDAStream() is renamed / deprecated and will be removed in the next major release,"
277  " use dwPCPlaneExtractor_getCUDAStream() instead")
278 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
279 dwStatus dwPointCloudPlaneExtractor_getCUDAStream(cudaStream_t* const stream,
280  dwPointCloudPlaneExtractorHandle_t const obj);
281 
290 DW_DEPRECATED("dwPointCloudPlaneExtractor_setCUDAStream() is renamed / deprecated and will be removed in the next major release,"
291  " use dwPCPlaneExtractor_setCUDAStream() instead")
292 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
293 dwStatus dwPointCloudPlaneExtractor_setCUDAStream(cudaStream_t const stream,
294  dwPointCloudPlaneExtractorHandle_t const obj);
295 
306 DW_DEPRECATED("dwPointCloudPlaneExtractor_bindOutput() is renamed / deprecated and will be removed in the next major release,"
307  " use dwPCPlaneExtractor_bindOutput() instead")
308 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
310  dwPointCloud* const outliers,
311  dwPointCloudExtractedPlane* const outputPlane,
312  dwPointCloudPlaneExtractorHandle_t const obj);
313 
323 DW_DEPRECATED("dwPointCloudPlaneExtractor_process() is renamed / deprecated and will be removed in the next major release,"
324  " use dwPCPlaneExtractor_process() instead")
325 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
326 dwStatus dwPointCloudPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t const obj);
327 
328 #ifdef __cplusplus
329 }
330 #endif
331 
332 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t const obj)
Extracts 3D ground plane and stores the results to output buffer.
struct dwPointCloudPlaneExtractorObject * dwPointCloudPlaneExtractorHandle_t
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_getCUDAStream(cudaStream_t *const stream, dwPointCloudPlaneExtractorHandle_t const obj)
Gets CUDA stream of point cloud plane extractor.
float float32_t
Specifies POD types.
Definition: Types.h:70
Defines extracted 3D plane.
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_bindInput(dwPointCloud const *const pointCloud, dwPointCloudPlaneExtractorHandle_t const obj)
Binds point cloud buffer to plane extractor.
Defines point cloud data structure.
Definition: PointCloud.h:98
dwOrientedBoundingBox3f box
oriented bounding box
float32_t maxInlierDistance
maximum inlier distance to the estimated plane
Defines a three-element floating-point vector.
Definition: Types.h:323
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t *const obj, dwPointCloudPlaneExtractorParams const *const params, dwContextHandle_t const ctx)
Initializes point cloud plane extractor.
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindOutput(dwPointCloud *const inliers, dwPointCloud *const outliers, dwPointCloudExtractedPlane *const outputPlane, dwPointCloudPlaneExtractorHandle_t const obj)
Binds output buffers to point cloud plane extractor.
Defines parameters for point cloud box filter.
Data structure representing an oriented bounding box in the local object coordinate frame The box is ...
Definition: Types.h:491
Specifies a 3D rigid transformation.
Definition: Types.h:467
dwTransformation3f transformation
rotation and translation of the plane given the estimated normal vector and plane offset ...
dwVector3f normal
normal vector of the ground plane
dwStatus
Status definition.
Definition: Status.h:180
uint32_t maxInputPointCount
maximum number of points in input point cloud
dwMatrix3f rotation
rotation that aligns the point cloud with ground plane
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getDefaultParameters(dwPointCloudPlaneExtractorParams *const params)
Gets default point cloud plane extractor parameters.
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t const obj)
Resets point cloud plane extractor.
bool cudaPipelineEnabled
Setting to true will process with CUDA pipeline.
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getCUDAStream(cudaStream_t *const stream, dwPointCloudPlaneExtractorHandle_t const obj)
Gets CUDA stream of point cloud plane extractor.
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindInput(dwPointCloud const *const pointCloud, dwPointCloudPlaneExtractorHandle_t const obj)
Binds point cloud buffer to plane extractor.
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_setCUDAStream(cudaStream_t const stream, dwPointCloudPlaneExtractorHandle_t const obj)
Sets CUDA stream of point cloud plane extractor.
#define DW_DEPRECATED(msg)
Definition: Exports.h:66
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t const obj)
Releases point cloud plane extractor.
uint32_t optimizerIterationCount
optimization iteration number
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_getDefaultParameters(dwPointCloudPlaneExtractorParams *const params)
Gets default point cloud plane extractor parameters.
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_setCUDAStream(cudaStream_t const stream, dwPointCloudPlaneExtractorHandle_t const obj)
Sets CUDA stream of point cloud plane extractor.
Defines plane extraction parameter.
Defines a 3x3 matrix of floating point numbers.
Definition: Types.h:240
uint32_t ransacIterationCount
ransac iteration number
NVIDIA DriveWorks API: Point Cloud Processing
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t const obj)
Resets point cloud plane extractor.
float32_t minInlierFraction
minimum inlier percentage for ransac plane fitting
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t *const obj, dwPointCloudPlaneExtractorParams const *const params, dwContextHandle_t const ctx)
Initializes point cloud plane extractor.
bool valid
If this is false, it indicates the ransac plane fitting and optimization failed to produce a 3D groun...
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
NVIDIA DriveWorks API: Core Methods
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t const obj)
Releases point cloud plane extractor.
float32_t offset
offset distance of the ground plane to the coordinate origin
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t const obj)
Extracts 3D ground plane and stores the results to output buffer.
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_bindOutput(dwPointCloud *const inliers, dwPointCloud *const outliers, dwPointCloudExtractedPlane *const outputPlane, dwPointCloudPlaneExtractorHandle_t const obj)
Binds output buffers to point cloud plane extractor.
uint32_t maxPointCount
maximum number of accepted points
#define DW_API_PUBLIC
Definition: Exports.h:54
dwPlaneExtractorBoxFilterParams boxFilterParams
box filter parameters