NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
PointCloudPlaneExtractor.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2024 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 
29 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
30 #define DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
31 
32 #include <dw/core/base/Types.h>
33 #include <dw/core/context/Context.h>
34 #include <dw/pointcloudprocessing/pointcloud/PointCloud.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 typedef struct dwPointCloudPlaneExtractorObject* dwPointCloudPlaneExtractorHandle_t;
41 
47 typedef struct
48 {
49  uint32_t maxPointCount;
52 
59 typedef struct
60 {
61  uint32_t maxInputPointCount;
70 
74 typedef struct
75 {
79  bool valid;
83 
99  dwContextHandle_t const ctx);
100 
113 
126 
139 
152 dwStatus dwPCPlaneExtractor_bindInput(dwPointCloud const* const pointCloud,
166 dwStatus dwPCPlaneExtractor_getCUDAStream(cudaStream_t* const stream,
168 
181 dwStatus dwPCPlaneExtractor_setCUDAStream(cudaStream_t const stream,
183 
199  dwPointCloud* const outliers,
202 
217 
219 // DEPRECATED API FUNCTIONS
220 
230 DW_DEPRECATED("dwPointCloudPlaneExtractor_initialize() is renamed / deprecated and will be removed in the next major release,"
231  " use dwPCPlaneExtractor_initialize() instead")
232 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
233 dwStatus dwPointCloudPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t* const obj,
236 
244 DW_DEPRECATED("dwPointCloudPlaneExtractor_reset() is renamed / deprecated and will be removed in the next major release,"
245  " use dwPCPlaneExtractor_reset() instead")
246 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
247 dwStatus dwPointCloudPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t const obj);
248 
256 DW_DEPRECATED("dwPointCloudPlaneExtractor_release() is renamed / deprecated and will be removed in the next major release,"
257  " use dwPCPlaneExtractor_release() instead")
258 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
259 dwStatus dwPointCloudPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t const obj);
260 
268 DW_DEPRECATED("dwPointCloudPlaneExtractor_getDefaultParameters() is renamed / deprecated and will be removed in the next major release,"
270 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
271 dwStatus dwPointCloudPlaneExtractor_getDefaultParameters(dwPointCloudPlaneExtractorParams* const params);
272 
281 DW_DEPRECATED("dwPointCloudPlaneExtractor_bindInput() is renamed / deprecated and will be removed in the next major release,"
282  " use dwPCPlaneExtractor_bindInput() instead")
283 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
284 dwStatus dwPointCloudPlaneExtractor_bindInput(dwPointCloud const* const pointCloud,
294 DW_DEPRECATED("dwPointCloudPlaneExtractor_getCUDAStream() is renamed / deprecated and will be removed in the next major release,"
295  " use dwPCPlaneExtractor_getCUDAStream() instead")
296 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
297 dwStatus dwPointCloudPlaneExtractor_getCUDAStream(cudaStream_t* const stream,
299 
308 DW_DEPRECATED("dwPointCloudPlaneExtractor_setCUDAStream() is renamed / deprecated and will be removed in the next major release,"
309  " use dwPCPlaneExtractor_setCUDAStream() instead")
310 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
311 dwStatus dwPointCloudPlaneExtractor_setCUDAStream(cudaStream_t const stream,
313 
324 DW_DEPRECATED("dwPointCloudPlaneExtractor_bindOutput() is renamed / deprecated and will be removed in the next major release,"
325  " use dwPCPlaneExtractor_bindOutput() instead")
326 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
327 dwStatus dwPointCloudPlaneExtractor_bindOutput(dwPointCloud* const inliers,
331 
341 DW_DEPRECATED("dwPointCloudPlaneExtractor_process() is renamed / deprecated and will be removed in the next major release,"
342  " use dwPCPlaneExtractor_process() instead")
343 // coverity[misra_c_2012_rule_5_1_violation] Deprecated API
344 dwStatus dwPointCloudPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t const obj);
345 
346 #ifdef __cplusplus
347 }
348 #endif
349 
350 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUDPLANEEXTRACTOR_H_
dwPointCloudPlaneExtractorParams::cudaPipelineEnabled
bool cudaPipelineEnabled
Setting to true will process with CUDA pipeline.
Definition: PointCloudPlaneExtractor.h:67
dwPointCloudPlaneExtractorParams::optimizerIterationCount
uint32_t optimizerIterationCount
optimization iteration number
Definition: PointCloudPlaneExtractor.h:63
dwPointCloudPlaneExtractorParams
Defines plane extraction parameter.
Definition: PointCloudPlaneExtractor.h:59
dwPointCloudPlaneExtractorParams::maxInlierDistance
float32_t maxInlierDistance
maximum inlier distance to the estimated plane
Definition: PointCloudPlaneExtractor.h:65
dwPointCloud
Defines point cloud data structure.
Definition: PointCloud.h:80
dwPCPlaneExtractor_setCUDAStream
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_setCUDAStream(cudaStream_t const stream, dwPointCloudPlaneExtractorHandle_t const obj)
Sets CUDA stream of point cloud plane extractor.
dwPCPlaneExtractor_bindOutput
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.
dwPCPlaneExtractor_process
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_process(dwPointCloudPlaneExtractorHandle_t const obj)
Extracts 3D ground plane and stores the results to output buffer.
ctx
DW_API_PUBLIC dwPointCloudPlaneExtractorParams const *const const dwContextHandle_t ctx
Definition: PointCloudPlaneExtractor.h:235
dwPointCloudPlaneExtractorHandle_t
struct dwPointCloudPlaneExtractorObject * dwPointCloudPlaneExtractorHandle_t
Definition: PointCloudPlaneExtractor.h:40
dwPointCloudPlaneExtractorParams::boxFilterParams
dwPlaneExtractorBoxFilterParams boxFilterParams
box filter parameters
Definition: PointCloudPlaneExtractor.h:68
outputPlane
DW_API_PUBLIC dwPointCloud *const dwPointCloudExtractedPlane *const outputPlane
Definition: PointCloudPlaneExtractor.h:329
float32_t
float float32_t
Specifies POD types.
Definition: BasicTypes.h:41
dwVector3f
Defines a three-element floating-point vector.
Definition: MatrixTypes.h:74
dwPointCloudExtractedPlane::transformation
dwTransformation3f transformation
rotation and translation of the plane given the estimated normal vector and plane offset
Definition: PointCloudPlaneExtractor.h:76
dwPointCloudPlaneExtractorParams::ransacIterationCount
uint32_t ransacIterationCount
ransac iteration number
Definition: PointCloudPlaneExtractor.h:62
DW_DEPRECATED
DW_API_PUBLIC DW_DEPRECATED("dwPointCloudPlaneExtractor_initialize() is renamed / deprecated and will be removed in the next major release," " use dwPCPlaneExtractor_initialize() instead") dwStatus dwPointCloudPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t *const obj
Initializes point cloud plane extractor.
dwPointCloudPlaneExtractorParams::maxInputPointCount
uint32_t maxInputPointCount
maximum number of points in input point cloud
Definition: PointCloudPlaneExtractor.h:61
dwPCPlaneExtractor_release
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_release(dwPointCloudPlaneExtractorHandle_t const obj)
Releases point cloud plane extractor.
dwPlaneExtractorBoxFilterParams::box
dwOrientedBoundingBox3f box
oriented bounding box
Definition: PointCloudPlaneExtractor.h:50
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
dwPCPlaneExtractor_bindInput
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_bindInput(dwPointCloud const *const pointCloud, dwPointCloudPlaneExtractorHandle_t const obj)
Binds point cloud buffer to plane extractor.
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:79
outliers
DW_API_PUBLIC dwPointCloud *const outliers
Definition: PointCloudPlaneExtractor.h:328
dwPointCloudExtractedPlane
Defines extracted 3D plane.
Definition: PointCloudPlaneExtractor.h:74
dwMatrix3f
Defines a 3x3 matrix of floating point numbers by using only one array.
Definition: MatrixTypes.h:158
dwPlaneExtractorBoxFilterParams::maxPointCount
uint32_t maxPointCount
maximum number of accepted points
Definition: PointCloudPlaneExtractor.h:49
dwPCPlaneExtractor_getDefaultParameters
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_getDefaultParameters(dwPointCloudPlaneExtractorParams *const params)
Gets default point cloud plane extractor parameters.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwTransformation3f
Specifies a 3D rigid transformation.
Definition: MatrixTypes.h:226
dwPCPlaneExtractor_getCUDAStream
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_getCUDAStream(cudaStream_t *const stream, dwPointCloudPlaneExtractorHandle_t const obj)
Gets CUDA stream of point cloud plane extractor.
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38
dwPointCloudExtractedPlane::normal
dwVector3f normal
normal vector of the ground plane
Definition: PointCloudPlaneExtractor.h:77
dwPointCloudExtractedPlane::offset
float32_t offset
offset distance of the ground plane to the coordinate origin
Definition: PointCloudPlaneExtractor.h:78
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:120
dwPCPlaneExtractor_initialize
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_initialize(dwPointCloudPlaneExtractorHandle_t *const obj, dwPointCloudPlaneExtractorParams const *const params, dwContextHandle_t const ctx)
Initializes point cloud plane extractor.
dwOrientedBoundingBox3f
Data structure representing an oriented bounding box in the local object coordinate frame The box is ...
Definition: GeometricTypes.h:181
dwPlaneExtractorBoxFilterParams
Defines parameters for point cloud box filter.
Definition: PointCloudPlaneExtractor.h:47
dwPCPlaneExtractor_reset
DW_API_PUBLIC dwStatus dwPCPlaneExtractor_reset(dwPointCloudPlaneExtractorHandle_t const obj)
Resets point cloud plane extractor.
dwPointCloudPlaneExtractorParams::minInlierFraction
float32_t minInlierFraction
minimum inlier percentage for ransac plane fitting
Definition: PointCloudPlaneExtractor.h:64
params
DW_API_PUBLIC dwPointCloudPlaneExtractorParams const *const params
Definition: PointCloudPlaneExtractor.h:234
dwPointCloudPlaneExtractorParams::rotation
dwMatrix3f rotation
rotation that aligns the point cloud with ground plane
Definition: PointCloudPlaneExtractor.h:66