资源简介
////////////////////////////////
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_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论