寻找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 <= 0
implies 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 ...
随机推荐
- html、js、django处理日期问题
在html中使用日期控件,利用ngmodel将输入的值传到js里: <input type="date" ng-model="timeOps.test.a_time ...
- Open-Falcon第七步安装报警模块(小米开源互联网企业级监控系统)
sender调用各个公司提供的mail-provider和sms-provider,按照某个并发度,从redis中读取邮件.短信并发送,alarm生成的报警短信和报警邮件都是直接写入redis即可,s ...
- C语言中全局变量存放在哪个位置?
今年软考的时候,遇到了这个题目,表示不解,然后考完之后去查了一下百度,才发现自己选错.全局变量存放在静态存储区,位置是固定的. 局部变量在栈空间,栈地址是不固定的.栈:就是那些由编译器在需要的时候分配 ...
- Java-将多线程停止的两种方法
线程如何停止呢 stop方法过时了,看起描述发现,有其他解决方案. 线程结束:就是让线程任务代码执行完,run方法结束. run方法怎么结束呢? run方法中通常都定义循环,只要控制住循环就哦了. / ...
- Mongodb相关 (Shell命令 / mongoose)
Mongodb相关 1.创建一个文件夹作为数据库存放的目录 2.打开cmd cd到Mongodb/bin目录去 3.执行mongod --dbpath "第一项创建的文件夹(数据库数据存放目 ...
- javascript的词法作用域
这个概念是js中相当基础也是极为重要的,很多想当然的错误或感觉怪异的问题都是和这个东西有关.所以,本文主要说下这个名词的概念以及讨论下他牵扯出来的有关变量.函数.闭包的问题. 由变量开始谈 习惯性先来 ...
- HDU 3682 To Be an Dream Architect:查重【三维坐标系中点在实数上的映射】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3682 题意: 有一个n*n*n的立方体,左下角坐标为(1,1,1),接下来进行m次操作. 每个操作形如 ...
- .Net Core 2.0生态(3):ASP.NET Core 2.0 特性介绍和使用指南
ASP.NET Core 2.0 发布日期:2017年8月14日 ASP.NET团队宣布ASP.NET Core 2.0正式发布,发布Visual Studio 2017 15.3支持ASP.NET ...
- 绿盟RSAS配置小记
拿到了一个漏扫的虚拟机,可是配置一直上不了网,最后是配置扫描端口网卡,并在主网卡上不做网关配置从而得到解决. 漏扫虚拟机的网络配置是这样一共七块桥接网卡,一块是主网卡,其余六块是扫描口网卡. 主网卡只 ...
- python自动化运维三:数据报表定制以及scapy模块介绍
p { margin-bottom: 0.25cm; line-height: 120% } a:link { } Excel也是报表的一个重要的工具.这里首先接受下excel的操作.先来看一个简单的 ...