寻找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 ...
随机推荐
- kafka使用场景
kafka使用场景 消息 Kafka被当作传统消息中间件的替代品.消息中间件的使用原因有多种(从数据生产者解耦处理,缓存未处理的消息等).与大多数消息系统相比,Kafka具有更好的吞吐量,内置的分区, ...
- jQuery防京东浮动网站楼层导航代码
jQuery防京东浮动网站楼层导航代码 <!DOCTYPE html > <html xmlns="http://www.w3.org/1999/xhtml" ...
- 【思维】【水】 南阳oj 喷水装置(一)
描述 现有一块草坪,长为20米,宽为2米,要在横中心线上放置半径为Ri的喷水装置,每个喷水装置的效果都会让以它为中心的半径为实数Ri(0<Ri<15)的圆被湿润,这有充足的喷水装置i(1& ...
- [BZOJ3038]上帝造题的七分钟2 树状数组+并查集
考试的时候用了两个树状数组去优化,暴力修改,树状数组维护修改后区间差值还有最终求和,最后骗了40分.. 这道题有好多种做法,求和好说,最主要的是开方.这道题过的关键就是掌握一点:在数据范围内,最多开方 ...
- 报错:No identifier specified for entity: main.java.com.sy.entity.User的解决办法
自己也没怎么搭建过框架,更何况还是spring mvc的,最近在带两个实习生,正好教他们怎么搭建一个spring mvc的框架,然而我在映射表的时候,提示报错了. 实体基类: public class ...
- Mysql事务处理详细讲解及完整实例下载
一.Mysql事务概念 MySQL 事务主要用于处理操作量大,复杂度高的数据.由一步或几步数据库操作序列组成逻辑执行单元,这系列操作要么全部执行,要么全部放弃执行.在 MySQL 中只有使用了 Inn ...
- Redis-入门笔记-15min带你一览redis
如果转载,请注明博文来源: www.cnblogs.com/xinysu/ ,版权归 博客园 苏家小萝卜 所有.望各位支持! 少年入门笔记,整理出来一起入坑!入门的视屏 ...
- [算法题] Two Sum
题目内容 题目来源:LeetCode Given an array of integers, return indices of the two numbers such that they add ...
- python---------函数练习题
2.写函数,,用户传入修改的文件名,与要修改的内容,执行函数,完成整个文件的批量修改操作 # 方法一 # import os # def fun(): #y为要修改的内容,z为修改的结果 # y=in ...
- FastJson将json解析成含有泛型对象,内部泛型对象再次解析出错的解决办法(Android)
折腾小半天的问题,这里先感谢一下深圳的小伙子,远程帮我搞,虽然也没有搞出来==========FUCK 声明:Android开发下发生此异常,Java开发下并不会有这个问题 异常重现 简单说一下抛出异 ...