我试图在0.5英里的圆多边形中裁剪激光雷达数据,但它不起作用。我使用的las工具"las剪辑“,但它没有给我一个结果文件。有谁知道怎么做las夹子吗?
发布于 2016-08-24 14:33:32
你可以在matlab中尝试使用多边形函数。以下是随机采样的点云和圆的样例Matlab代码。
close all; clear all;clc;
%Creating sample circle.
L = linspace(0,2.*pi,6);
xv = cos(L)';
yv = sin(L)';
%You can change here center of x,y and diameter.
r=1;x=0;y=0;
th = 0:pi/50:2*pi;
xv = r * cos(th) + x;
yv = r * sin(th) + y;
%% random Point cloud sample 3d
rng default
xq = randn(250,1);
yq = randn(250,1);
zq =randn(250,1);
% Main function Finding inside circle
[in,on] = inpolygon(xq,yq,xv,yv);
numel(xq(in))
% numel(xq(on)) % if its on the circle
%% Plot raw point cloud and circle plan view
figure
plot(xv,yv) % circle
axis equal
hold on
plot(xq(in),yq(in),'r+') % points inside
plot(xq(~in),yq(~in),'bo') % points outside
hold off
%%
k = find(in);
exportx =xq(k);
exporty = yq(k);
exportz = zq(k);
l = find(~in);
outx = xq(l);outy = yq(l);outz = zq(l);
%% Topview
figure
scatter3(exportx,exporty,exportz,'g','+')
hold on
scatter3(outx,outy,outz,'r')
title('Top View')
view(2)
hold off
% Perspective view
figure
scatter3(exportx,exporty,exportz,'g','+')
hold on
scatter3(outx,outy,outz,'r')
title('Perspektif')
view(3)
hold offimages from code
发布于 2017-03-22 21:46:09
在这方面有点晚了,但在我使用LAStools的经验中,生成的剪辑文件可以写到一些不寻常的地方-当然不是你打算放它们的地方。
尝试查看C盘和LAStools BIN文件夹-这是我的剪辑文件的版本结束的地方,尽管提供了一个完整的文件路径来存储。
https://stackoverflow.com/questions/38230824
复制相似问题