| OpenCV 4.3.0 Open Source Computer Vision

Static Public Member Functions | List of all members
cv::xfeatures2d::SIFT Class Reference

Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe [146] . More...

`#include <opencv2/xfeatures2d.hpp>`

Inheritance diagram for cv::xfeatures2d::SIFT:

## Static Public Member Functions
static Ptr< SIFT > | create (int nfeatures=0, int nOctaveLayers=3, double contrastThreshold=0.04, double edgeThreshold=10, double sigma=1.6)
Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > | load (const String &filename, const String &objname=String())
| Loads algorithm from the file. More...
template<typename _Tp >
static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String())
| Loads algorithm from a String. More...
template<typename _Tp >
static Ptr< _Tp > | read (const FileNode &fn)
| Reads algorithm from the file node. More...

## Additional Inherited Members
Public Member Functions inherited from cv::Feature2D
virtual | ~Feature2D ()
virtual void | compute (InputArray image, std::vector< KeyPoint > &keypoints, OutputArray descriptors)
| Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). More...
virtual void | compute (InputArrayOfArrays images, std::vector< std::vector< KeyPoint > > &keypoints, OutputArrayOfArrays descriptors)
virtual int | defaultNorm () const
virtual int | descriptorSize () const
virtual int | descriptorType () const
virtual void | detect (InputArray image, std::vector< KeyPoint > &keypoints, InputArray mask=noArray())
| Detects keypoints in an image (first variant) or image set (second variant). More...
virtual void | detect (InputArrayOfArrays images, std::vector< std::vector< KeyPoint > > &keypoints, InputArrayOfArrays masks=noArray())
virtual void | detectAndCompute (InputArray image, InputArray mask, std::vector< KeyPoint > &keypoints, OutputArray descriptors, bool useProvidedKeypoints=false)
virtual bool | empty () const CV_OVERRIDE
| Return true if detector object is empty. More...
virtual String | getDefaultName () const CV_OVERRIDE
void | read (const String &fileName)
virtual void | read (const FileNode &) CV_OVERRIDE
| Reads algorithm parameters from a file storage. More...
void | write (const String &fileName) const
virtual void | write (FileStorage &) const CV_OVERRIDE
| Stores algorithm parameters in a file storage. More...
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const
Public Member Functions inherited from cv::Algorithm
| Algorithm ()
virtual | ~Algorithm ()
virtual void | clear ()
| Clears the algorithm state. More...
virtual void | save (const String &filename) const
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const
| simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
Protected Member Functions inherited from cv::Algorithm
void | writeFormat (FileStorage &fs) const

## Detailed Description

Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe [146] .

## Member Function Documentation

## ◆ create()

static Ptr<SIFT> cv::xfeatures2d::SIFT::create | ( | int | nfeatures = `0`,
|  | int | nOctaveLayers = `3`,
|  | double | contrastThreshold = `0.04`,
|  | double | edgeThreshold = `10`,
|  | double | sigma = `1.6`
| ) |  |
| static

Python:
| retval | = | cv.xfeatures2d.SIFT_create( | [, nfeatures[, nOctaveLayers[, contrastThreshold[, edgeThreshold[, sigma]]]]] | )

Parameters

  nfeatures | The number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
  nOctaveLayers | The number of layers in each octave. 3 is the value used in D. Lowe paper. The number of octaves is computed automatically from the image resolution.
  contrastThreshold | The contrast threshold used to filter out weak features in semi-uniform (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
  edgeThreshold | The threshold used to filter out edge-like features. Note that the its meaning is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are filtered out (more features are retained).
  sigma | The sigma of the Gaussian applied to the input image at the octave #0. If your image is captured with a weak camera with soft lenses, you might want to reduce the number.

The documentation for this class was generated from the following file:

- opencv2/xfeatures2d.hpp