MCPcopy Create free account
hub / github.com/DIVE128/DMVSNet / write_cam

Function write_cam

tools.py:40–57  ·  view source on GitHub ↗
(file, cam)

Source from the content-addressed store, hash-verified

38
39
40def write_cam(file, cam):
41 f = open(file, "w")
42 f.write('extrinsic\n')
43 for i in range(0, 4):
44 for j in range(0, 4):
45 f.write(str(cam[0][i][j]) + ' ')
46 f.write('\n')
47 f.write('\n')
48
49 f.write('intrinsic\n')
50 for i in range(0, 3):
51 for j in range(0, 3):
52 f.write(str(cam[1][i][j]) + ' ')
53 f.write('\n')
54
55 f.write('\n' + str(cam[1][3][0]) + ' ' + str(cam[1][3][1]) + ' ' + str(cam[1][3][2]) + ' ' + str(cam[1][3][3]) + '\n')
56
57 f.close()
58
59
60# convert a function into recursive style to handle nested dict/list/tuple variables

Callers 1

testMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected