-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathkeypoint.py
More file actions
32 lines (21 loc) · 776 Bytes
/
keypoint.py
File metadata and controls
32 lines (21 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- coding: utf-8 -*-
"""
keypoint.py
author: Keita Nagara 永良慶太 (University of Tokyo) <nagara.keita()gmail.com>
Class for key point in image
"""
from descriptor import Descriptor
class KeyPoint:
def __init__(self,data_):
#cx = 360.0 - 6.361694 # (image size X)/2 + principal point X
#cy = 640.0 - 22.962158 # (image size Y)/2 + principal point Y
cx = 540.0 # (image size X)/2 + principal point X
cy = 960.0 # (image size Y)/2 + principal point Y
data = data_.split(':')
self.prevIndex = int(data[0])
self.index = int(data[1])
self.x1 = float(data[2]) - cx
self.y1 = float(data[3]) - cy
self.x = float(data[4]) - cx
self.y = float(data[5]) - cy
#self.descriptor = Descriptor(data[4])