{
 "id": "eppdfs8cxc",
 "slug": "speeded-up-robust-features",
 "title": "Speeded-up robust features",
 "updated": "2026-10-15",
 "topic_path": [
  {
   "id": "technology",
   "label": "Technology and the built world",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology"
  },
  {
   "id": "technology.computing",
   "label": "Computing and digital systems",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing"
  },
  {
   "id": "technology.computing.ai",
   "label": "Artificial intelligence and data",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai"
  },
  {
   "id": "technology.computing.ai.perception_language",
   "label": "Language and vision AI",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.perception_language"
  },
  {
   "id": "technology.computing.ai.computer_vision",
   "label": "Computer vision",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.computer_vision"
  },
  {
   "id": "technology.computing.ai.cv_methods",
   "label": "Vision methods and geometry",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.cv_methods"
  },
  {
   "id": "technology.computing.ai.cv_methods.feature_detection",
   "label": "Feature detection and description",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.ai.cv_methods.feature_detection"
  }
 ],
 "geo": [
  {
   "id": "geo.nongeo.t2001.technology.computing.ai.perception_language",
   "label": "Non-geographic · 2001 to 2020: Language and vision AI",
   "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing.ai.perception_language",
   "path": [
    {
     "id": "geo.nongeo",
     "label": "Non-geographic",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo"
    },
    {
     "id": "geo.nongeo.t2001",
     "label": "Non-geographic · 2001 to 2020",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001"
    },
    {
     "id": "geo.nongeo.t2001.technology",
     "label": "Technology and the built world",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology"
    },
    {
     "id": "geo.nongeo.t2001.technology.computing",
     "label": "Computing and digital systems",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing"
    },
    {
     "id": "geo.nongeo.t2001.technology.computing.ai",
     "label": "Artificial intelligence and data",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing.ai"
    },
    {
     "id": "geo.nongeo.t2001.technology.computing.ai.perception_language",
     "label": "Language and vision AI",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.nongeo.t2001.technology.computing.ai.perception_language"
    }
   ]
  }
 ],
 "excerpt": "Speeded-up robust features (SURF) is a scale- and rotation-invariant local feature detector and descriptor that matches interest points across images, introduced in 2006 as a faster alternative to SIFT.",
 "snippet": "Speeded-up robust features (SURF) is a scale- and rotation-invariant local feature detector and descriptor that matches interest points across images, introduced in 2006 as a faster alternative to SIFT.",
 "node": "technology.computing.ai.cv_methods.feature_detection",
 "markdown": "# Speeded-up robust features\n\nSpeeded-up robust features (SURF) is a scale- and rotation-invariant local feature detector and descriptor that finds interest points in an image and computes a vector for each one, so that corresponding points can be matched quickly across different images. It was introduced as a faster alternative to SIFT, approximating scale-space Gaussian derivatives with box filters evaluated through integral images.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> Published comparisons reported comparable or better repeatability and distinctiveness than prior schemes at a fraction of the computation time,<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> and OpenCV's analysis puts it at three times the speed of SIFT with comparable performance.<sup>[2](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)</sup>\n\n| Key fact | Value |\n|---|---|\n| Detector | Fast-Hessian: determinant of an approximate Hessian on a box-filter scale space<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> |\n| Descriptor | 64-dimensional (128-dimensional extended variant) Haar-wavelet response statistics<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[2](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)</sup> |\n| Speed vs SIFT | 3× faster per OpenCV analysis; roughly 3–5× in other accounts<sup>[2](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)</sup><sup> • </sup><sup>[3](http://kiwi.bridgeport.edu/cpeg585/SurfAlgorithm.pdf)</sup> |\n| Reference timing | 610 ms to detect and describe 1529 points on a 3 GHz Pentium 4; 354 ms for an 800×640 image<sup>[4](https://dl.acm.org/doi/10.1016/j.cviu.2007.09.014)</sup><sup> • </sup><sup>[5](https://people.xiph.org/~tterribe/pubs/gpusurf.pdf)</sup> |\n| Matching speedup | Sign-of-Laplacian indexing doubles matching speed in the best case<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> |\n| Recognition rate | SURF-128 85.7% vs SIFT 78.1% in the authors' object-recognition test<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> |\n| Current status | Non-free: excluded from prebuilt OpenCV wheels, available only via the xfeatures2d contrib module<sup>[6](https://github.com/opencv/opencv-python/issues/126)</sup><sup> • </sup><sup>[7](https://docs.opencv.org/5.0/extra_modules/classcv_1_1xfeatures2d_1_1SURF.html)</sup> |\n\n## How it works\n\nSURF rests on the integral image: the entry at location \\( x = (x, y) \\) stores the sum of all pixels in the rectangle from the origin to x, so the sum over any axis-aligned rectangle costs four operations regardless of size.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> This makes convolution with rectangular box filters effectively constant-time per filter, which is what allows Gaussian second-order partial derivatives \\( L_{xx} \\), \\( L_{xy} \\), and \\( L_{yy} \\) to be approximated cheaply by box filters; the resulting approximated scale space is called the box-space.<sup>[8](https://www.ipol.im/pub/art/2015/69/article_lr.pdf)</sup><sup> • </sup><sup>[9](https://arxiv.org/pdf/1607.08368v1.pdf)</sup>\n\nInterest points are local maxima of the scale-normalized determinant of the approximated [Hessian matrix](https://www.edgepedia.org/hessian-matrix). The determinant is computed as \\( \\det(H_{\\mathrm{approx}}) = D_{xx} \\cdot D_{yy} - (0.9 \\cdot D_{xy})^{2} \\), with the weighting factor \\( 0.9 \\) derived to compensate the box-filter approximation error.<sup>[3](http://kiwi.bridgeport.edu/cpeg585/SurfAlgorithm.pdf)</sup><sup> • </sup><sup>[10](https://katha.um.edu.my/index.php/MJCS/article/download/16586/9860)</sup>\n\nThe descriptor describes the distribution of Haar-wavelet responses \\( d_x \\) and \\( d_y \\) around each interest point.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> Because box filters and Haar wavelets are both rectangular, the same integral image accelerates detection and description. A final indexing trick stores the sign of the Laplacian, that is, the trace of the Hessian, which distinguishes bright blobs on dark backgrounds from the reverse; during matching, only features of the same contrast type are compared, which doubles matching speed in the best case at no extra detection cost.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup>\n\n## How it is done\n\nA practitioner runs the following steps, here with the parameters used in the original algorithm and in the OpenCV implementation.\n\n1. **Integral image.** Convert the input image once; all later box-filter responses read from it.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup>\n2. **Scale space.** Build octaves by up-scaling the filter size rather than down-sampling the image, so no aliasing is introduced. The first 9×9 box filter corresponds to scale \\( s = 1.2 \\), approximating Gaussian derivatives with \\( \\sigma = 1.2 \\); in general \\( \\sigma = (\\mathrm{filtersize}/9) \\cdot 1.2 \\).<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[3](http://kiwi.bridgeport.edu/cpeg585/SurfAlgorithm.pdf)</sup>\n3. **Detection.** Compute \\( D_{xx} \\), \\( D_{yy} \\), and \\( D_{xy} \\) at each scale, form the weighted determinant, and keep voxels that exceed all 26 nearest neighbors (9 above, 9 below, 8 at the native scale) in the 3×3×3 scale-space neighborhood. Refine each maximum to sub-pixel accuracy by interpolation of the Hessian determinant. The Hessian threshold controls how many points survive; OpenCV's default is 100, with 300 to 500 recommended in practice.<sup>[2](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)</sup><sup> • </sup><sup>[7](https://docs.opencv.org/5.0/extra_modules/classcv_1_1xfeatures2d_1_1SURF.html)</sup><sup> • </sup><sup>[8](https://www.ipol.im/pub/art/2015/69/article_lr.pdf)</sup>\n4. **Orientation.** Compute Haar-wavelet responses of side length \\( 4s \\) in a circular neighborhood of radius \\( 6s \\), weight them with a Gaussian of \\( \\sigma = 2.5s \\), and take the dominant orientation as the maximum of a sliding window covering \\( \\pi/3 \\) (60 degrees).<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[11](https://github.com/opencv/opencv_contrib/blob/master/modules/xfeatures2d/src/surf.cpp)</sup>\n5. **Descriptor.** Around the oriented point, take a square region of side \\( 20s \\) split into 4×4 sub-regions with 5×5 sample points each. Gaussian-weight the Haar responses (\\( \\sigma = 3.3s \\)) and accumulate per sub-region \\( v = (\\Sigma d_x, \\Sigma d_y, \\Sigma |d_x|, \\Sigma |d_y|) \\), giving 64 values; normalize the vector to unit length for contrast invariance.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[11](https://github.com/opencv/opencv_contrib/blob/master/modules/xfeatures2d/src/surf.cpp)</sup>\n6. **Matching.** Compare descriptors by [Euclidean distance](https://www.edgepedia.org/euclidean-distance), accept a match when its distance is below 0.7 times the distance to the second nearest neighbor, optionally filter with RANSAC, and index candidates by the sign of the Laplacian.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[8](https://www.ipol.im/pub/art/2015/69/article_lr.pdf)</sup>\n\n## Origin\n\nSURF was introduced in the paper \"SURF: Speeded Up Robust Features\".<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> The extended journal version appeared in Computer Vision and Image Understanding, Volume 110, Issue 3, pages 346–359.<sup>[4](https://dl.acm.org/doi/10.1016/j.cviu.2007.09.014)</sup>\n\nThe method builds on earlier work it credits explicitly: Lowe's SIFT descriptor, a 128-dimensional histogram of oriented gradients published in 2004, which SURF speeds up;<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[12](https://doi.org/10.1023/b:visi.0000029664.99615.94)</sup> integral images as made popular in vision by Viola and Jones's 2001 detection framework; and the more general boxlets framework of Simard and colleagues from 1998.<sup>[4](https://dl.acm.org/doi/10.1016/j.cviu.2007.09.014)</sup>\n\n## Variants\n\n**U-SURF** skips orientation assignment, so it is not rotation-invariant but faster to compute, and it retains robustness to rotation of about ±15°. OpenCV documents the upright mode as much faster and suited to stereo matching and image stitching.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[2](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)</sup><sup> • </sup><sup>[7](https://docs.opencv.org/5.0/extra_modules/classcv_1_1xfeatures2d_1_1SURF.html)</sup>\n\n**SURF-128** is the extended descriptor: sums of \\( d_x \\) and \\( |d_x| \\) are split by the sign of \\( d_y \\), and \\( d_y \\), \\( |d_y| \\) by the sign of \\( d_x \\), doubling the feature count. In OpenCV the extended flag selects 64-dimensional (0) or 128-dimensional (1) output.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup><sup> • </sup><sup>[2](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)</sup>\n\n**GPU and hardware ports** exist because the algorithm parallelizes well: each Hessian image can be generated independently. One GPU implementation runs at over 30 Hz at HD resolution with thousands of features and over 70 Hz at SD resolution.<sup>[5](https://people.xiph.org/~tterribe/pubs/gpusurf.pdf)</sup> Algorithmic variants SURF-S and SURF-F, from a study of implementation ambiguities, run several times faster than the reference library with comparable or slightly lower stability.<sup>[13](https://ar5iv.labs.arxiv.org/html/1202.0492)</sup>\n\n**OpenCV** provides SURF through cv.xfeatures2d.SURF_create in the opencv_contrib module; it is not in the main modules.<sup>[7](https://docs.opencv.org/5.0/extra_modules/classcv_1_1xfeatures2d_1_1SURF.html)</sup><sup> • </sup><sup>[11](https://github.com/opencv/opencv_contrib/blob/master/modules/xfeatures2d/src/surf.cpp)</sup>\n\n## Applications\n\nThe journal paper demonstrates SURF on camera calibration as a special case of image registration and on object recognition.<sup>[4](https://dl.acm.org/doi/10.1016/j.cviu.2007.09.014)</sup> In medical imaging, Cattin and colleagues used SURF for mosaicing human retina images, a task the original paper reports no other detector/descriptor scheme could cope with at the time.<sup>[1](https://people.ee.ethz.ch/~surf/eccv06.pdf)</sup> In robotics, SURF features have been used for efficient robot localization with omnidirectional images, and a 2013 Robotica study modified SURF's orientation representation, descriptor dimension, and feature count for visual SLAM, confirming better repeatability for landmark representation with binocular sensors and EKF SLAM.<sup>[14](https://www.cambridge.org/core/journals/robotica/article/abs/improvement-of-speededup-robust-features-for-robot-visual-simultaneous-localization-and-mapping/30C3B898BD6D6A4C8D0740C4E0EF17AA)</sup>\n\nTimings vary with hardware and feature count. On a 3 GHz Pentium 4, detecting and describing 1529 interest points took about 610 ms with SURF and 400 ms with U-SURF.<sup>[4](https://dl.acm.org/doi/10.1016/j.cviu.2007.09.014)</sup>\n\n## Limitations and alternatives\n\n**Failure modes.** OpenCV's analysis finds SURF good at handling blur and rotation but not viewpoint or illumination change.<sup>[2](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)</sup> The original paper leaves the box-filter shapes after the first scale unspecified, and the [Haar wavelet](https://www.edgepedia.org/haar-wavelet) template used by OpenSURF and OpenCV lacks symmetry, causing directional bias; a symmetric derivative operator has been proposed as a fix.<sup>[5](https://people.xiph.org/~tterribe/pubs/gpusurf.pdf)</sup><sup> • </sup><sup>[13](https://ar5iv.labs.arxiv.org/html/1202.0492)</sup>\n\n**Alternatives.** KAZE runs a similar pipeline in a nonlinear scale space built with additive operator splitting, and A-KAZE speeds detection with fast explicit diffusion in a pyramidal framework.<sup>[15](https://arxiv.org/pdf/1807.10254v3.pdf)</sup> Binary descriptors such as BRIEF and ORB need less storage and match by [Hamming distance](https://www.edgepedia.org/hamming-distance), but their limited distinctiveness restricts them mostly to short-baseline matching.<sup>[16](https://doi.org/10.1109/tpami.2011.222)</sup><sup> • </sup><sup>[15](https://arxiv.org/pdf/1807.10254v3.pdf)</sup><sup> • </sup><sup>[17](https://link.springer.com/article/10.1007/s11263-020-01359-2)</sup> ASIFT is a fully affine-invariant extension of SIFT.<sup>[18](https://doi.org/10.1137/080732730)</sup> Learned detectors such as SuperPoint and Key.Net have achieved real-time implementation while maintaining state-of-the-art performance, replacing handcrafted pipelines in many modern tasks.<sup>[17](https://link.springer.com/article/10.1007/s11263-020-01359-2)</sup>\n\n**Patent and availability.** SURF and SIFT were removed from prebuilt opencv-python wheels starting with OpenCV 3.4.3 because they were patented; wheels must be rebuilt with the OPENCV_ENABLE_NONFREE CMake flag to include SURF, whereas SIFT's patent expired in March 2020 and SIFT was moved back into the main features2d module in OpenCV 4.4.<sup>[6](https://github.com/opencv/opencv-python/issues/126)</sup> SURF therefore remains usable today by building OpenCV with the non-free flag or using the xfeatures2d contrib module; head-to-head benchmarks against learned detectors such as SuperPoint have been published, for example arXiv 2007.10000, which pairs classical pipelines including SURF with the deep models LF-Net and SuperPoint.\n\n## References\n\n1. [SURF: Speeded Up Robust Features (ECCV 2006)](https://people.ee.ethz.ch/~surf/eccv06.pdf)\n2. [Introduction to SURF (Speeded-Up Robust Features), OpenCV 5.0 Tutorials](https://docs.opencv.org/5.0/tutorials_contrib/xfeatures2d/py_surf_intro/py_surf_intro.html)\n3. [Speeded-Up Robust Features (lecture slides, Scott Smith, Advanced Image Processing, 2011)](http://kiwi.bridgeport.edu/cpeg585/SurfAlgorithm.pdf)\n4. [Speeded-Up Robust Features (SURF), Computer Vision and Image Understanding, Vol. 110, Issue 3, pp. 346–359](https://dl.acm.org/doi/10.1016/j.cviu.2007.09.014)\n5. [GPU Accelerating Speeded-Up Robust Features](https://people.xiph.org/~tterribe/pubs/gpusurf.pdf)\n6. [Include non-free algorithms (opencv-python issue #126)](https://github.com/opencv/opencv-python/issues/126)\n7. [Class cv::xfeatures2d::SURF, OpenCV 5.0 documentation](https://docs.opencv.org/5.0/extra_modules/classcv_1_1xfeatures2d_1_1SURF.html)\n8. [An Analysis of the SURF Method (IPOL)](https://www.ipol.im/pub/art/2015/69/article_lr.pdf)\n9. [Local Feature Detectors, Descriptors, and Image Representations: A Survey](https://arxiv.org/pdf/1607.08368v1.pdf)\n10. [Malaysian Journal of Computer Science article on SURF Fast-Hessian FPGA implementation](https://katha.um.edu.my/index.php/MJCS/article/download/16586/9860)\n11. [OpenCV xfeatures2d surf.cpp implementation](https://github.com/opencv/opencv_contrib/blob/master/modules/xfeatures2d/src/surf.cpp)\n12. [David G. Lowe (2004). Distinctive Image Features from Scale-Invariant Keypoints. International Journal of Computer Vision.](https://doi.org/10.1023/b:visi.0000029664.99615.94)\n13. [Resolving Implementation Ambiguity and Improving SURF (Abeles)](https://ar5iv.labs.arxiv.org/html/1202.0492)\n14. [Improvement of speeded-up robust features for robot visual simultaneous localization and mapping (Robotica, 2013)](https://www.cambridge.org/core/journals/robotica/article/abs/improvement-of-speededup-robust-features-for-robot-visual-simultaneous-localization-and-mapping/30C3B898BD6D6A4C8D0740C4E0EF17AA)\n15. [From handcrafted to deep local features (survey)](https://arxiv.org/pdf/1807.10254v3.pdf)\n16. [Michael Calonder and colleagues (2011). BRIEF: Computing a Local Binary Descriptor Very Fast. IEEE Transactions on Pattern Analysis and Machine Intelligence.](https://doi.org/10.1109/tpami.2011.222)\n17. [Image Matching from Handcrafted to Deep Features: A Survey (IJCV 2020/2021)](https://link.springer.com/article/10.1007/s11263-020-01359-2)\n18. [Jean-Michel Morel, Guoshen Yu (2009). ASIFT: A New Framework for Fully Affine Invariant Image Comparison. SIAM Journal on Imaging Sciences.](https://doi.org/10.1137/080732730)\n\n---\n*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Artificial intelligence and data › Language and vision AI › Computer vision › Vision methods and geometry › Feature detection and description*\n\n*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*\n\n*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*\n\nLicense: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license\n",
 "same_as": [],
 "url": "https://www.edgepedia.org/speeded-up-robust-features",
 "markdown_url": "https://www.edgepedia.org/speeded-up-robust-features.md",
 "license": {
  "name": "Edgepedia Community License 1.0",
  "url": "https://www.edgepedia.org/edgepedia/license",
  "summary": "Free with credit, commercial use included. AI training is open to everyone. For other uses, organizations over USD 100M in revenue or 100M monthly users license separately.",
  "spdx": "LicenseRef-Edgepedia-Community-1.0"
 },
 "credit": "\"Speeded-up robust features\", Edgepedia (EdgeChat), https://www.edgepedia.org/speeded-up-robust-features. Edgepedia Community License 1.0.",
 "credit_md": "\"[Speeded-up robust features](https://www.edgepedia.org/speeded-up-robust-features)\", Edgepedia (EdgeChat), [https://www.edgepedia.org/speeded-up-robust-features](https://www.edgepedia.org/speeded-up-robust-features). [Edgepedia Community License 1.0](https://www.edgepedia.org/edgepedia/license).",
 "credit_html": "\"<a href=\"https://www.edgepedia.org/speeded-up-robust-features\">Speeded-up robust features</a>\", Edgepedia (EdgeChat), <a href=\"https://www.edgepedia.org/speeded-up-robust-features\">https://www.edgepedia.org/speeded-up-robust-features</a>. <a href=\"https://www.edgepedia.org/edgepedia/license\">Edgepedia Community License 1.0</a>.",
 "speakable": "Speeded-up robust features is a scale- and rotation-invariant local feature detector and descriptor that matches interest points across images, introduced in 2006 as a faster alternative to SIFT."
}
