MCPcopy Create free account
hub / github.com/XiaoBaiiiiii/colmap-pcd / add_matches

Method add_matches

scripts/python/database.py:198–209  ·  view source on GitHub ↗
(self, image_id1, image_id2, matches)

Source from the content-addressed store, hash-verified

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

Callers 1

example_usageFunction · 0.80

Calls 2

image_ids_to_pair_idFunction · 0.85
array_to_blobFunction · 0.85

Tested by

no test coverage detected