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

Function pixel2cam

HMR-Scorer/common/utils/transforms.py:17–21  ·  view source on GitHub ↗
(pixel_coord, f, c)

Source from the content-addressed store, hash-verified

15
16
17def pixel2cam(pixel_coord, f, c):
18 x = (pixel_coord[:, 0] - c[0]) / f[0] * pixel_coord[:, 2]
19 y = (pixel_coord[:, 1] - c[1]) / f[1] * pixel_coord[:, 2]
20 z = pixel_coord[:, 2]
21 return np.stack((x, y, z), 1)
22
23
24def world2cam(world_coord, R, t):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected