DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

pointcloudprocessing/docs/usecase6.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page pointcloudprocessing_usecase6 Point Cloud Plane Extraction
4 
5 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
6 
7 This tutorial demonstrates how to estimate one 3D plane.
8 
9 To initialize the module,
10 ```{.cpp}
11 dwPointCloudPlaneExtractorHandle_t estimator;
12 dwPointCloudPlaneExtractorParams params{};
13 dwPointCloudPlaneExtractor_getDefaultParameters(&params);
14 dwPointCloudPlaneExtractor_initialize(&estimator, &params, context);
15 dwPointCloudPlaneExtractor_setCUDAStream(stream, estimator);
16 ```
17 
18 The plane estimation is based on ransac fitting and non-linear optimization. User can tailor `params.ransacIterationCount` and `params.optimizerIterationCount`
19 to fulfill the expected performance. `params.rotation` gives the initial guess on the transformation from the point cloud to the 3D plane. `params.boxFilterParams` controls box filter parameters applied before ransac is executed. User is able to vary size of an area and number of points picked for ransac algorithm to make it working more effectively.
20 If `params.cudaPipelineEnabled = true`, the module expects CUDA memory type point cloud.
21 
22 To get the estimated 3D plane,
23 
24 ```{.cpp}
25 dwPointCloudPlaneExtractor_bindInput(pointCloud, estimator);
26 dwPointCloudPlaneExtractor_bindOutput(inliers, outliers, plane, estimator);
27 dwPointCloudPlaneExtractor_process(estimator);
28 ```
29 
30 `inliers` is a subset of the input point cloud. It indicates the group that is used for plane estimation.
31 `outliers` is a subset of the input point cloud but mutual exclusive to `inliers`. It indicates the group that is not used
32 for plane estimation. It is not guaranteed to get estimated plane for each input point cloud. If `plane.valid = false`, it
33 means the estimated plane should not be used.
34 
35 Note: the module does not output `inliers` and `outliers` if `params.cudaPipelineEnabled = true`.
36 
37 To release the module,
38 ```{.cpp}
39 dwPointCloudPlaneExtractor_release(estimator);
40 ```
41 
42 For more details see @ref dwx_pointcloudprocessing_sample