MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / fov2focal

Function fov2focal

utils/graphics_utils.py:94–95  ·  view source on GitHub ↗
(fov, pixels)

Source from the content-addressed store, hash-verified

92 return P
93
94def fov2focal(fov, pixels):
95 return pixels / (2 * math.tan(fov / 2))
96
97def focal2fov(focal, pixels):
98 return 2*math.atan(pixels/(2*focal))

Callers 2

frame_read_fnFunction · 0.90
camera_to_JSONFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected