Converting uint8 point cloud data into single or double xyz point cloud data

I have a dataset in which the point cloud data are in uint8 data type. It contains a lot of pointcloud cell array and inside each pointcloud array there is the lidar data in uint8 data type which of a single column containing many values ranging from 0 to 255. I want to know if this data could be converted or extracted to get the point cloud data in xyz format with 3 columns and multiple rows.

3 件のコメント

Dyuman Joshi
Dyuman Joshi 2023 年 1 月 12 日
Can you attach your data? You can do that via the paperclip button.
MANISH R
MANISH R 2023 年 1 月 16 日
Not really. The data is confidential. Sorry.
Dyuman Joshi
Dyuman Joshi 2023 年 1 月 16 日
Then give a sample data with random values.

サインインしてコメントする。

回答 (1 件)

Dhaniklal
Dhaniklal 2023 年 1 月 17 日
編集済み: Dhaniklal 2023 年 1 月 17 日
As per my understanding you have a cell array of pointClouds with you and you want to convert it to single or double.
You can use cast function for the same.
Eg. to convert to single:
newPointClouds = {};
for ix=1:length(<your_cell_array>)
newLocations = cast(<your_cell_array>{ix}.Location, single);
newPointClouds {end+1}=pointCloud(newLocations);
end
For more information on cast function, please follow the link below:
Thanks,
Dhaniklal

カテゴリ

製品

リリース

R2022b

質問済み:

2023 年 1 月 12 日

編集済み:

2023 年 1 月 17 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by