-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathimage_coplanarity.py
54 lines (37 loc) · 942 Bytes
/
image_coplanarity.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- coding: utf-8 -*-
"""
image.py
author: Keita Nagara 永良慶太 (University of Tokyo) <nagara.keita()gmail.com>
This class is called from "Main.py", and process image data.
methods:
processData(data) <- called from "Main.py"
"""
import sys
from math import *
import cv2 as cv
import numpy as np
import Util
from keypoint_pair import KeyPointPair
class ImageCoplanarity:
def __init__(self):
pass
def init(self):
#state.py
#self.state.init() #this is also called in sensor.py
#variables
pass
def setState(self,_state):
#state.py
self.state = _state
#Set new data and Execute all functions
def processData(self,time_,data):
#if nomatch then nothing to do
if(data[0] == "nomatch"):
print("nomatch")
return
time = (float(long(time_) / 1000.0))
keypointPairs = []
for d in data:
if(d != ''):
keypointPairs.append(KeyPointPair(d))
self.state.setImageData(time,keypointPairs)