# 角点检测

角点检测是一种计算机视觉方法，用于找出图像中强度在不止一个方向上发生急剧变化的点，输出逐像素的响应图以及一份简短的选定兴趣点列表。<sup>[1](https://docs.opencv.org/5.0/py_tutorials/py_features/py_features_harris/py_features_harris.html)</sup> 角点是三类经典特征之一，另外两类是边缘（强度沿一个方向变化）和斑点（类似区域的结构）；<sup>[2](https://dl.acm.org/doi/10.1016/j.neucom.2014.08.003)</sup> 角点是由小窗口内图像梯度的联合行为定义的，而不是由任何语义上的物体部件定义的。<sup>[3](http://luthuli.cs.uiuc.edu/~daf/courses/CV23/Notes/corners.pdf)</sup> 检测到的角点可作为相机标定、图像匹配、跟踪和视频稳定的锚点，适用于在不同观察条件下拍摄的图像。<sup>[4](https://doi.org/10.5201/ipol.2018.229)</sup>

| 关键事实 | 数值 |
|---|---|
| 角点判据 | 结构张量的两个特征值 \( \lambda_{1}, \lambda_{2} \) 都很大且近似相等<sup>[1](https://docs.opencv.org/5.0/py_tutorials/py_features/py_features_harris/py_features_harris.html)</sup> |
| 哈里斯响应 | \( R = \det(M) - k \cdot \mathrm{trace}(M)^{2} \)，其中 \( k \) 经实验取 0.04–0.06<sup>[5](https://www.cs.umd.edu/class/fall2019/cmsc426-0201/files/12_HarrisCornerDetection.pdf)</sup> |
| 不变性 | 对旋转和强度平移不变；对图像缩放不具有不变性<sup>[6](https://www.cs.cmu.edu/~16385/s17/Slides/6.2_Harris_Corner_Detector.pdf)</sup> |
| FAST 速度 | 每场 768×288 PAL 图像 1.33 毫秒（占帧预算的 6.65%），而 2.6 GHz Opteron 上哈里斯为 24.0 毫秒<sup>[7](https://ecse.monash.edu/staff/twd/Research/Rosten-ECCV06.pdf)</sup> |
| 库中默认 | Shi–Tomasi（最小特征值）略优于哈里斯，是 OpenCV 中的默认角点检测器<sup>[8](https://www.ipb.uni-bonn.de/html/teaching/msr2-2020/sse2-09-features-keypoints.pdf)</sup> |
| 学习型检测器重复率 | HPatches 光照变化下 SuperPoint 为 .652，哈里斯为 .620，FAST 为 .575（300 个点，\( \varepsilon = 3 \) 像素）<sup>[9](https://arxiv.org/abs/1712.07629)</sup> |

## 工作原理

其原理是小位移下的自相似性。对于窗口 \( w(x,y) \)，将图像块平移 \( (u,v) \) 所引起的强度变化为

\[ E(u,v) = \sum_{x,y} w(x,y)\,[\,I(x+u,\,y+v) - I(x,y)\,]^{2} \]

泰勒展开将其线性化为 \( E(u,v) \approx [\,u\;v\,]\,M\,[\,u\;v\,]^{\mathrm{T}} \)，其中 \( M \) 是梯度乘积的加窗求和，其元素由 \( I_{x}^{2} \)、\( I_{x} \cdot I_{y} \) 和 \( I_{y}^{2} \) 构成。<sup>[1](https://docs.opencv.org/5.0/py_tutorials/py_features/py_features_harris/py_features_harris.html)</sup> 这个矩阵 \( M \) 就是二阶矩矩阵，或称[结构张量](https://www.edgepedia.org/zh/structure-tensor)；它等于窗口内图像梯度的协方差矩阵，从而将角点检测与主成分分析联系起来。<sup>[6](https://www.cs.cmu.edu/~16385/s17/Slides/6.2_Harris_Corner_Detector.pdf)</sup> 它的特征值概括了窗口的性质：平坦区域中两者都很小，边缘窗口中一个大一个小，角点窗口中两者都大。<sup>[3](http://luthuli.cs.uiuc.edu/~daf/courses/CV23/Notes/corners.pdf)</sup>

哈里斯角点检测器用标量响应 \( R = \det(M) - k \cdot \mathrm{trace}(M)^{2} \) 取代了显式的特征值分解，其中 \( \det(M) = \lambda_{1}\lambda_{2} \)，\( \mathrm{trace}(M) = \lambda_{1} + \lambda_{2} \)。<sup>[5](https://www.cs.umd.edu/class/fall2019/cmsc426-0201/files/12_HarrisCornerDetection.pdf)</sup> 实际上他们计算的是差值平方和对位移的二阶导数的一个近似，这比直接测试各种位移在计算上更便宜，而且可以做到各向同性。<sup>[10](https://ar5iv.labs.arxiv.org/html/0810.2434)</sup> \( R \) 在角点区域为正，在边缘区域为负，在平坦区域很小。<sup>[11](https://bmva-archive.org.uk/bmvc/1988/avc-88-023.pdf)</sup> 迹的平方项主要是为了抑制边缘响应。<sup>[12](https://eprints.whiterose.ac.uk/id/eprint/792/1/rockettp2.pdf)</sup>

## 实现方法

标准实现按以下顺序进行：<sup>[4](https://doi.org/10.5201/ipol.2018.229)</sup>

1. 用标准差较小的高斯核卷积图像，以减少噪声和混叠伪影。这种平滑在求导之前降低噪声，是流程的标准组成部分，不过不同实现在是否应用它上有所差异。<sup>[12](https://eprints.whiterose.ac.uk/id/eprint/792/1/rockettp2.pdf)</sup>
2. 计算 \( x \) 和 \( y \) 方向导数（OpenCV 中用索贝尔滤波器），构造 \( I_{x}^{2} \)、\( I_{y}^{2} \) 和 \( I_{x} \cdot I_{y} \) 图像，并用高斯窗口对每个图像做模糊，得到每个像素处的结构张量元素 \( A \)、\( B \)、\( C \)。<sup>[13](https://www.cs.middlebury.edu/~swehrwein/cs1053_26w/lectures/L05_features_harris.html)</sup>
3. 逐像素计算 \( R \)。需要时，特征值可由 \( d = A \cdot C - B \cdot B \) 和 \( t = (A+C)/2 \) 按 \( \lambda_{1}, \lambda_{2} = t \pm \sqrt{t^{2} - d} \) 求得。<sup>[13](https://www.cs.middlebury.edu/~swehrwein/cs1053_26w/lectures/L05_features_harris.html)</sup>
4. 对响应做阈值处理，例如保留 \( R > 0.01 \cdot R_{\max} \) 的像素。<sup>[1](https://docs.opencv.org/5.0/py_tutorials/py_features/py_features_harris/py_features_harris.html)</sup>
5. 应用非极大值抑制，通常是最大值滤波器，只保留等于局部最大值且高于阈值的像素。<sup>[4](https://doi.org/10.5201/ipol.2018.229)</sup>
6. 将存活的角点细化到亚像素精度，例如使用 OpenCV 的 `cv.cornerSubPix()` 或二次插值。<sup>[1](https://docs.opencv.org/5.0/py_tutorials/py_features/py_features_harris/py_features_harris.html)</sup>

在 OpenCV 中，调用 `cv.cornerHarris(gray, blockSize, ksize, k)`，例如 `cornerHarris(gray, 2, 3, 0.04)`，接受 float32 灰度图像、邻域大小、索贝尔孔径和 \( k \)。<sup>[1](https://docs.opencv.org/5.0/py_tutorials/py_features/py_features_harris/py_features_harris.html)</sup>

## 起源

哈里斯检测器建立在更早的一种兴趣算子之上，该算子测量四个位移 (1,0)、(1,1)、(0,1) 和 (−1,1) 上的强度变化，并选取高于阈值的最小变化 \( \min\{E\} \) 的局部最大值。<sup>[11](https://bmva-archive.org.uk/bmvc/1988/avc-88-023.pdf)</sup>

论文《一种组合式角点与边缘检测器》在阿尔维视觉会议（AVC 1988，曼彻斯特）上发表，第 23.1–23.6 页，doi:10.5244/C.2.23，后转载于《图像与视觉计算》第 6 卷第 2 期，第 87–90 页，1988 年 5 月。<sup>[11](https://bmva-archive.org.uk/bmvc/1988/avc-88-023.pdf)</sup> 哈里斯的实现被称为 Plessey 算法。在 1987 年的一篇阿尔维论文中，J. Alison Noble 对其进行了分析，从数学上证明该算法估计的是图像曲率，并指出它能分离出 L 型交汇，但在 T 型交汇和更高阶结构处行为不可预测。<sup>[14](https://bmva-archive.org.uk/bmvc/1987/avc-87-037.pdf)</sup> Noble 的相关论文《寻找角点》于 1988 年发表在《图像与视觉计算》上。<sup>[15](https://doi.org/10.1016/0262-8856%2888%2990007-8)</sup>

## 变体

**Shi–Tomasi。** 该度量用结构张量的最小特征值 \( \lambda_{\min} \) 为像素打分，并在 \( \tau \) 处做阈值处理。<sup>[4](https://doi.org/10.5201/ipol.2018.229)</sup> 它是在特征变形为仿射的假设下为更好地检测特征而推导出来的；总体上表现略好，但在该假设不成立的浅浮雕数据集上哈里斯优于它。<sup>[10](https://ar5iv.labs.arxiv.org/html/0810.2434)</sup> 包括 OpenCV 在内的大多数库都将 Shi–Tomasi 用作默认角点检测器。<sup>[8](https://www.ipb.uni-bonn.de/html/teaching/msr2-2020/sse2-09-features-keypoints.pdf)</sup>

**SUSAN。** SUSAN（最小单值段同化核）由 [Stephen M. Smith](https://www.edgepedia.org/zh/stephen-m-smith) 和 J. Michael Brady 于 1997 年发表在《国际计算机视觉期刊》上，它完全避开图像导数，这意味着它不会放大噪声；独立测试支持了它在噪声存在时表现良好的说法。<sup>[16](https://doi.org/10.1023/a:1007963824710)</sup>

**FAST 与 AGAST。** FAST（加速段测试特征）由 Edward Rosten 和 Tom Drummond 于 2006 年报告，它将像素 \( p \) 分类为角点，当且仅当其周围十六像素圆上有 \( n \) 个连续像素全部亮于 \( I_{p} + t \) 或全部暗于 \( I_{p} - t \)；当 \( n = 12 \) 时，对位置 1、5、9、13 处四个基本方向上的像素的预测试只需检查四个值就能排除大多数非角点。<sup>[7](https://ecse.monash.edu/staff/twd/Research/Rosten-ECCV06.pdf)</sup> 在 2.6 GHz Opteron 上，FAST 处理一场 PAL 图像需 1.33 毫秒，而哈里斯需 24.0 毫秒。<sup>[7](https://ecse.monash.edu/staff/twd/Research/Rosten-ECCV06.pdf)</sup> FAST-ER 由 Rosten、Reid Porter 和 Tom Drummond（2008）提出，直接针对重复率进行优化，在噪声图像中明显优于 FAST-9。<sup>[10](https://ar5iv.labs.arxiv.org/html/0810.2434)</sup> AGAST 基于相同的角点判据，使用一棵通用决策树，不必针对新环境重新训练。<sup>[17](https://mediatum.ub.tum.de/doc/1287456/1287456.pdf)</sup>

**尺度空间处理。** 哈里斯响应对旋转和强度平移 \( I \rightarrow I + b \) 不变，但角点位置在图像缩放下既不是不变的也不是协变的。<sup>[6](https://www.cs.cmu.edu/~16385/s17/Slides/6.2_Harris_Corner_Detector.pdf)</sup> Harris-Laplace 由 Krystian Mikolajczyk 和 [Cordelia Schmid](https://www.edgepedia.org/zh/cordelia-schmid) 于 2004 年发表，用尺度自适应哈里斯函数检测点，并用高斯拉普拉斯算子在尺度空间中选择尺度，得到对旋转和尺度变化不变的区域。<sup>[18](https://pages.cs.wisc.edu/~dyer/ai-qual/mikolajczyk-ijcv04.pdf)</sup> FAST 本身不考虑尺度变化；BRISK 增加了尺度空间修改，ORB 应用多尺度金字塔并配合基于哈里斯的边缘剔除。<sup>[19](https://ar5iv.labs.arxiv.org/html/2106.07929)</sup>

## 应用

尽管出现了许多更新的检测器，哈里斯仍是用于相机标定、图像匹配、跟踪和视频稳定的参考技术。<sup>[4](https://doi.org/10.5201/ipol.2018.229)</sup> FAST 的速度使其适合实时和嵌入式系统。<sup>[20](https://www.nature.com/articles/s41598-025-02487-w)</sup> 有文献记载的应用包括 Klein 的 PTAM，一个基于关键帧的 SLAM 式跟踪与建图系统。<sup>[17](https://mediatum.ub.tum.de/doc/1287456/1287456.pdf)</sup> SUSAN 已被用于机器人任务中的角点跟踪。<sup>[21](https://www.rcs.cic.ipn.mx/2005_16/Some%20Experiments%20on%20Corner%20Tracking%20for%20Robotic%20Tasks.pdf)</sup>

## 局限与替代方案

**噪声与虚假响应。** 哈里斯对图像噪声的敏感度低于大多数其他算法，这一优势归因于其基本假设：角点与局部自相关函数的极大值相关联。<sup>[22](http://ece631web.groups.et.byu.net/References/Assessing%20corner%20detectors.pdf)</sup> FAST 恰恰相反：高速来自尽可能少地分析像素，因此其通过平均来消除噪声的能力被削弱。<sup>[7](https://ecse.monash.edu/staff/twd/Research/Rosten-ECCV06.pdf)</sup> 在添加噪声的合成形状上，MagicPoint 的 mAP 达到 0.971，而 FAST 为 0.061、哈里斯为 0.213、Shi–Tomasi 为 0.157。<sup>[9](https://arxiv.org/abs/1712.07629)</sup> 在模型生成数据上的 ROC 分析显示，Harris–Stephens 的角点/非角点判别接近随机猜测，AUC′ 为 0.6085，而基本 Kitchen–Rosenfeld 检测器为 0.6636，这与其被广泛观察到的在真实角点周围产生大量虚假响应的现象一致。<sup>[12](https://eprints.whiterose.ac.uk/id/eprint/792/1/rockettp2.pdf)</sup>

**阈值与变换依赖性。** 对于 CSS 等基于轮廓的检测器，合适的阈值可能因图像而异，也会随旋转或缩放而变化，高斯平滑尺度必须足够大以去除噪声，又要足够小以保留真实角点。<sup>[23](https://www.ece.lsu.edu/gunturk/EE7700/Mokhtarian2.pdf)</sup> 该研究中的检测器都没有设计成仿射不变的，而确实使用高阶导数来实现不变性的检测器对噪声高度敏感，这限制了它们的实用价值。<sup>[23](https://www.ece.lsu.edu/gunturk/EE7700/Mokhtarian2.pdf)</sup> 普通哈里斯的尺度非不变性促成了上述尺度空间变体。<sup>[8](https://www.ipb.uni-bonn.de/html/teaching/msr2-2020/sse2-09-features-keypoints.pdf)</sup>

**基准测试。** Schmid、Roger Mohr 和 Christian Bauckhage 于 2000 年在《国际计算机视觉期刊》上提出了两个定量标准：重复率，即在相同场景不同条件下拍摄的两幅图像中同时检测到的兴趣点百分比，以及信息量。<sup>[24](https://doi.org/10.1023/a:1008199403446)</sup> 在角点密度极低（每帧少于 100 个角点）时，哈里斯和 Shi–Tomasi 在重复率上优于所有其他检测器，<sup>[10](https://ar5iv.labs.arxiv.org/html/0810.2434)</sup> 而当每帧需要超过约 200 个角点时，FAST 检测器除 DoG 外优于所有方法。<sup>[7](https://ecse.monash.edu/staff/twd/Research/Rosten-ECCV06.pdf)</sup>

**经典检测器与学习型检测器。** 从手工设计到学习型检测的谱系经过 2006 年机器学习训练的 FAST 和 2015 年以来的深度学习检测器，包括 TILDE、LIFT、LF-Net 和 D2-Net。<sup>[19](https://ar5iv.labs.arxiv.org/html/2106.07929)</sup> SuperPoint 在光照变化下达到 HPatches 检测器重复率 .652，哈里斯为 .620，FAST 为 .575。<sup>[9](https://arxiv.org/abs/1712.07629)</sup> 手工设计的检测器仍依赖角点、梯度和尺度空间极值等显式几何概念，近期工作试图用学习到的亚像素定位来与之匹配。<sup>[25](https://arxiv.org/pdf/2407.11668v1)</sup> 截至 2025 年一项比较手工检测器（MSER、SIFT、SURF、ORB、AKAZE、AGAST、FREAK）与基于学习的模型（SuperPoint、DeDoDe、ALIKE、DISK）的基准测试，手工方法与深度学习方法相比仍具有竞争力。<sup>[26](https://link.springer.com/chapter/10.1007/978-3-032-26031-4_12)</sup>

## References

1. [Harris Corner Detection, OpenCV Tutorials](https://docs.opencv.org/5.0/py_tutorials/py_features/py_features_harris/py_features_harris.html)
2. [A survey of recent advances in visual feature detection (Neurocomputing)](https://dl.acm.org/doi/10.1016/j.neucom.2014.08.003)
3. [Interest Points (Forsyth, CV23 course notes)](http://luthuli.cs.uiuc.edu/~daf/courses/CV23/Notes/corners.pdf)
4. [Javier Sánchez, Nelson Monzón, Agustín Salgado (2018). An Analysis and Implementation of the Harris Corner Detector. Image Processing On Line.](https://doi.org/10.5201/ipol.2018.229)
5. [Harris Corner Detection (UMD CMSC426 slides)](https://www.cs.umd.edu/class/fall2019/cmsc426-0201/files/12_HarrisCornerDetection.pdf)
6. [16-385 Computer Vision: Harris Corner Detector (CMU, Kris Kitani)](https://www.cs.cmu.edu/~16385/s17/Slides/6.2_Harris_Corner_Detector.pdf)
7. [Machine learning for high-speed corner detection (Rosten & Drummond, ECCV 2006)](https://ecse.monash.edu/staff/twd/Research/Rosten-ECCV06.pdf)
8. [Visual Features: Keypoints (Stachniss lecture slides)](https://www.ipb.uni-bonn.de/html/teaching/msr2-2020/sse2-09-features-keypoints.pdf)
9. [SuperPoint: Self-Supervised Interest Point Detection and Description](https://arxiv.org/abs/1712.07629)
10. [Faster and better: a machine learning approach to corner detection (FAST-ER)](https://ar5iv.labs.arxiv.org/html/0810.2434)
11. [A Combined Corner and Edge Detector (Harris & Stephens, Alvey Vision Conference)](https://bmva-archive.org.uk/bmvc/1988/avc-88-023.pdf)
12. [Performance Assessment of Feature Detection Algorithms: A Methodology and Case Study on Corner Detectors (Rockett)](https://eprints.whiterose.ac.uk/id/eprint/792/1/rockettp2.pdf)
13. [L05 Features: Harris (Middlebury CS 1053)](https://www.cs.middlebury.edu/~swehrwein/cs1053_26w/lectures/L05_features_harris.html)
14. [Finding Corners (Noble, Alvey 1987)](https://bmva-archive.org.uk/bmvc/1987/avc-87-037.pdf)
15. [Finding corners (Image and Vision Computing, 1988)](https://doi.org/10.1016/0262-8856%2888%2990007-8)
16. [Stephen M. Smith, J. Michael Brady (1997). SUSAN, A New Approach to Low Level Image Processing. International Journal of Computer Vision.](https://doi.org/10.1023/a:1007963824710)
17. [Adaptive and Generic Corner Detection Based on the Accelerated Segment Test (AGAST)](https://mediatum.ub.tum.de/doc/1287456/1287456.pdf)
18. [Scale & Affine Invariant Interest Point Detectors (Mikolajczyk & Schmid, IJCV 2004)](https://pages.cs.wisc.edu/~dyer/ai-qual/mikolajczyk-ijcv04.pdf)
19. [Image Feature Information Extraction for Interest Point Detection: A Review](https://ar5iv.labs.arxiv.org/html/2106.07929)
20. [Unified interest point detection and description for perspective and Fisheye images (Scientific Reports, 2025)](https://www.nature.com/articles/s41598-025-02487-w)
21. [Some Experiments on Corner Tracking for Robotic Tasks](https://www.rcs.cic.ipn.mx/2005_16/Some%20Experiments%20on%20Corner%20Tracking%20for%20Robotic%20Tasks.pdf)
22. [Assessing the Performance of Corner Detectors](http://ece631web.groups.et.byu.net/References/Assessing%20corner%20detectors.pdf)
23. [Performance evaluation of corner detectors using consistency and accuracy criteria (CVIU, doi:10.1016/j.cviu.2005.11.001)](https://www.ece.lsu.edu/gunturk/EE7700/Mokhtarian2.pdf)
24. [Cordelia Schmid, Roger Mohr, Christian Bauckhage (2000). Evaluation of Interest Point Detectors. International Journal of Computer Vision.](https://doi.org/10.1023/a:1008199403446)
25. [Learning to Make Keypoints Sub-Pixel Accurate (arXiv 2024)](https://arxiv.org/pdf/2407.11668v1)
26. [Evaluation of Handcrafted and Learning-Based Keypoint Detection and Description Methods in Image Matching (Springer, 2025)](https://link.springer.com/chapter/10.1007/978-3-032-26031-4_12)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Language and vision AI › Computer vision › Vision methods and geometry › Feature detection and description

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/corner-detection

English original: https://www.edgepedia.org/corner-detection
