MCPcopy Create free account
hub / github.com/Inception3D/TTT3R / CameraState

Class CameraState

viser_utils.py:167–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166@dataclasses.dataclass
167class CameraState(object):
168 fov: float
169 aspect: float
170 c2w: np.ndarray
171
172 def get_K(self, img_wh):
173 W, H = img_wh
174 focal_length = H / 2.0 / np.tan(self.fov / 2.0)
175 K = np.array(
176 [
177 [focal_length, 0.0, W / 2.0],
178 [0.0, focal_length, H / 2.0],
179 [0.0, 0.0, 1.0],
180 ]
181 )
182 return K
183
184
185def get_vertical_colorbar(h, vmin, vmax, cmap_name="jet", label=None, cbar_precision=2):

Callers 1

get_camera_stateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected