MCPcopy Create free account
hub / github.com/IRMVLab/SemGauss-SLAM / viewmatrix

Function viewmatrix

eval_mesh/eval_recon.py:77–83  ·  view source on GitHub ↗
(z, up, pos)

Source from the content-addressed store, hash-verified

75
76
77def viewmatrix(z, up, pos):
78 vec2 = normalize(z)
79 vec1_avg = up
80 vec0 = normalize(np.cross(vec1_avg, vec2))
81 vec1 = normalize(np.cross(vec2, vec0))
82 m = np.stack([vec0, vec1, vec2, pos], 1)
83 return m
84
85
86def calc_2d_metric(rec_meshfile, gt_meshfile, align=True, n_imgs=1000):

Callers 1

calc_2d_metricFunction · 0.85

Calls 1

normalizeFunction · 0.85

Tested by

no test coverage detected