官术网_书友最值得收藏!

  • OpenCV 4 with Python Blueprints
  • Dr. Menua Gevorgyan Arsen Mamikonyan Michael Beyeler
  • 344字
  • 2021-06-24 16:50:07

Looking at feature detection

In computer vision, the process of finding areas of interest in an image is called feature detection. Under the hood, for each point of the image, a feature detection algorithm decides whether an image point contains a feature of interest. OpenCV provides a whole range of feature detection (and description) algorithms.

In OpenCV, the details of the algorithms are encapsulated and all of them have similar APIs. Here are some of the algorithms: 

  • Harris corner detection: We know that edges are areas with high-intensity changes in all directions. Harris and Stephens came up with this algorithm, which is a fast way of finding such areas. This algorithm is implemented as cv2.cornerHarris in OpenCV.
  • Shi-Tomasi corner detection: Shi and Tomasi developed a corner detection algorithm, and this algorithm is usually better than Harris corner detection by finding the N strongest corners. This algorithm is implemented as cv2.goodFeaturesToTrack in OpenCV.
  • Scale-Invariant Feature Transform (SIFT): Corner detection is not sufficient when the scale of the image changes. To this end, David Lowe developed a method to describe keypoints in an image that are independent of orientation and size (hence the term scale-invariant). The algorithm is implemented as cv2.xfeatures2d_SIFT in OpenCV2 but has been moved to the extra modules in OpenCV3 since its code is proprietary.
  • SURF: SIFT has proven to be really good, but it is not fast enough for most applications. This is where SURF comes in, which replaces the expensive Laplacian of a Gaussian (function) from SIFT with a box filter. The algorithm is implemented as cv2.xfeatures2d_SURF in OpenCV2, but, like SIFT, it has been moved to the extra modules in OpenCV3 since its code is proprietary.

OpenCV has support for even more feature descriptors, such as Features from Accelerated Segment Test (FAST), Binary Robust Independent Elementary Features (BRIEF), and Oriented FAST and Rotated BRIEF (ORB), the latter being an open source alternative to SIFT or SURF.

In the next section, we'll learn how to use SURF to detect features in an image.

主站蜘蛛池模板: 霍林郭勒市| 兰考县| 都兰县| 瑞昌市| 达拉特旗| 毕节市| 宝山区| 六枝特区| 祁门县| 松滋市| 安远县| 静宁县| 濮阳县| 收藏| 定安县| 辽宁省| 岑巩县| 红桥区| 彝良县| 石柱| 海盐县| 稻城县| 温泉县| 永年县| 昌平区| 曲阜市| 丁青县| 普定县| 潼南县| 万山特区| 峨眉山市| 班戈县| 威远县| 富源县| 高密市| 阿巴嘎旗| 城固县| 黔南| 藁城市| 泸溪县| 曲水县|