-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasses.py
More file actions
22 lines (16 loc) · 729 Bytes
/
classes.py
File metadata and controls
22 lines (16 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class keypoints_mat_with_id(): # structure with matrix of SIFT keypoints per object with the document id
def __init__(self, _des_mat, _doc_id):
self.des_mat = _des_mat # matrix of SIFT keypoints for that document
self.doc_id = _doc_id # document id of the object
def __len__(self):
return self.des_mat.shape[0]
def get_des(self, _pos_id):
return self.des_mat[_pos_id]
def __del__(self):
pass
class keypoint_with_id(): # structure with SIFT keypoint vector and corresponding document id
def __init__(self, _vector, _id):
self.vector = _vector # SIFT vector
self.id = _id # document id of that keypoint
def __del__(self):
pass