DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Point Cloud Plane Extractor

Detailed Description

Defines module to extract one 3D plane nearby the sensor.

Data Structures

struct  dwPlaneExtractorBoxFilterParams
 Defines parameters for point cloud box filter. More...
 
struct  dwPointCloudExtractedPlane
 Defines extracted 3D plane. More...
 
struct  dwPointCloudPlaneExtractorParams
 Defines plane extraction parameter. More...
 

Typedefs

typedef struct dwPointCloudPlaneExtractorObject * dwPointCloudPlaneExtractorHandle_t
 

Functions

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindInput (const dwPointCloud *pointCloud, dwPointCloudPlaneExtractorHandle_t obj)
 Binds point cloud buffer to plane extractor. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindOutput (dwPointCloud *inliers, dwPointCloud *outliers, dwPointCloudExtractedPlane *outputPlane, dwPointCloudPlaneExtractorHandle_t obj)
 Binds output buffers to point cloud plane extractor. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getCUDAStream (cudaStream_t *stream, dwPointCloudPlaneExtractorHandle_t obj)
 Gets CUDA stream of point cloud plane extractor. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getDefaultParameters (dwPointCloudPlaneExtractorParams *params)
 Gets default point cloud plane extractor parameters. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_initialize (dwPointCloudPlaneExtractorHandle_t *obj, const dwPointCloudPlaneExtractorParams *params, dwContextHandle_t ctx)
 Initializes point cloud plane extractor. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_process (dwPointCloudPlaneExtractorHandle_t obj)
 Extracts 3D ground plane and stores the results to output buffer. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_release (dwPointCloudPlaneExtractorHandle_t obj)
 Releases point cloud plane extractor. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_reset (dwPointCloudPlaneExtractorHandle_t obj)
 Resets point cloud plane extractor. More...
 
DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_setCUDAStream (const cudaStream_t stream, dwPointCloudPlaneExtractorHandle_t obj)
 Sets CUDA stream of point cloud plane extractor. More...
 

Data Structure Documentation

◆ dwPlaneExtractorBoxFilterParams

struct dwPlaneExtractorBoxFilterParams
Data Fields
dwOrientedBoundingBox3f box oriented bounding box
uint32_t maxPointCount maximum number of accepted points

◆ dwPointCloudExtractedPlane

struct dwPointCloudExtractedPlane
Data Fields
dwVector3f normal normal vector of the ground plane
float32_t offset offset distance of the ground plane to the coordinate origin
dwTransformation3f transformation rotation and translation of the plane given the estimated normal vector and plane offset
bool valid If this is false, it indicates the ransac plane fitting and optimization failed to produce a 3D ground plane, user should not use the estimated normal and offset.

◆ dwPointCloudPlaneExtractorParams

struct dwPointCloudPlaneExtractorParams
Data Fields
dwPlaneExtractorBoxFilterParams boxFilterParams box filter parameters
bool cudaPipelineEnabled Setting to true will process with CUDA pipeline.
float32_t maxInlierDistance maximum inlier distance to the estimated plane
uint32_t maxInputPointCount maximum number of points in input point cloud
float32_t minInlierFraction minimum inlier percentage for ransac plane fitting
uint32_t optimizerIterationCount optimization iteration number
uint32_t ransacIterationCount ransac iteration number
dwMatrix3f rotation rotation that aligns the point cloud with ground plane

Typedef Documentation

◆ dwPointCloudPlaneExtractorHandle_t

typedef struct dwPointCloudPlaneExtractorObject* dwPointCloudPlaneExtractorHandle_t

Definition at line 58 of file PointCloudPlaneExtractor.h.

Function Documentation

◆ dwPointCloudPlaneExtractor_bindInput()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindInput ( const dwPointCloud pointCloud,
dwPointCloudPlaneExtractorHandle_t  obj 
)

Binds point cloud buffer to plane extractor.

Parameters
[in]pointCloudPointer to point cloud buffer
[in]objHandle to point cloud plane extractor
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudPlaneExtractor_bindOutput()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_bindOutput ( dwPointCloud inliers,
dwPointCloud outliers,
dwPointCloudExtractedPlane outputPlane,
dwPointCloudPlaneExtractorHandle_t  obj 
)

Binds output buffers to point cloud plane extractor.

Parameters
[out]inliersPointer to output buffer stores inlier points (optional, can be null)
[out]outliersPointer to output buffer stores outlier points (optional, can be null)
[out]outputPlanePointer to extracted 3D plane
[in]objHandle to point cloud plane extractor
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudPlaneExtractor_getCUDAStream()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getCUDAStream ( cudaStream_t *  stream,
dwPointCloudPlaneExtractorHandle_t  obj 
)

Gets CUDA stream of point cloud plane extractor.

Parameters
[out]streamPointer to CUDA stream handle
[in]objHandle to point cloud plane extractor
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudPlaneExtractor_getDefaultParameters()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_getDefaultParameters ( dwPointCloudPlaneExtractorParams params)

Gets default point cloud plane extractor parameters.

Parameters
[in]paramsPointer to point cloud plane extractor parameter
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudPlaneExtractor_initialize()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_initialize ( dwPointCloudPlaneExtractorHandle_t obj,
const dwPointCloudPlaneExtractorParams params,
dwContextHandle_t  ctx 
)

Initializes point cloud plane extractor.

Parameters
[out]objHandle to point cloud plane extractor
[in]paramsPointer to point could plane extractor parameter
[in]ctxHandle to the context
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudPlaneExtractor_process()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_process ( dwPointCloudPlaneExtractorHandle_t  obj)

Extracts 3D ground plane and stores the results to output buffer.

Parameters
[in]objHandle to point cloud plane extractor
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT - input/output buffer memory type does not match with the variable cudaPipelineEnabled in dwPointCloudPlaneExtractorParams
DW_CALL_NOT_ALLOWED - user did not bind input buffer and output plane

◆ dwPointCloudPlaneExtractor_release()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_release ( dwPointCloudPlaneExtractorHandle_t  obj)

Releases point cloud plane extractor.

Parameters
[in]objHandle to point cloud plane extractor
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudPlaneExtractor_reset()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_reset ( dwPointCloudPlaneExtractorHandle_t  obj)

Resets point cloud plane extractor.

Parameters
[in]objHandle to point cloud plane extractor
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT

◆ dwPointCloudPlaneExtractor_setCUDAStream()

DW_API_PUBLIC dwStatus dwPointCloudPlaneExtractor_setCUDAStream ( const cudaStream_t  stream,
dwPointCloudPlaneExtractorHandle_t  obj 
)

Sets CUDA stream of point cloud plane extractor.

Parameters
[in]streamHandle to CUDA stream
[in]objHandle to point cloud plane extractor
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT