how to convert a ply format file to xyz format by using a few command lines

7 ビュー (過去 30 日間)
Peng Wang
Peng Wang 2016 年 7 月 14 日
コメント済み: Walter Roberson 2016 年 7 月 15 日
I know there's some software that do this kind of work but I need to do this conversion during the execution of a Matlab program.

回答 (1 件)

Steven Lord
Steven Lord 2016 年 7 月 15 日
  1. Identify the format that whatever created the "ply format" file used to store data in the file.
  2. Identify the format in which whatever program will need to read the "xyz format" file expects the data to be stored in the file.
  3. Create a function that reads data into MATLAB from files written in the format you identified in step 1.
  4. Create a function that writes data from MATLAB into files using the format you identified in step 2.
  5. Call the two functions you wrote in steps 3 and 4.
According to this page, most likely for step 1 you want to go here. According to this similar page I guess you might just want to use csvwrite for steps 2 and 4?
  1 件のコメント
Walter Roberson
Walter Roberson 2016 年 7 月 15 日
There are multiple File Exchange contributions to read .ply files. However, it appears that such files are designed to store face and connectivity data, whereas .xyz files appear to be based upon points. I do not know enough about either format to know what kind of conversion would be needed between the two. There also appear to be multiple xyz formats for different purposes. Depending on what the xyz file was needed for, it might be necessary to do some kind of voxelization or interpolation.

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

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by