
opencv
群星闪耀
这个作者很懒,什么都没留下…
展开
-
OpenCV之Feature Matching + Homography to find Objects
import numpy as npimport cv2 as cvfrom matplotlib import pyplot as pltMIN_MATCH_COUNT = 10img1 = cv.imread('box.png',0) # queryImageimg2 = cv.imread('box_in_scene.png',0) # trainImage#...原创 2020-02-15 20:49:49 · 397 阅读 · 1 评论 -
OpenCV之Feature Matching
Brute-Force matcherBFmatcher(Brute-Force Matching)暴力匹配,应用BFMatcher.knnMatch( )函数来进行核心的匹配,knnMatch(k-nearest neighbor classification)k近邻分类算法。kNN算法则是从训练集中找到和新数据最接近的k条记录,然后根据他们的主要分类来决定新数据的类别。该算法涉及3个主要...原创 2020-02-15 20:30:11 · 1421 阅读 · 0 评论 -
解决OpenCV中SIFT,SURF不能使用,修改成ORB检测特征
我们知道因为一些专利的原因,SIFT和SURF不能再OpenCV后续的版本中继续使用。所以我们可以用OpenCV自带的其他检测器:Oriented FAST and Rotated BRIEF。引用官网的话:This algorithm was brought up by Ethan Rublee, Vincent Rabaud, Kurt Konolige and Gary R. Bradsk...原创 2020-02-15 16:02:47 · 1248 阅读 · 1 评论 -
Introduction to SIFT (Scale-Invariant Feature Transform)
问题:前面学习的Harris算法检测corners是旋转不变性的。就是说即使这些corners旋转了也可以检测出来。但是假如有的角标放大了之后,在图片中看起来就会变得平滑。比如下面的图片:以前的方法就没用了。为了解决这个问题,所以有的学者就发明了尺度不变的检测方法叫做(Scale-Invariant Feature Transform)SIFT。SIFT算法实现物体识别主要有4...原创 2020-02-14 22:05:34 · 192 阅读 · 0 评论 -
Opencv:Shi-Tomasi 角点检测 & 适合于跟踪的图像特征(Shi-Tomasi Corner Detector & Good Features to Track)
原理:In last chapter, we saw Harris Corner Detector. Later in 1994, J. Shi and C. Tomasi made a small modification(前一个方法的小改进) to it in their paperGood Features to Trackwhich shows better results com...原创 2020-02-14 21:43:00 · 337 阅读 · 0 评论 -
OpenCV特征检测
Harris Corner Detectiondst=cv.cornerHarris(src, blockSize, ksize, k)img- Input image, it should be grayscale and float32 type.应该输入灰度图像 blockSize- It is the size of neighbourhood considered f...原创 2020-02-14 21:14:25 · 283 阅读 · 0 评论 -
opencv-轮廓检测详解
轮廓检测是基于图像边缘提取的基础,寻找对象轮廓的方法,所以边缘提取的阈值选定会影响最终轮廓的发现相关APIfindContours 发现轮廓drawContours绘制轮廓操作步骤1.转换图像为二值化图像:threshold方法或者canny边缘提取获取的都是二值化图像2.通过二值化图像寻找轮廓:findContours3.描绘轮廓:drawContours相...原创 2020-02-04 14:50:55 · 732 阅读 · 0 评论 -
Canny算子的非极大值抑制Non-maximum Suppression
Non-maximum SuppressionAfter getting gradient magnitude and direction, a full scan of image is done to remove any unwanted pixels which may not constitute the edge. For this, at every pixel, pixel i...原创 2020-02-02 17:31:41 · 1061 阅读 · 0 评论 -
如何让构造卷积的核函数kernel
Structuring ElementWe manually created a structuring elements in the previous examples with help of Numpy. It is rectangular shape. But in some cases, you may need elliptical/circular shaped kernels...原创 2020-02-02 17:22:28 · 1190 阅读 · 0 评论 -
python中如何找到每个颜色的HSV准确值?
How to find HSV values to track?This is a common question found instackoverflow.com. It is very simple and you can use the same function,cv.cvtColor(). Instead of passing an image, you just pass t...原创 2020-01-27 21:46:55 · 1543 阅读 · 0 评论 -
python timeit学习笔记
介绍timeit是python自带的包,用来测试代码的执行时间。使用方式import timeit相关方法 timeit(stmt='pass', setup='pass', timer=<defaulttimer>, number=1000000) 返回: 返回执行stmt这段代码number遍所用的时间,单位为秒,float型 stmt:要...转载 2020-01-27 20:57:57 · 171 阅读 · 0 评论 -
cv.waitkey()参数详解
在显示图像时,经常使用cv.Waitkey()来进行交互。参考别人的代码,每个人在里面使用的数字都不一样。查找资料后得到了解答,所以做一个记录。1.官网解释def waitKey(delay=None): # real signature unknown; restored from __doc__"""waitKey([, delay]) -> retval. @bri...原创 2020-01-10 11:03:06 · 13124 阅读 · 1 评论