1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page pointcloudprocessing_usecase4 Point Cloud Range Image Creation
5 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
7 This tutorial demonstrates how to generate 2D image from accumulated point cloud.
9 To initialize the module, one can start from the default parameter:
12 dwPointCloudRangeImageCreatorHandle_t rangeImageCreator;
13 dwPointCloudRangeImageCreatorParams params{};
14 dwPointCloudRangeImageCreator_getDefaultParams(¶ms);
15 dwPointCloudRangeImageCreator_initialize(&rangeImageCreator, ¶ms, context);
16 dwPointCloudRangeImageCreator_setCUDAStream(stream, rangeImageCreator);
19 It is expected that application allocates output image and to be successful it should have
23 dwImageProperties imageProperties{};
24 dwPointCloudRangeImageCreator_getImageProperties(&imageProperties, memoryType, rangeImageCreator);
26 dwImageHandle_t rangeImage{};
27 dwImage_create(&rangeImage, imageProperties, context);
30 If the input is an organized point cloud:
32 dwPointCloudRangeImageCreator_bindInput(organizedPointCloud, rangeImageCreator);
33 dwPointCloudRangeImageCreator_bindOutput(rangeImage, rangeImageCreator);
34 dwPointCloudRangeImageCreator_process(rangeImageCreator);
36 The result image is expected to have the same memory type. Moreover, the total pixel count of the
37 range image should be equivalent to the input organized point cloud size. That is `rangeImage.widht * rangeImage.height == organizedPointCloud.size`.
39 If the input is an unorganized point cloud, user can bind two outputs
41 dwPointCloudRangeImageCreator_bindInput(unorganizedPointCloud, rangeImageCreator);
42 dwPointCloudRangeImageCreator_bindOutput(rangeImage, rangeImageCreator);
43 dwPointCloudRangeImageCreator_bindOutputPointCloud(organizedPointCloud, rangeImageCreator);
44 dwPointCloudRangeImageCreator_process(rangeImageCreator);
47 The module not only outputs the range image but also an organized point cloud which satifies
48 `rangeImage.widht * rangeImage.height == organizedPointCloud.size`.
50 To release the module,
52 dwPointCloudRangeImageCreator_release(rangeImageCreator);
55 For more details see @ref dwx_pointcloudprocessing_sample