-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfundamental.py
More file actions
71 lines (51 loc) · 2.04 KB
/
fundamental.py
File metadata and controls
71 lines (51 loc) · 2.04 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import cv2
class Fundamental:
def __init__(self):
pass
def findFundamental():
raise NotImplementedError
class DefaultFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.FM_8POINT)
class RANSACFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.FM_RANSAC)
class USACMAGSACFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.USAC_MAGSAC)
class LMEDSFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.FM_LMEDS)
class FM_7POINTFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.FM_7POINT)
class USACDEFAULTFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.USAC_DEFAULT)
class USACPARALLELFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.USAC_PARALLEL)
class USACFASTFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.USAC_FAST)
class USACACCURATEFundamental(Fundamental):
def __init__(self):
super().__init__()
def findFundamental(self, src_pts, dst_pts):
return cv2.findFundamentalMat(src_pts, dst_pts, cv2.USAC_ACCURATE)