我有一个10000点的列表[x,y],但是它们彼此非常接近,所以我想用给定的距离阈值对这个列表进行子采样。 我不确定哪种方式最好,哪种方式正确。你知道吗
这是我的伪代码
coordinates = [x,y]
thresholdDist = 'some float value'
subsample = []
points = 'pick-some-random-points-from-coordinates'
for p in points:
for c in coordinates:
dst=EuclideanDistance(p, c)
if dst <= thresholdDist:
subsample.append(p and c)
set(subsample)
任何建议都很好。谢谢
目前没有回答
相关问题 更多 >
编程相关推荐