目标特征检测之FAST特征
2016-04-09 20:38
246 查看
Fast: Feature from Accelerated Segment Test
适合在计算能力有限的设备上使用,其速度比SIFT 和SURF快,但是精度有限。
#!/usr/bin/env python
import cv2
img = cv2.imread('chess.png')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
fast = cv2.FastFeatureDetector()
kp = fast.detect(gray, None)
img2 = cv2.drawKeypoints(gray,kp, (255,0,0))
print "Threshold: ",fast.getInt('threshold')
print "nonmaxSuppression: ",fast.getBool('nonmaxSuppression')
print "neighborhood: ",fast.getInt('type')
print "Total Keypoint with nonmaxSuppression: ", len(kp)
cv2.imshow('fast', img2)
cv2.waitKey(0)
适合在计算能力有限的设备上使用,其速度比SIFT 和SURF快,但是精度有限。
#!/usr/bin/env python
import cv2
img = cv2.imread('chess.png')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
fast = cv2.FastFeatureDetector()
kp = fast.detect(gray, None)
img2 = cv2.drawKeypoints(gray,kp, (255,0,0))
print "Threshold: ",fast.getInt('threshold')
print "nonmaxSuppression: ",fast.getBool('nonmaxSuppression')
print "neighborhood: ",fast.getInt('type')
print "Total Keypoint with nonmaxSuppression: ", len(kp)
cv2.imshow('fast', img2)
cv2.waitKey(0)
相关文章推荐
- QML 中的 console 对象
- Codeforces 630G Challenge Pennants【组合数学】
- 哈夫曼树
- 如何巧妙的使用sshpass来提高效率
- 第6周
- 关于enum的那些事儿
- UISearchBar会有灰色背景一闪
- uva 574 Sum It Up
- 顺序表的实现
- 基本字符串压缩
- asp微信公众号自动回复开发案列之新闻查询机器人
- Eclipse 快捷键大全
- 触发器限制对表修改
- 据廖雪峰python3教程----python学习第十一天
- LeetCode *** 36. Valid Sudoku
- iOS定时器使用小结
- 【hihoCoder】1041. 国庆出游
- 结对编程之黄金分割
- 排名机制
- iOS 音频播放