提交scripts

This commit is contained in:
hesuicong committed 2025-07-21 10:09:12 +08:00
1 parent 82caf72036
commit 07dabbd186
224 files changed
+130146

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import numpy as np
def calculate_distance(w2c1: np.ndarray, w2c2: np.ndarray) -> float:
'''
计算两个相机之间的距离
Args:
w2c1: 相机1的世界坐标到相机坐标变换矩阵
w2c2: 相机2的世界坐标到相机坐标变换矩阵
Returns:
float: 两个相机之间的距离
'''
return np.linalg.norm(w2c1[:3, 3] - w2c2[:3, 3])