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

Method add_keypoints

scripts/python/database.py:183–190  ·  view source on GitHub ↗
(self, image_id, keypoints)

Source from the content-addressed store, hash-verified

181 return cursor.lastrowid
182
183 def add_keypoints(self, image_id, keypoints):
184 assert(len(keypoints.shape) == 2)
185 assert(keypoints.shape[1] in [2, 4, 6])
186
187 keypoints = np.asarray(keypoints, np.float32)
188 self.execute(
189 "INSERT INTO keypoints VALUES (?, ?, ?, ?)",
190 (image_id,) + keypoints.shape + (array_to_blob(keypoints),))
191
192 def add_descriptors(self, image_id, descriptors):
193 descriptors = np.ascontiguousarray(descriptors, np.uint8)

Callers 1

example_usageFunction · 0.80

Calls 1

array_to_blobFunction · 0.85

Tested by

no test coverage detected