原文地址:http://docs.opencv.org/trunk/doc/py_tutorials/py_feature2d/py_fast/py_fast.html#fast-algorithm-for-corner-detection
import numpy as np import cv2 from matplotlib import pyplot as plt img = cv2.imread(‘simple.jpg‘,0) # Initiate FAST object with default values fast = cv2.FastFeatureDetector() # find and draw the keypoints kp = fast.detect(img,None) img2 = cv2.drawKeypoints(img, kp, color=(255,0,0)) # Print all default params print "Threshold: ", fast.getInt(‘threshold‘) print "nonmaxSuppression: ", fast.getBool(‘nonmaxSuppression‘) print "neighborhood: ", fast.getInt(‘type‘) print "Total Keypoints with nonmaxSuppression: ", len(kp) cv2.imwrite(‘fast_true.png‘,img2) # Disable nonmaxSuppression fast.setBool(‘nonmaxSuppression‘,0) kp = fast.detect(img,None) print "Total Keypoints without nonmaxSuppression: ", len(kp) img3 = cv2.drawKeypoints(img, kp, color=(255,0,0)) cv2.imwrite(‘fast_false.png‘,img3)
【OpenCV文档】用于角点检测的Fast算法,布布扣,bubuko.com
原文:http://blog.csdn.net/candycat1992/article/details/22285979