资源简介
////////////////////////////////
matlab三维点坐标生成点云ply
代码片段和文件信息
function ply_write ( Elements Path Format Str )
%*****************************************************************************80
%
%% PLY_WRITE writes 3D data as a PLY file.
%
% PLY_WRITE(DATAFILENAME) writes the structure DATA as a binary
% PLY file. Every field of DATA is interpreted as an element
% and every subfield as an element property. Each subfield of
% property data must either be an array or a cell array of
% arrays. All property data in an element must have the same
% length.
%
% A common PLY data structure has the following fields:
% DATA.vertex.x = x coordinates [Nx1] real array
% DATA.vertex.y = y coordinates [Nx1] real array
% DATA.vertex.z = z coordinates [Nx1] real array
%
% DATA.face.vertex_indices = vertex index lists
% an {Mx1} cell array where each cell holds a one-
% dimesional array (of any length) of vertex indices.
% Some other common data fields:
% DATA.vertex.nx = x coordinate of normal [Nx1] real array
% DATA.vertex.ny = y coordinate of normal [Nx1] real array
% DATA.vertex.nz = z coordinate of normal [Nx1] real array
%
% DATA.edge.vertex1 = index to a vertex [Px1] integer array
% DATA.edge.vertex2 = second vertex index [Px1] integer array
% Many other fields and properties can be added. The PLY format
% is not limited to the naming in the examples above -- they are
% only the conventional naming.
%
% PLY_WRITE(DATAFILENAMEFORMAT) write the PLY with a specified
% data format where FORMAT is
% ‘ascii‘ ASCII text data
% ‘binary_little_endian‘ binary data little endian
% ‘binary_big_endian‘ binary data big endian (default)
%
% PLY_WRITE(DATAFILENAMEFORMAT‘double‘) or
%
% PLY_WRITE(DATAFILENAME‘double‘) write floating-point data as
% double precision rather than in the default single precision.
%
% Example:
% % make a cube
% clear Data;
% Data.vertex.x = [0;0;0;0;1;1;1;1];
% Data.vertex.y = [0;0;1;1;0;0;1;1];
% Data.vertex.z = [0;1;1;0;0;1;1;0];
% Data.face.vertex_indices = {[0123][7654] ...
% [0451][1562][2673][3740]};
% plywrite(Data‘cube.ply‘‘ascii‘);
%
% Licensing:
%
% This code is distributed under the GNU LGPL license.
%
% Modified:
%
% 01 March 2007
%
% Author:
%
% Pascal Getreuer 2004
%
if ( nargin < 4 )
Str = ‘‘;
if ( nargin < 3 )
Format = ‘binary_big_endian‘;
elseif strcmpi(Format‘double‘)
Str = ‘double‘;
Format = ‘binary_big_endian‘;
end
end
[ fid Msg ] = fopen ( Path ‘wt‘ );
if ( fid == -1 )
error(Msg);
end
PlyTypeNames = {‘char‘‘uchar‘‘short‘‘ushort‘‘int‘‘uint‘‘float‘‘double‘ ...
‘char8‘‘uchar8‘‘short16‘‘ushort16‘‘int32‘‘uint32‘‘float32‘‘double64‘};
FWriteTypeNames = {‘schar‘‘uchar‘‘int16‘‘uint16‘‘int32‘‘uint32‘‘single‘‘double‘};
MatlabTypeNames = {‘int8‘‘uint8‘‘int16‘‘uint16‘‘int32‘‘uint32‘‘single‘
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 46372 2018-06-15 10:20 123.ply
文件 8741 2018-06-14 11:02 ply_write.m
文件 117 2018-06-15 10:20 test.m
文件 12912 2018-06-14 10:07 x.txt
文件 19084 2018-06-14 10:18 xyz.mat
文件 12801 2018-06-14 10:07 y.txt
文件 12222 2018-06-14 10:08 z.txt
----------- --------- ---------- ----- ----
112249 7
相关资源
- 切比雪夫轨道拟合MATLAB代码
- 改进灰色马尔科夫模型估测湖北省用
- 带时间窗的车辆路径规划问题的粒子
- 步长加速法寻优迭代
- Matlab GUI图像图形基础教程
- 人眼检测、疲劳驾驶检测,MATLAB代码
- 小波神经网络MAtlab工具箱
- 可以运行的GA 算法 ,matlab 编写
- CRC32的FPGA并行实现原理及MATLAB仿真
- DWT小波变换MATLAB
- 读取jiason测高卫星nc文件matlab代码
-
MATLAB_SIMUli
nk系统仿真超级学习手册 - Matlab图像分割法
- MATLAB下求两幅图像的峰值信噪比PSNR
- IHS图像变换融合 matlab
- A* 路径规划算法 MATLAB仿真
- 多智能体一致性仿真程序
- MATLAB图片滑动窗口的程序
- 边界匹配算法MATLAB源程序
- 编码制作二维傅里叶全息图的Matlab程
- 用于形成libsvm训练集的matlab程序
- MATLAB实践GUI成绩管理系统
- JPDA 雷达目标跟踪算法源程序
- Matlab UDP数据通讯工具箱用法
- SAR方位向成像matlab代码及注释
- MIMO OFDM matlab仿真程序
- 风力发电matlab模型
- Z变换和差分方程的Matlab求解
- Chameleon算法Matlab实现
- k-均值k-means的Matlab静态实现
评论
共有 条评论