MCPcopy
hub / github.com/cvg/Hierarchical-Localization / add_camera

Method add_camera

hloc/utils/database.py:166–173  ·  view source on GitHub ↗
(self, model, width, height, params,
                   prior_focal_length=False, camera_id=None)

Source from the content-addressed store, hash-verified

164 self.create_name_index = lambda: self.executescript(CREATE_NAME_INDEX)
165
166 def add_camera(self, model, width, height, params,
167 prior_focal_length=False, camera_id=None):
168 params = np.asarray(params, np.float64)
169 cursor = self.execute(
170 "INSERT INTO cameras VALUES (?, ?, ?, ?, ?, ?)",
171 (camera_id, model, width, height, array_to_blob(params),
172 prior_focal_length))
173 return cursor.lastrowid
174
175 def add_image(self, name, camera_id,
176 prior_q=np.full(4, np.NaN), prior_t=np.full(3, np.NaN),

Callers 2

create_db_from_modelFunction · 0.80
example_usageFunction · 0.80

Calls 1

array_to_blobFunction · 0.85

Tested by

no test coverage detected