MCPcopy Create free account
hub / github.com/MotrixLab/ADHMR / save_obj

Function save_obj

HMR-Scorer/common/utils/vis.py:123–129  ·  view source on GitHub ↗
(v, f, file_name='output.obj')

Source from the content-addressed store, hash-verified

121 cv2.waitKey(0)
122
123def save_obj(v, f, file_name='output.obj'):
124 obj_file = open(file_name, 'w')
125 for i in range(len(v)):
126 obj_file.write('v ' + str(v[i][0]) + ' ' + str(v[i][1]) + ' ' + str(v[i][2]) + '\n')
127 for i in range(len(f)):
128 obj_file.write('f ' + str(f[i][0]+1) + '/' + str(f[i][0]+1) + ' ' + str(f[i][1]+1) + '/' + str(f[i][1]+1) + ' ' + str(f[i][2]+1) + '/' + str(f[i][2]+1) + '\n')
129 obj_file.close()
130
131
132def perspective_projection(vertices, cam_param):

Callers 1

evaluateMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected