资源简介
简洁易懂的matlab版ply彩色模型生成工具,只需要输入点云的坐标矩阵和对应的彩色RGB数组,即可生成二进制的ply文件,代码通俗易懂,十分便捷。
代码片段和文件信息
function build_ply(outfilexyzrgb)
%outfile is the binary ply‘filename which you want to make;
%xyz is the N*3 matrix for point cloud‘s coordinate data;
%rgb is the color for every point respectively.
if(size(xyz1)~=size(rgb1))
error(‘Input xyz and rgb arguments should have same number of rows‘);
end
if(size(xyz2)~=3 | size(rgb2)~=3)
error(‘Input xyz aand rgb arguments should have 3 columns‘);
end
pt3d(:1) = xyz(:1);
pt3d(:2) = xyz(:2);
pt3d(:3) = xyz(:3);
pt3d=pt3d‘;
RGB(:1) = uint8(rgb(:1));
RGB(:2) = uint8(rgb(:2));
RGB(:3) = uint8(rgb(:3));
RGB=RGB‘;
dataChunk = [reshape(typecast(reshape(single(pt3d)1[])‘uint8‘)3*4[]); RGB];
size(dataChunk2)
file = writePLYhead(outfile size(dataChunk2));
fwrite(file dataChunk‘u
相关资源
- 天线阵的波束形成在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
- k近邻算法matlab实现
- matlab识别系统
- 神经网络分类matlab程序
- matlab正弦信号发生器的设计
- matlab程序用Hopfield网络解决TSP
- 实例matlab 编程100个常用程序
- 用MATLAB(BPSK仿真 直接扩频)
评论
共有 条评论