OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项
cv::xfeatures2d::SURF 类参考抽象

用于从图像中提取加速鲁棒特征的类 [21]更多...

#include <opencv2/xfeatures2d/nonfree.hpp>

cv::xfeatures2d::SURF 的协作图

公共成员函数

String getDefaultName () const CV_OVERRIDE
 
virtual bool getExtended () const =0
 
virtual double getHessianThreshold () const =0
 
virtual int getNOctaveLayers () const =0
 
virtual int getNOctaves () const =0
 
virtual bool getUpright () const =0
 
virtual void setExtended (bool extended)=0
 
virtual void setHessianThreshold (double hessianThreshold)=0
 
virtual void setNOctaveLayers (int nOctaveLayers)=0
 
virtual void setNOctaves (int nOctaves)=0
 
virtual void setUpright (bool upright)=0
 
- 从 cv::Feature2D 继承的公共成员函数
virtual ~Feature2D ()
 
virtual void compute (InputArray image, std::vector< KeyPoint > &keypoints, OutputArray descriptors)
 计算图像(第一种变体)或图像集(第二种变体)中检测到的一组关键点的描述符。
 
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())
 检测图像(第一种变体)或图像集(第二种变体)中的关键点。
 
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
 如果检测器对象为空,则返回 true。
 
virtual void read (const FileNode &) CV_OVERRIDE
 从文件存储中读取算法参数。
 
void read (const String &fileName)
 
void write (const Ptr< FileStorage > &fs, const String &name) const
 
void write (const String &fileName) const
 
virtual void write (FileStorage &) const CV_OVERRIDE
 将算法参数存储到文件存储中。
 
void write (FileStorage &fs, const String &name) const
 
- 从 cv::Algorithm 继承的公共成员函数
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 清除算法状态。
 
virtual void save (const String &filename) const
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 
void write (FileStorage &fs, const String &name) const
 

静态公共成员函数

static Ptr< SURFcreate (double hessianThreshold=100, int nOctaves=4, int nOctaveLayers=3, bool extended=false, bool upright=false)
 
- 从 cv::Algorithm 继承的静态公共成员函数
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 从文件中加载算法。
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 从字符串加载算法。
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 从文件节点读取算法。
 

额外的继承成员

- 从 cv::Algorithm 继承的保护成员函数
void writeFormat (FileStorage &fs) const
 

详细描述

用于从图像中提取加速鲁棒特征的类 [21]

算法参数

  • 成员 int extended
    • 0 表示应计算基本描述符(每个 64 个元素)
    • 1 表示应计算扩展描述符(每个 128 个元素)
  • 成员 int upright
    • 0 表示检测器计算每个特征的方向。
    • 1 表示不计算方向(这更快)。例如,如果您匹配立体图像对中的图像,或者进行图像拼接,则匹配的特征可能具有非常相似的角度,并且您可以通过设置 upright=1 来加速特征提取。
  • 成员 double hessianThreshold 关键点检测器的阈值。只有 Hessian 大于 hessianThreshold 的特征才会被检测器保留。因此,值越大,您得到的关键点就越少。一个好的默认值可以是 300 到 500,具体取决于图像对比度。
  • 成员 int nOctaves 检测器使用的高斯金字塔的八度音阶的数量。默认设置为 4。如果您想获得非常大的特征,请使用较大的值。如果您只想获得小特征,请减少它。
  • 成员 int nOctaveLayers 高斯金字塔每个八度音阶内的图像数量。默认设置为 2。
    注意
    • 可以在 opencv_source_code/samples/cpp/generic_descriptor_match.cpp 中找到使用 SURF 特征检测器的示例。
      • 可以在 opencv_source_code/samples/cpp/matcher_simple.cpp 中找到使用 SURF 特征检测器、提取器和匹配器的另一个示例。

成员函数文档

◆ create()

static Ptr< SURF > cv::xfeatures2d::SURF::create ( double hessianThreshold = 100,
int nOctaves = 4,
int nOctaveLayers = 3,
bool extended = false,
bool upright = false )
static
Python
cv.xfeatures2d.SURF.create([, hessianThreshold[, nOctaves[, nOctaveLayers[, extended[, upright]]]]]) -> retval
cv.xfeatures2d.SURF_create([, hessianThreshold[, nOctaves[, nOctaveLayers[, extended[, upright]]]]]) -> retval
参数
hessianThresholdHessian 关键点检测器的阈值,用于 SURF 中。
nOctaves关键点检测器将使用的金字塔八度数量。
nOctaveLayers每个八度内的八度层数量。
extended扩展描述符标志(true - 使用扩展的 128 元素描述符;false - 使用 64 元素描述符)。
upright正立或旋转特征标志(true - 不计算特征方向;false - 计算方向)。

◆ getDefaultName()

String cv::xfeatures2d::SURF::getDefaultName ( ) const
virtual
Python
cv.xfeatures2d.SURF.getDefaultName() -> retval

返回算法字符串标识符。当对象保存到文件或字符串时,此字符串用作顶级 xml/yml 节点标签。

cv::Feature2D 重新实现。

◆ getExtended()

virtual bool cv::xfeatures2d::SURF::getExtended ( ) const
纯虚函数
Python
cv.xfeatures2d.SURF.getExtended() -> retval

◆ getHessianThreshold()

virtual double cv::xfeatures2d::SURF::getHessianThreshold ( ) const
纯虚函数
Python
cv.xfeatures2d.SURF.getHessianThreshold() -> retval

◆ getNOctaveLayers()

virtual int cv::xfeatures2d::SURF::getNOctaveLayers ( ) const
纯虚函数
Python
cv.xfeatures2d.SURF.getNOctaveLayers() -> retval

◆ getNOctaves()

virtual int cv::xfeatures2d::SURF::getNOctaves ( ) const
纯虚函数
Python
cv.xfeatures2d.SURF.getNOctaves() -> retval

◆ getUpright()

virtual bool cv::xfeatures2d::SURF::getUpright ( ) const
纯虚函数
Python
cv.xfeatures2d.SURF.getUpright() -> retval

◆ setExtended()

virtual void cv::xfeatures2d::SURF::setExtended ( bool extended)
纯虚函数
Python
cv.xfeatures2d.SURF.setExtended(extended) ->

◆ setHessianThreshold()

virtual void cv::xfeatures2d::SURF::setHessianThreshold ( double hessianThreshold)
纯虚函数
Python
cv.xfeatures2d.SURF.setHessianThreshold(hessianThreshold) ->

◆ setNOctaveLayers()

virtual void cv::xfeatures2d::SURF::setNOctaveLayers ( int nOctaveLayers)
纯虚函数
Python
cv.xfeatures2d.SURF.setNOctaveLayers(nOctaveLayers) ->

◆ setNOctaves()

virtual void cv::xfeatures2d::SURF::setNOctaves ( int nOctaves)
纯虚函数
Python
cv.xfeatures2d.SURF.setNOctaves(nOctaves) ->

◆ setUpright()

virtual void cv::xfeatures2d::SURF::setUpright ( bool upright)
纯虚函数
Python
cv.xfeatures2d.SURF.setUpright(upright) ->

此类文档由以下文件生成