寻找Harris、Shi-Tomasi和亚像素角点
Harris、Shi-Tomasi和亚像素角点都是角点,隶属于特征点这个大类(特征点可以分为边缘、角点、斑点).
| void cv::cornerHarris | ( | InputArray | src, //需要为8位单通道 |
| OutputArray | dst, //结果 | ||
| int | blockSize, //领域大小 | ||
| int | ksize, //Sobel孔径大小 | ||
| double | k, //Harris参数 | ||
| int | borderType = BORDER_DEFAULT |
||
| ) |
Harris corner detector.
The function runs the Harris corner detector on the image. Similarly to cornerMinEigenVal and cornerEigenValsAndVecs , for each pixel (x, y) it calculates a 2\times2 gradient covariance matrix M^{(x,y)} over a \texttt{blockSize} \times \texttt{blockSize} neighborhood. Then, it computes the following characteristic:
(特征点计算方法)
Corners in the image can be found as the local maxima of this response map.
- Parameters
-
src Input single-channel 8-bit or floating-point image. dst Image to store the Harris detector responses. It has the type CV_32FC1 and the same size as src . blockSize Neighborhood size (see the details on cornerEigenValsAndVecs ). ksize Aperture parameter for the Sobel operator. k Harris detector free parameter. See the formula below. borderType Pixel extrapolation method. See cv::BorderTypes.
.,,THRESH_BINARY);
imshow();

| void cv::goodFeaturesToTrack | ( | InputArray | image,//输入图像 |
| OutputArray | corners,//输出向量 | ||
| int | maxCorners,//角点最大数量 | ||
| double | qualityLevel,//角点检测可接受的最小特征值 | ||
| double | minDistance,//角点之间的最小距离 | ||
| InputArray | mask = noArray(),//感兴趣区域 |
||
| int | blockSize = 3,//领域范围 |
||
| bool | useHarrisDetector = false,//true为harris;false为Shi-Tomasi |
||
| double | k = 0.04 //权重系数 |
||
| ) |
Determines strong corners on an image.
The function finds the most prominent corners in the image or in the specified image region, as described in [154]
- Function calculates the corner quality measure at every source image pixel using the cornerMinEigenVal or cornerHarris .
- Function performs a non-maximum suppression (the local maximums in 3 x 3 neighborhood are retained).
- The corners with the minimal eigenvalue less than qualityLevel⋅maxx,yqualityMeasureMap(x,y) are rejected.
- The remaining corners are sorted by the quality measure in the descending order.
- Function throws away each corner for which there is a stronger corner at a distance less than maxDistance.
The function can be used to initialize a point-based tracker of an object.
- Note
- If the function is called with different values A and B of the parameter qualityLevel , and A > B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector with qualityLevel=B .
- Parameters
-
image Input 8-bit or floating-point 32-bit, single-channel image. corners Output vector of detected corners. maxCorners Maximum number of corners to return. If there are more corners than are found, the strongest of them is returned. maxCorners <= 0implies that no limit on the maximum is set and all detected corners are returned.qualityLevel Parameter characterizing the minimal accepted quality of image corners. The parameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue (see cornerMinEigenVal ) or the Harris function response (see cornerHarris ). The corners with the quality measure less than the product are rejected. For example, if the best corner has the quality measure = 1500, and the qualityLevel=0.01 , then all the corners with the quality measure less than 15 are rejected. minDistance Minimum possible Euclidean distance between the returned corners. mask Optional region of interest. If the image is not empty (it needs to have the type CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected. blockSize Size of an average block for computing a derivative covariation matrix over each pixel neighborhood. See cornerEigenValsAndVecs . useHarrisDetector Parameter indicating whether to use a Harris detector (see cornerHarris) or cornerMinEigenVal. k Free parameter of the Harris detector.
;i,Scalar());
}
imshow();

| void cv::cornerSubPix | ( | InputArray | image, |
| InputOutputArray | corners, | ||
| Size | winSize, | ||
| Size | zeroZone, | ||
| TermCriteria | criteria | ||
| ) |
cout);

寻找Harris、Shi-Tomasi和亚像素角点的更多相关文章
- OpenCV亚像素角点cornerSubPixel()源代码分析
上一篇博客中讲到了goodFeatureToTrack()这个API函数能够获取图像中的强角点.但是获取的角点坐标是整数,但是通常情况下,角点的真实位置并不一定在整数像素位置,因此为了获取更为精确的角 ...
- OpenCV——Harris、Shi Tomas、自定义、亚像素角点检测
#include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using namespace st ...
- OpenCV亚像素级的角点检测
亚像素级的角点检测 目标 在本教程中我们将涉及以下内容: 使用OpenCV函数 cornerSubPix 寻找更精确的角点位置 (不是整数类型的位置,而是更精确的浮点类型位置). 理论 代码 这个教程 ...
- opencv亚像素级角点检测
一般角点检测: harris cv::cornerHarris() shi-tomasi cv::goodFeaturesToTrack() 亚像素级角点检测是在一般角点检测基础之上将检测出的角点精确 ...
- Paper | 亚像素运动补偿 + 视频超分辨
目录 1. ABSTRACT 2. INTRODUCTION 3. RELATED WORKS 4. SUB-PIXEL MOTION COMPENSATION (SPMC) 5. OUR METHO ...
- 亚像素Sub Pixel
亚像素Sub Pixel 评估图像处理算法时,通常会考虑是否具有亚像素精度. 亚像素概念的引出: 图像处理过程中,提高检测方法的精度一般有两种方式:一种是提高图像系统的光学放大倍数和CCD相机的分辨率 ...
- 【工程应用七】接着折腾模板匹配算法 (Optimization选项 + no_pregeneration模拟 + 3D亚像素插值)
在折腾中成长,在折腾中永生. 接着玩模板匹配,最近主要研究了3个课题. 1.创建模型的Optimization选项模拟(2022.5.16日) 这两天又遇到一个做模板匹配隐藏的高手,切磋起来后面就还是 ...
- Opencv 亚像素级别角点检测
Size winSize = Size(5,5); Size zerozone = Size(-1,-1); TermCriteria tc = TermCriteria(TermCriteria:: ...
- OpenCV 亚像素级的角点检测
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #i ...
随机推荐
- 谈一谈EasyUI的TreeGrid的过滤功能
写在最前面 这个星期一直在纠结easyui的treegrid的过滤功能,原因呢,自然是项目中一个莫名奇妙的需求. easyui虽说是后端程序员的前端框架,但是说句实话,除去api,让我直接写里面的节点 ...
- python常用模块(2)
之前学了两个常用的模块collections和re模块今天我们接着学习其他几个常用模块.都是比较常用的之前的学习或多或少也有所接触比如说时间模块等. 预习: 写一个验证码 首先 要有数字 其次 要有字 ...
- Java中synchronized和Lock的区别
synchronized和Lock的区别synchronize锁对象可以是任意对象,由于监视器方法必须要拥有锁对象那么任意对象都可以调用的方法所以将其抽取到Object类中去定义监视器方法这样锁对象和 ...
- The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (new View.OnClickListener(){}, String, int)
package comxunfang.button; import android.support.v7.app.ActionBarActivity; import android.os.Bundle ...
- 一步一步学多线程-Timer
在执行定时任务的时候可以用Timer来实现,现在小编对学到的进行一次总结,先来看一个demo 1 public class TimerTest { 2 3 public static void mai ...
- 社群系统ThinkSNS + 移动端研发周报
社群系统"ThinkSNS+"对比ThinkSNS V4系列,ThinkSNS V4系列的产品规划主要偏重于企业服务应用,注重功能的覆盖面和用户关系的逻辑处理.Thin社群系统kS ...
- 【MySQL源码】源码安装和启动mysql
--[MySQL源码]源码安装和启动mysql --------------------------------------2014/08/19 本机环境:ubuntu12.04,fedora-17 ...
- thymeleaf文本处理
文本处理 显示文本是网页开发的最基本需求,另外,国际化的程序当今也是相当必要的.这些问题,thymeleaf都可以轻松解决. th:text标签属性 这个属性的基本作用就是显示文本,它的值可以既可以从 ...
- noip普及组2004 花生采摘
花生采摘 描述 鲁宾逊先生有一只宠物猴,名叫多多.这天,他们两个正沿着乡间小路散步,突然发现路的告示牌上贴着一张小小的纸条:"欢迎免费品尝我种的花生!--熊字". 鲁宾逊先生和多多 ...
- Spring(二)之配置.md
依赖配置详解 bean的属性及构造器参数既可以引用容器中的其他bean,也可以是内联(inline)bean.在spring的XML配置中使用 直接变量(基本类型.Strings类型等.) <v ...