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