MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / convert_intrinsics

Method convert_intrinsics

data/recon_dataset.py:181–194  ·  view source on GitHub ↗
(self, meta_data)

Source from the content-addressed store, hash-verified

179 self._rng = np.random.default_rng(rng)
180
181 def convert_intrinsics(self, meta_data):
182 store_h, store_w = meta_data["h"], meta_data["w"]
183 fx, fy, cx, cy = (
184 meta_data["fl_x"],
185 meta_data["fl_y"],
186 meta_data["cx"],
187 meta_data["cy"],
188 )
189 intrinsics = np.eye(3, dtype=np.float32)
190 intrinsics[0, 0] = float(fx) / 4.0 # downsample by 4
191 intrinsics[1, 1] = float(fy) / 4.0
192 intrinsics[0, 2] = float(cx) / 4.0
193 intrinsics[1, 2] = float(cy) / 4.0
194 return intrinsics
195
196 def blender2opencv_c2w(self, pose):
197 blender2opencv = np.array(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected