MCPcopy Index your code
hub / github.com/SAMMiCA/ChangeSim / draw_camera

Method draw_camera

script/utils/visualization.py:112–126  ·  view source on GitHub ↗
(self, intrinsic, extrinsic, scale=1, color=None)

Source from the content-addressed store, hash-verified

110 # plt.show()
111
112 def draw_camera(self, intrinsic, extrinsic, scale=1, color=None):
113 # intrinsics
114 K = intrinsic
115
116 # convert extrinsics matrix to rotation and translation matrix
117 extrinsic = np.linalg.inv(extrinsic)
118 R = extrinsic[0:3,0:3]
119 t = extrinsic[0:3,3]
120
121 width = self.__width
122 height = self.__height
123
124 geometries = draw_camera(K, R, t, width, height, scale, color)
125 for g in geometries:
126 self.add_geometry(g)
127
128 def draw_points3D(self, points3D, color=None):
129 geometries = draw_points3D(points3D, color)

Callers

nothing calls this directly

Calls 2

add_geometryMethod · 0.95
draw_cameraFunction · 0.85

Tested by

no test coverage detected