Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe [Lowe04] .
More...
#include <features2d.hpp>
|
virtual CV_WRAP String | getDefaultName () const CV_OVERRIDE |
|
virtual CV_WRAP void | setNFeatures (int maxFeatures)=0 |
|
virtual CV_WRAP int | getNFeatures () const =0 |
|
virtual CV_WRAP void | setNOctaveLayers (int nOctaveLayers)=0 |
|
virtual CV_WRAP int | getNOctaveLayers () const =0 |
|
virtual CV_WRAP void | setContrastThreshold (double contrastThreshold)=0 |
|
virtual CV_WRAP double | getContrastThreshold () const =0 |
|
virtual CV_WRAP void | setEdgeThreshold (double edgeThreshold)=0 |
|
virtual CV_WRAP double | getEdgeThreshold () const =0 |
|
virtual CV_WRAP void | setSigma (double sigma)=0 |
|
virtual CV_WRAP double | getSigma () const =0 |
|
virtual | ~Feature2D () |
|
virtual CV_WRAP void | detect (InputArray image, CV_OUT std::vector< KeyPoint > &keypoints, InputArray mask=noArray()) |
| Detects keypoints in an image (first variant) or image set (second variant). More...
|
|
virtual CV_WRAP void | detect (InputArrayOfArrays images, CV_OUT std::vector< std::vector< KeyPoint > > &keypoints, InputArrayOfArrays masks=noArray()) |
|
virtual CV_WRAP void | compute (InputArray image, CV_OUT CV_IN_OUT 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 CV_WRAP void | compute (InputArrayOfArrays images, CV_OUT CV_IN_OUT std::vector< std::vector< KeyPoint > > &keypoints, OutputArrayOfArrays descriptors) |
|
virtual CV_WRAP void | detectAndCompute (InputArray image, InputArray mask, CV_OUT std::vector< KeyPoint > &keypoints, OutputArray descriptors, bool useProvidedKeypoints=false) |
|
virtual CV_WRAP int | descriptorSize () const |
|
virtual CV_WRAP int | descriptorType () const |
|
virtual CV_WRAP int | defaultNorm () const |
|
CV_WRAP void | write (const String &fileName) const |
|
CV_WRAP void | read (const String &fileName) |
|
virtual void | write (FileStorage &) const CV_OVERRIDE |
| Stores algorithm parameters in a file storage. More...
|
|
virtual CV_WRAP void | read (const FileNode &) CV_OVERRIDE |
| Reads algorithm parameters from a file storage. More...
|
|
virtual CV_WRAP bool | empty () const CV_OVERRIDE |
| Return true if detector object is empty. More...
|
|
CV_WRAP void | write (FileStorage &fs, const String &name) const |
|
void | write (const Ptr< FileStorage > &fs, const String &name) const |
|
| Algorithm () |
|
virtual | ~Algorithm () |
|
virtual CV_WRAP void | clear () |
| Clears the algorithm state. More...
|
|
CV_WRAP void | write (FileStorage &fs, const String &name) const |
|
void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
|
virtual CV_WRAP void | save (const String &filename) const |
|
|
static CV_WRAP Ptr< SIFT > | create (int nfeatures=0, int nOctaveLayers=3, double contrastThreshold=0.04, double edgeThreshold=10, double sigma=1.6, bool enable_precise_upscale=false) |
|
static CV_WRAP Ptr< SIFT > | create (int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType, bool enable_precise_upscale=false) |
| Create SIFT with specified descriptorType. More...
|
|
template<typename _Tp > |
static Ptr< _Tp > | read (const FileNode &fn) |
| Reads algorithm from the file node. More...
|
|
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...
|
|
Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe [Lowe04] .
◆ create() [1/2]
static CV_WRAP Ptr<SIFT> cv::SIFT::create |
( |
int |
nfeatures, |
|
|
int |
nOctaveLayers, |
|
|
double |
contrastThreshold, |
|
|
double |
edgeThreshold, |
|
|
double |
sigma, |
|
|
int |
descriptorType, |
|
|
bool |
enable_precise_upscale = false |
|
) |
| |
|
static |
Create SIFT with specified descriptorType.
- 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. |
- Note
- The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set this argument to 0.09.
- Parameters
-
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. |
descriptorType | The type of descriptors. Only CV_32F and CV_8U are supported. |
enable_precise_upscale | Whether to enable precise upscaling in the scale pyramid, which maps index to . This prevents localization bias. The option is disabled by default. |
◆ create() [2/2]
static CV_WRAP Ptr<SIFT> cv::SIFT::create |
( |
int |
nfeatures = 0 , |
|
|
int |
nOctaveLayers = 3 , |
|
|
double |
contrastThreshold = 0.04 , |
|
|
double |
edgeThreshold = 10 , |
|
|
double |
sigma = 1.6 , |
|
|
bool |
enable_precise_upscale = false |
|
) |
| |
|
static |
- 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. |
- Note
- The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set this argument to 0.09.
- Parameters
-
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. |
enable_precise_upscale | Whether to enable precise upscaling in the scale pyramid, which maps index to . This prevents localization bias. The option is disabled by default. |
◆ getContrastThreshold()
virtual CV_WRAP double cv::SIFT::getContrastThreshold |
( |
| ) |
const |
|
pure virtual |
◆ getDefaultName()
Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
Reimplemented from cv::Feature2D.
◆ getEdgeThreshold()
virtual CV_WRAP double cv::SIFT::getEdgeThreshold |
( |
| ) |
const |
|
pure virtual |
◆ getNFeatures()
virtual CV_WRAP int cv::SIFT::getNFeatures |
( |
| ) |
const |
|
pure virtual |
◆ getNOctaveLayers()
virtual CV_WRAP int cv::SIFT::getNOctaveLayers |
( |
| ) |
const |
|
pure virtual |
◆ getSigma()
virtual CV_WRAP double cv::SIFT::getSigma |
( |
| ) |
const |
|
pure virtual |
◆ setContrastThreshold()
virtual CV_WRAP void cv::SIFT::setContrastThreshold |
( |
double |
contrastThreshold | ) |
|
|
pure virtual |
◆ setEdgeThreshold()
virtual CV_WRAP void cv::SIFT::setEdgeThreshold |
( |
double |
edgeThreshold | ) |
|
|
pure virtual |
◆ setNFeatures()
virtual CV_WRAP void cv::SIFT::setNFeatures |
( |
int |
maxFeatures | ) |
|
|
pure virtual |
◆ setNOctaveLayers()
virtual CV_WRAP void cv::SIFT::setNOctaveLayers |
( |
int |
nOctaveLayers | ) |
|
|
pure virtual |
◆ setSigma()
virtual CV_WRAP void cv::SIFT::setSigma |
( |
double |
sigma | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: