How to format surface data into XYZ point cloud?

36 次查看(过去 30 天)
I have a .csv data set that is 10x22 surface data and i'd like to convert it to XYZ point cloud. What is the best way to do this in Matlab?
  3 个评论
Walter Roberson
Walter Roberson 2019-1-4
编辑:Walter Roberson 2019-1-5
to confirm you want a 3d pointcloud with 220 points ?
do you have the marginal coordinates , 10 y and 22 x?

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2019-1-5
vector_of_x = as appropriate
vector_of_y = as appropriate
[X, Y] = meshgrid(vector_of_x, vector_of_y);
points = [X(:), Y(:), z(:)];
ptCloud = pointcloud(points);
  3 个评论
Onur Kurum
Onur Kurum 2020-5-12
Hi,
I need to do the exact same thing but I don't have the Image Processing Toolbox. Is there a 'vanilla' way of doing this?
Walter Roberson
Walter Roberson 2020-5-12
pointCloud is part of the Computer Vision Toolbox
pointCloud() is a particular data type in MATLAB. If you do not have Computer Vision, then you cannot create the datatype, so it is not clear what you want to do? If you just want an array of three columns, X, Y, Z, and you are starting from a 2D array, then use the code I posted but stop after the assignment to points

请先登录,再进行评论。

更多回答(2 个)

Cris LaPierre
Cris LaPierre 2019-1-4
If you can successfully create a surface with your data using surf(X,Y,Z), the best way to create an X,Y,Z point cloud is to use scatter3(X,Y,Z).
  4 个评论
Don jaya
Don jaya 2020-4-9
I create a surface from the data i have. How to get the Z value of the surface with using only random x and y cordinates
Walter Roberson
Walter Roberson 2020-5-12
Don jaya, could you describe what your available inputs are, and what outputs you want?

请先登录,再进行评论。


flemingtb
flemingtb 2019-1-7
I've attached the data file. I need to convert this format to XYZ columns.
All that i have done so far is to get size data to know how many rows and columns the data sets have, i don't know how to format the data based on it's location in the point map though.
  3 个评论
flemingtb
flemingtb 2019-1-7
Yes that is correct, column number is (X), Row number is (Y) and (Z) data. Maybe i didn't call it the correct thing.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Point Cloud Processing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by