我在试着计算TOSCA数据集上的测地距离矩阵。
e、 g.以下3d网格-
我尝试过使用两个python实现。在
另一个是gdist包,不幸的是,它在他们提供的玩具示例上起作用,但在我的网格(只有10000个面和5000个顶点)上不起作用。
使用gdist库时,我有以下错误:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
--------CODE SNIPPET----------
c = sio.loadmat('raw_data/TOSCA/cat0.mat')
c = c['surface'][0][0]
X = c[0]
Y = c[1]
Z = c[2]
TRIV = c[3].astype(np.int32)
vertices = np.array(zip(X, Y, Z)).astype(np.float64)
vertices = np.reshape(vertices, (vertices.shape[0], 3))
src = np.array([1], dtype=np.int32)
trg = np.array([2], dtype=np.int32)
np.random.shuffle(TRIV)
a = gdist.compute_gdist(vertices,TRIV[:5000], source_indices = src, target_indices = trg)
还有别的解决办法吗?我是不是用错了gdist或scikit fmm?
目前没有回答
相关问题 更多 >
编程相关推荐