xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 3KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-05
  • 語言: Matlab
  • 標簽: matlab??las??點云??

資源簡介

該代碼能夠實現從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

評論

共有 條評論