How to format surface data into XYZ point cloud?
조회 수: 30 (최근 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
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
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
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
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
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
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
2020년 5월 12일
Don jaya, could you describe what your available inputs are, and what outputs you want?
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Cloud Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!