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>
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 dwPointCloudPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t* obj,
112  const dwPointCloudPlaneExtractorParams* params,
113  dwContextHandle_t ctx);
114 
122 dwStatus dwPointCloudPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t obj);
123 
131 dwStatus dwPointCloudPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t obj);
132 
141 
151  dwPointCloudPlaneExtractorHandle_t obj);
161  dwPointCloudPlaneExtractorHandle_t obj);
162 
171 dwStatus dwPointCloudPlaneExtractor_setCUDAStream(const cudaStream_t stream,
172  dwPointCloudPlaneExtractorHandle_t obj);
173 
185  dwPointCloud* outliers,
186  dwPointCloudExtractedPlane* outputPlane,
187  dwPointCloudPlaneExtractorHandle_t obj);
188 
198 dwStatus dwPointCloudPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t obj);
199 
200 #ifdef __cplusplus
201 }
202 #endif
203 
204 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
NVIDIA DriveWorks API: Core Types
struct dwPointCloudPlaneExtractorObject * dwPointCloudPlaneExtractorHandle_t
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_setCUDAStream(const cudaStream_t stream, dwPointCloudPlaneExtractorHandle_t obj)
Sets CUDA stream of point cloud plane extractor.
float float32_t
Specifies POD types.
Definition: Types.h:70
Defines extracted 3D plane.
Defines point cloud data structure.
Definition: PointCloud.h:68
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindOutput(dwPointCloud *inliers, dwPointCloud *outliers, dwPointCloudExtractedPlane *outputPlane, dwPointCloudPlaneExtractorHandle_t obj)
Binds output buffers to point cloud plane extractor.
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:319
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t obj)
Releases 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:486
Specifies a 3D rigid transformation.
Definition: Types.h:462
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_initialize(dwPointCloudPlaneExtractorHandle_t *obj, const dwPointCloudPlaneExtractorParams *params, dwContextHandle_t ctx)
Initializes point cloud plane extractor.
bool cudaPipelineEnabled
Setting to true will process with CUDA pipeline.
uint32_t optimizerIterationCount
optimization iteration number
Defines plane extraction parameter.
Defines a 3x3 matrix of floating point numbers.
Definition: Types.h:237
uint32_t ransacIterationCount
ransac iteration number
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t obj)
Resets point cloud plane extractor.
NVIDIA DriveWorks API: Point Cloud Processing
float32_t minInlierFraction
minimum inlier percentage for ransac plane fitting
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getDefaultParameters(dwPointCloudPlaneExtractorParams *params)
Gets default point cloud plane extractor parameters.
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 dwPointCloudPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t obj)
Extracts 3D ground plane and stores the results to output buffer.
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getCUDAStream(cudaStream_t *stream, dwPointCloudPlaneExtractorHandle_t obj)
Gets CUDA stream of point cloud plane extractor.
float32_t offset
offset distance of the ground plane to the coordinate origin
uint32_t maxPointCount
maximum number of accepted points
#define DW_API_PUBLIC
Definition: Exports.h:54
dwPlaneExtractorBoxFilterParams boxFilterParams
box filter parameters
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindInput(const dwPointCloud *pointCloud, dwPointCloudPlaneExtractorHandle_t obj)
Binds point cloud buffer to plane extractor.