资源简介
该代码能够实现从las点云中读取坐标信息、强度信息、回波次数等
代码片段和文件信息
function outfile = LASRead (infilenameoutfilenamenFields)
% LASREAD reads in files in LAS 1.1 format and outputs comma delimited text files
%
% INPUT
% infilename: input file name in LAS 1.1 format
% (for example ‘myinfile.las‘)
% outfilename: output file name in text format
% (for example ‘myoutfile.txt‘)
% nFields: default value of 1 outputs X Y and Z coordinates of the
% point - [X Y Z].
% A value of 2 gives Intensity as an additional attribute - [X Y Z I].
% A value of 3 gives the Return number and the Number of returns
% in addition to the above - [X Y Z I R N].
%
% OUTPUT
% outfile: the output matrix
%
% EXAMPLE
% A = LASRead (‘infile.las‘ ‘outfile.txt‘ 3)
%
% Cici Alexander
% September 2008 (updated 26.09.2008)
% Open the file
fid =fopen(infilename);
% Check whether the file is valid
if fid == -1
error(‘Error opening file‘)
end
% Check whether the LAS format is 1.1
% fseek(fid 24 ‘bof‘);
% VersionMajor = fread(fid1‘uchar‘);
% VersionMinor = fread(fid1‘uchar‘);
% if VersionMajor ~= 1 || VersionMinor ~= 1
% error(‘LAS format is not 1.1‘)
% end
% Read in the offset to point data
fseek(fid 96 ‘bof‘);
OffsetToPointData = fread(fid1‘uint32‘);
% Read in the scale factors and offsets required to calculate the coordinates
fseek(fid 131 ‘bof‘);
XScaleFactor = fread(fid1‘double‘);
YScaleFactor = fread(fid1‘double‘);
ZScaleFactor = fread(fid1‘double‘);
XOffset = fread(fid1‘double‘);
YOffset = fread(fid1‘double‘);
ZOffset = fread(fid1‘double‘);
% The number of bytes from the begin
- 上一篇:雷达回波加天线方向图模拟程序
- 下一篇:基于Matlab的RC一阶电路仿真
相关资源
- 线结构光中心提取算法matlab
- 基线解算的matlab源码
- 基于相位相关的图像平移检测算法m
- 指静脉处理代码
- SIMPLE算法Matlab代码
- 《无人驾驶车辆模型预测控制》书中
- 基于SIFT特征的图像配准MATLAB代码
- 多目标遗传算法matlab程序
- 布谷鸟算法的matlab代码
- MATLAB+背景减除目标检测+鱼头截取
- matlab实现文件读写波形处理,小波变
- RBF神经网络的训练 MATLAB源程序代码
- SMO_matlabfunction.rar
- agent蜂拥的实现matlab
- 如何自定义一个神经网络
- 万有引力搜索算法(Matlab)
- 标准差分进化算法多目标线性规划的
- matlab完整GUI 源程序免费
- matlab神经网络资料
- matlab,深度图转换三维点云,depthma
- matlab生成ply程序
- 测井曲线的MATLAB绘制
- 最大后验实现图像盲复原
- 小波变换 matlab程序
- SVM用于故障诊断的实现
- 基于遗传算法的投影寻踪模型Matlab源
- labview matlab 小波去噪
- 自适应控制算法-matlab编程实现
- 油位计仪表盘识别matlab代码实现
- 罚函数matlab实现
评论
共有 条评论