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

Method add_matches

hloc/utils/database.py:199–210  ·  view source on GitHub ↗
(self, image_id1, image_id2, matches)

Source from the content-addressed store, hash-verified

197 (image_id,) + descriptors.shape + (array_to_blob(descriptors),))
198
199 def add_matches(self, image_id1, image_id2, matches):
200 assert(len(matches.shape) == 2)
201 assert(matches.shape[1] == 2)
202
203 if image_id1 > image_id2:
204 matches = matches[:,::-1]
205
206 pair_id = image_ids_to_pair_id(image_id1, image_id2)
207 matches = np.asarray(matches, np.uint32)
208 self.execute(
209 "INSERT INTO matches VALUES (?, ?, ?, ?)",
210 (pair_id,) + matches.shape + (array_to_blob(matches),))
211
212 def add_two_view_geometry(self, image_id1, image_id2, matches,
213 F=np.eye(3), E=np.eye(3), H=np.eye(3),

Callers 2

import_matchesFunction · 0.80
example_usageFunction · 0.80

Calls 2

image_ids_to_pair_idFunction · 0.85
array_to_blobFunction · 0.85

Tested by

no test coverage detected