如何对点云中的导线将它分成2条线
利用的点与点之间的斜率和找导线的中心点
def read_las_line(path):
inFile = File(path, mode='r')
#raw = inFile.raw_classification
# for spec in inFile.point_format:
# print(spec.name, end=", ")
# print("成功")
R = inFile.Red
G= inFile.Green
class_cofig = inFile.Classification
Intensity = inFile.Intensity
Key_Point = inFile.Key_Point
Raw_Classification = inFile.Raw_Classification
Synthetic = inFile.Synthetic
B = inFile.Blue
header = inFile.header
#?points?=?np.vstack((inFile.x,?inFile.y,?inFile.z,?raw))
print(inFile)
points = np.vstack((inFile.x, inFile.y,inFile.z,class_cofig,R,G,B,Key_Point, ))
points = points.T
mask =(points[:,3]==10)
points = points[mask]
points=points[points[:, 0].argsort()]
points= np.array(points)
number_count = len(points)
number_midel = number_count//10000
print(points.shape)
number_numpy = 20* number_midel
#new_point = np.zeros((number_numpy,8),dtype = np.int)
number_count = len(points)
number_midel = number_count//5000
new_point =np.

本文介绍了如何使用Python对点云数据进行处理,通过计算点与点之间的斜率以及寻找导线中心点的方法,将一条导线分割为两条。主要涉及的数据处理库包括numpy。
最低0.47元/天 解锁文章
1321

被折叠的 条评论
为什么被折叠?



