OpenCV  2.4.13.6
Open Source Computer Vision
cv::SIFT Class Reference

#include <features2d.hpp>

Inheritance diagram for cv::SIFT:
cv::Feature2D cv::FeatureDetector cv::DescriptorExtractor cv::Algorithm cv::Algorithm

Public Member Functions

 SIFT (int nfeatures=0, int nOctaveLayers=3, double contrastThreshold=0.04, double edgeThreshold=10, double sigma=1.6)
 
int descriptorSize () const
 returns the descriptor size in floats (128) More...
 
int descriptorType () const
 returns the descriptor type More...
 
void operator() (InputArray img, InputArray mask, vector< KeyPoint > &keypoints) const
 finds the keypoints using SIFT algorithm More...
 
void operator() (InputArray img, InputArray mask, vector< KeyPoint > &keypoints, OutputArray descriptors, bool useProvidedKeypoints=false) const
 
AlgorithmInfoinfo () const
 
void buildGaussianPyramid (const Mat &base, vector< Mat > &pyr, int nOctaves) const
 
void buildDoGPyramid (const vector< Mat > &pyr, vector< Mat > &dogpyr) const
 
void findScaleSpaceExtrema (const vector< Mat > &gauss_pyr, const vector< Mat > &dog_pyr, vector< KeyPoint > &keypoints) const
 
- Public Member Functions inherited from cv::Feature2D
virtual void operator() (InputArray image, InputArray mask, CV_OUT vector< KeyPoint > &keypoints, OutputArray descriptors, bool useProvidedKeypoints=false) const =0
 
void compute (const Mat &image, CV_OUT CV_IN_OUT std::vector< KeyPoint > &keypoints, CV_OUT Mat &descriptors) const
 
- Public Member Functions inherited from cv::FeatureDetector
virtual ~FeatureDetector ()
 
void detect (const Mat &image, CV_OUT vector< KeyPoint > &keypoints, const Mat &mask=Mat()) const
 
void detect (const vector< Mat > &images, vector< vector< KeyPoint > > &keypoints, const vector< Mat > &masks=vector< Mat >()) const
 
virtual bool empty () const
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
string name () const
 
template<typename _Tp >
ParamType< _Tp >::member_type get (const string &name) const
 
template<typename _Tp >
ParamType< _Tp >::member_type get (const char *name) const
 
int getInt (const string &name) const
 
double getDouble (const string &name) const
 
bool getBool (const string &name) const
 
string getString (const string &name) const
 
Mat getMat (const string &name) const
 
vector< MatgetMatVector (const string &name) const
 
Ptr< AlgorithmgetAlgorithm (const string &name) const
 
void set (const string &name, int value)
 
void set (const string &name, double value)
 
void set (const string &name, bool value)
 
void set (const string &name, const string &value)
 
void set (const string &name, const Mat &value)
 
void set (const string &name, const vector< Mat > &value)
 
void set (const string &name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void set (const string &name, const Ptr< _Tp > &value)
 
void setInt (const string &name, int value)
 
void setDouble (const string &name, double value)
 
void setBool (const string &name, bool value)
 
void setString (const string &name, const string &value)
 
void setMat (const string &name, const Mat &value)
 
void setMatVector (const string &name, const vector< Mat > &value)
 
void setAlgorithm (const string &name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void setAlgorithm (const string &name, const Ptr< _Tp > &value)
 
void set (const char *name, int value)
 
void set (const char *name, double value)
 
void set (const char *name, bool value)
 
void set (const char *name, const string &value)
 
void set (const char *name, const Mat &value)
 
void set (const char *name, const vector< Mat > &value)
 
void set (const char *name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void set (const char *name, const Ptr< _Tp > &value)
 
void setInt (const char *name, int value)
 
void setDouble (const char *name, double value)
 
void setBool (const char *name, bool value)
 
void setString (const char *name, const string &value)
 
void setMat (const char *name, const Mat &value)
 
void setMatVector (const char *name, const vector< Mat > &value)
 
void setAlgorithm (const char *name, const Ptr< Algorithm > &value)
 
template<typename _Tp >
void setAlgorithm (const char *name, const Ptr< _Tp > &value)
 
string paramHelp (const string &name) const
 
int paramType (const char *name) const
 
int paramType (const string &name) const
 
void getParams (CV_OUT vector< string > &names) const
 
virtual void write (FileStorage &fs) const
 
virtual void read (const FileNode &fn)
 
- Public Member Functions inherited from cv::DescriptorExtractor
virtual ~DescriptorExtractor ()
 
void compute (const Mat &image, CV_OUT CV_IN_OUT vector< KeyPoint > &keypoints, CV_OUT Mat &descriptors) const
 
void compute (const vector< Mat > &images, vector< vector< KeyPoint > > &keypoints, vector< Mat > &descriptors) const
 
virtual bool empty () const
 

Protected Member Functions

void detectImpl (const Mat &image, vector< KeyPoint > &keypoints, const Mat &mask=Mat()) const
 
void computeImpl (const Mat &image, vector< KeyPoint > &keypoints, Mat &descriptors) const
 

Protected Attributes

int nfeatures
 
int nOctaveLayers
 
double contrastThreshold
 
double edgeThreshold
 
double sigma
 

Additional Inherited Members

- Public Types inherited from cv::Algorithm
typedef Algorithm *(* Constructor) (void)
 
typedef int(Algorithm::* Getter) () const
 
typedef void(Algorithm::* Setter) (int)
 
- Static Public Member Functions inherited from cv::Feature2D
static Ptr< Feature2Dcreate (const string &name)
 
- Static Public Member Functions inherited from cv::FeatureDetector
static Ptr< FeatureDetectorcreate (const string &detectorType)
 
- Static Public Member Functions inherited from cv::Algorithm
static void getList (CV_OUT vector< string > &algorithms)
 
static Ptr< Algorithm_create (const string &name)
 
template<typename _Tp >
static Ptr< _Tp > create (const string &name)
 
- Static Public Member Functions inherited from cv::DescriptorExtractor
static Ptr< DescriptorExtractorcreate (const string &descriptorExtractorType)
 
- Static Protected Member Functions inherited from cv::FeatureDetector
static void removeInvalidPoints (const Mat &mask, vector< KeyPoint > &keypoints)
 
- Static Protected Member Functions inherited from cv::DescriptorExtractor
static void removeBorderKeypoints (vector< KeyPoint > &keypoints, Size imageSize, int borderSize)
 

Detailed Description

SIFT implementation.

The class implements SIFT algorithm by D. Lowe.

Constructor & Destructor Documentation

§ SIFT()

cv::SIFT::SIFT ( int  nfeatures = 0,
int  nOctaveLayers = 3,
double  contrastThreshold = 0.04,
double  edgeThreshold = 10,
double  sigma = 1.6 
)
explicit

Member Function Documentation

§ buildDoGPyramid()

void cv::SIFT::buildDoGPyramid ( const vector< Mat > &  pyr,
vector< Mat > &  dogpyr 
) const

§ buildGaussianPyramid()

void cv::SIFT::buildGaussianPyramid ( const Mat base,
vector< Mat > &  pyr,
int  nOctaves 
) const

§ computeImpl()

void cv::SIFT::computeImpl ( const Mat image,
vector< KeyPoint > &  keypoints,
Mat descriptors 
) const
protectedvirtual

§ descriptorSize()

int cv::SIFT::descriptorSize ( ) const
virtual

returns the descriptor size in floats (128)

Implements cv::DescriptorExtractor.

§ descriptorType()

int cv::SIFT::descriptorType ( ) const
virtual

returns the descriptor type

Implements cv::DescriptorExtractor.

§ detectImpl()

void cv::SIFT::detectImpl ( const Mat image,
vector< KeyPoint > &  keypoints,
const Mat mask = Mat() 
) const
protectedvirtual

Implements cv::FeatureDetector.

§ findScaleSpaceExtrema()

void cv::SIFT::findScaleSpaceExtrema ( const vector< Mat > &  gauss_pyr,
const vector< Mat > &  dog_pyr,
vector< KeyPoint > &  keypoints 
) const

§ info()

AlgorithmInfo* cv::SIFT::info ( ) const
virtual

Reimplemented from cv::Algorithm.

§ operator()() [1/2]

void cv::SIFT::operator() ( InputArray  img,
InputArray  mask,
vector< KeyPoint > &  keypoints 
) const

finds the keypoints using SIFT algorithm

§ operator()() [2/2]

void cv::SIFT::operator() ( InputArray  img,
InputArray  mask,
vector< KeyPoint > &  keypoints,
OutputArray  descriptors,
bool  useProvidedKeypoints = false 
) const

finds the keypoints and computes descriptors for them using SIFT algorithm. Optionally it can compute descriptors for the user-provided keypoints

Member Data Documentation

§ contrastThreshold

double cv::SIFT::contrastThreshold
protected

§ edgeThreshold

double cv::SIFT::edgeThreshold
protected

§ nfeatures

int cv::SIFT::nfeatures
protected

§ nOctaveLayers

int cv::SIFT::nOctaveLayers
protected

§ sigma

double cv::SIFT::sigma
protected

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