DriveWorks SDK Reference
3.5.78 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 
49 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
50 #define DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
51 
52 #include <dw/core/Types.h>
53 #include <dw/core/Context.h>
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 typedef struct dwPointCloudPlaneExtractorObject* dwPointCloudPlaneExtractorHandle_t;
61 
67 typedef struct
68 {
69  uint32_t maxPointCount;
72 
79 typedef struct
80 {
81  uint32_t maxInputPointCount;
90 
94 typedef struct
95 {
99  bool valid;
103 
113 dwStatus dwPointCloudPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t* obj,
114  const dwPointCloudPlaneExtractorParams* params,
115  dwContextHandle_t ctx);
116 
124 dwStatus dwPointCloudPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t obj);
125 
133 dwStatus dwPointCloudPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t obj);
134 
143 
153  dwPointCloudPlaneExtractorHandle_t obj);
163  dwPointCloudPlaneExtractorHandle_t obj);
164 
173 dwStatus dwPointCloudPlaneExtractor_setCUDAStream(const cudaStream_t stream,
174  dwPointCloudPlaneExtractorHandle_t obj);
175 
187  dwPointCloud* outliers,
188  dwPointCloudExtractedPlane* outputPlane,
189  dwPointCloudPlaneExtractorHandle_t obj);
190 
200 dwStatus dwPointCloudPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t obj);
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
struct dwPointCloudPlaneExtractorObject * dwPointCloudPlaneExtractorHandle_t
NVIDIA DriveWorks API: Core Types
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:70
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.
NVIDIA DriveWorks API: Core Methods
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:178
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:80
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:56
dwPlaneExtractorBoxFilterParams boxFilterParams
box filter parameters
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindInput(const dwPointCloud *pointCloud, dwPointCloudPlaneExtractorHandle_t obj)
Binds point cloud buffer to plane extractor.