@@ -14,6 +14,16 @@ def ex_0():
14
14
print (f'{ len (keypoints_no_supression )= } ' )
15
15
fast_supression = cv2 .FastFeatureDetector_create (threshold = threshold , nonmaxSuppression = True )
16
16
keypoints_supression : List [cv2 .KeyPoint ] = fast_supression .detect (img_gray )
17
+
18
+ orb = cv2 .ORB_create ()
19
+ sift = cv2 .xfeatures2d .SIFT_create ()
20
+
21
+ keypoints_sift = sift .detect (img_gray )
22
+ keypoints_orb = orb .detect (img_gray )
23
+
24
+ img_with_keypoints_sift = cv2 .drawKeypoints (img , keypoints_sift , None , color = (255 , 0 , 0 ))
25
+ img_with_keypoints_orb = cv2 .drawKeypoints (img , keypoints_orb , None , color = (255 , 0 , 0 ))
26
+
17
27
print (f'{ len (keypoints_supression )= } ' )
18
28
img_with_keypoints = cv2 .drawKeypoints (img , keypoints_supression , None , color = (255 , 0 , 0 ))
19
29
@@ -22,7 +32,9 @@ def ex_0():
22
32
print (f'{ kp .angle = } ' )
23
33
print (f'{ kp .response = } ' )
24
34
25
- cv2 .imshow ('point feature detector' , img_with_keypoints )
35
+ cv2 .imshow ('point feature detector fast' , img_with_keypoints )
36
+ cv2 .imshow ('point feature detector orb' , img_with_keypoints_orb )
37
+ cv2 .imshow ('point feature detector sift' , img_with_keypoints_sift )
26
38
cv2 .waitKey (0 )
27
39
cv2 .destroyAllWindows ()
28
40
@@ -59,6 +71,7 @@ def ex_1():
59
71
detector = cv2 .AKAZE_create ()
60
72
# detector = cv2.FastFeatureDetector_create(threshold=30, nonmaxSuppression=True)
61
73
# descriptor = cv2.ORB_create()
74
+ # descriptor = cv2.xfeatures2d.SIFT_create()
62
75
descriptor = cv2 .xfeatures2d .BriefDescriptorExtractor_create ()
63
76
# descriptor = cv2.AKAZE_create()
64
77
# descriptor = cv2.BRISK_create()
0 commit comments