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

实现 ORB (oriented BRIEF) 关键点检测器和描述符提取器 的类。 更多...

#include <opencv2/features2d.hpp>

cv::ORB 的协作图

公共类型

枚举  评分类型 {
  HARRIS_SCORE =0 ,
  FAST_SCORE =1
}
 

公共成员函数

virtual String getDefaultName () const CV_OVERRIDE
 
virtual int getEdgeThreshold () const =0
 
virtual int getFastThreshold () const =0
 
virtual int getFirstLevel () const =0
 
virtual int getMaxFeatures () const =0
 
virtual int getNLevels () const =0
 
virtual int getPatchSize () const =0
 
virtual double getScaleFactor () const =0
 
virtual ORB::ScoreType getScoreType () const =0
 
virtual int getWTA_K () const =0
 
virtual void setEdgeThreshold (int edgeThreshold)=0
 
virtual void setFastThreshold (int fastThreshold)=0
 
virtual void setFirstLevel (int firstLevel)=0
 
virtual void setMaxFeatures (int maxFeatures)=0
 
virtual void setNLevels (int nlevels)=0
 
virtual void setPatchSize (int patchSize)=0
 
virtual void setScaleFactor (double scaleFactor)=0
 
virtual void setScoreType (ORB::ScoreType scoreType)=0
 
virtual void setWTA_K (int wta_k)=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< ORBcreate (int nfeatures=500, float scaleFactor=1.2f, int nlevels=8, int edgeThreshold=31, int firstLevel=0, int WTA_K=2, ORB::ScoreType scoreType=ORB::HARRIS_SCORE, int patchSize=31, int fastThreshold=20)
 ORB 构造函数。
 
- 继承自 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)
 从文件节点读取算法。
 

静态公共属性

static const int kBytes = 32
 

额外继承成员

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

详细描述

实现 ORB (oriented BRIEF) 关键点检测器和描述符提取器 的类。

描述于 [232]。该算法在金字塔中使用 FAST 来检测稳定的关键点,使用 FAST 或 Harris 响应选择最强的特征,使用一阶矩找到它们的方向,并使用 BRIEF 计算描述符(其中随机点对(或 k-元组)的坐标根据测量的方向进行旋转)。

成员枚举文档

◆ 评分类型

枚举器
HARRIS_SCORE 
FAST_SCORE 

成员函数文档

◆ create()

static Ptr< ORB > cv::ORB::create ( int nfeatures = 500,
float scaleFactor = 1.2f,
int nlevels = 8,
int edgeThreshold = 31,
int firstLevel = 0,
int WTA_K = 2,
ORB::ScoreType scoreType = ORB::HARRIS_SCORE,
int patchSize = 31,
int fastThreshold = 20 )
static
Python
cv.ORB.create([, nfeatures[, scaleFactor[, nlevels[, edgeThreshold[, firstLevel[, WTA_K[, scoreType[, patchSize[, fastThreshold]]]]]]]]]) -> retval
cv.ORB_create([, nfeatures[, scaleFactor[, nlevels[, edgeThreshold[, firstLevel[, WTA_K[, scoreType[, patchSize[, fastThreshold]]]]]]]]]) -> retval

ORB 构造函数。

参数
nfeatures要保留的最大特征数。
scaleFactor金字塔抽取率,大于 1。scaleFactor==2 表示经典金字塔,其中每个下一级别比上一级别少 4 倍像素,但如此大的比例因子会显著降低特征匹配分数。另一方面,过接近 1 的比例因子意味着要覆盖一定的尺度范围,您将需要更多的金字塔级别,从而速度会受影响。
nlevels金字塔级别数。最小级别将具有等于 input_image_linear_size/pow(scaleFactor, nlevels - firstLevel) 的线性大小。
edgeThreshold这是不检测特征的边界大小。它应大致与 patchSize 参数匹配。
firstLevel放置源图像的金字塔级别。以前的层将填充放大后的源图像。
WTA_K产生定向 BRIEF 描述符每个元素的点数。默认值 2 表示 BRIEF,我们取一个随机点对并比较它们的亮度,从而得到 0/1 响应。其他可能的值是 3 和 4。例如,3 意味着我们取 3 个随机点(当然,这些点坐标是随机的,但它们是从预定义的种子生成的,因此 BRIEF 描述符的每个元素都是从像素矩形确定性地计算出来的),找到最大亮度的点并输出获胜者索引(0、1 或 2)。这样的输出将占用 2 位,因此需要一种特殊变体的 Hamming 距离,表示为 NORM_HAMMING2(每个 bin 2 位)。当 WTA_K=4 时,我们取 4 个随机点来计算每个 bin(这也将占用 2 位,可能的值为 0、1、2 或 3)。
scoreType默认的 HARRIS_SCORE 意味着使用 Harris 算法对特征进行排序(分数写入 KeyPoint::score 并用于保留最佳 nfeatures 特征);FAST_SCORE 是参数的替代值,它产生的关键点稳定性略低,但计算速度稍快。
patchSize定向 BRIEF 描述符使用的补丁大小。当然,在较小的金字塔层上,特征覆盖的感知图像区域会更大。
fastThresholdFAST 阈值

◆ getDefaultName()

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

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

重新实现自 cv::Feature2D

◆ getEdgeThreshold()

virtual int cv::ORB::getEdgeThreshold ( ) const
纯虚函数
Python
cv.ORB.getEdgeThreshold() -> retval

◆ getFastThreshold()

virtual int cv::ORB::getFastThreshold ( ) const
纯虚函数
Python
cv.ORB.getFastThreshold() -> retval

◆ getFirstLevel()

virtual int cv::ORB::getFirstLevel ( ) const
纯虚函数
Python
cv.ORB.getFirstLevel() -> retval

◆ getMaxFeatures()

virtual int cv::ORB::getMaxFeatures ( ) const
纯虚函数
Python
cv.ORB.getMaxFeatures() -> retval

◆ getNLevels()

virtual int cv::ORB::getNLevels ( ) const
纯虚函数
Python
cv.ORB.getNLevels() -> retval

◆ getPatchSize()

virtual int cv::ORB::getPatchSize ( ) const
纯虚函数
Python
cv.ORB.getPatchSize() -> retval

◆ getScaleFactor()

virtual double cv::ORB::getScaleFactor ( ) const
纯虚函数
Python
cv.ORB.getScaleFactor() -> retval

◆ getScoreType()

virtual ORB::ScoreType cv::ORB::getScoreType ( ) const
纯虚函数
Python
cv.ORB.getScoreType() -> retval

◆ getWTA_K()

virtual int cv::ORB::getWTA_K ( ) const
纯虚函数
Python
cv.ORB.getWTA_K() -> retval

◆ setEdgeThreshold()

virtual void cv::ORB::setEdgeThreshold ( int edgeThreshold)
纯虚函数
Python
cv.ORB.setEdgeThreshold(edgeThreshold) ->

◆ setFastThreshold()

virtual void cv::ORB::setFastThreshold ( int fastThreshold)
纯虚函数
Python
cv.ORB.setFastThreshold(fastThreshold) ->

◆ setFirstLevel()

virtual void cv::ORB::setFirstLevel ( int firstLevel)
纯虚函数
Python
cv.ORB.setFirstLevel(firstLevel) ->

◆ setMaxFeatures()

virtual void cv::ORB::setMaxFeatures ( int maxFeatures)
纯虚函数
Python
cv.ORB.setMaxFeatures(maxFeatures) ->

◆ setNLevels()

virtual void cv::ORB::setNLevels ( int nlevels)
纯虚函数
Python
cv.ORB.setNLevels(nlevels) ->

◆ setPatchSize()

virtual void cv::ORB::setPatchSize ( int patchSize)
纯虚函数
Python
cv.ORB.setPatchSize(patchSize) ->

◆ setScaleFactor()

virtual void cv::ORB::setScaleFactor ( double scaleFactor)
纯虚函数
Python
cv.ORB.setScaleFactor(scaleFactor) ->

◆ setScoreType()

virtual void cv::ORB::setScoreType ( ORB::ScoreType scoreType)
纯虚函数
Python
cv.ORB.setScoreType(scoreType) ->

◆ setWTA_K()

virtual void cv::ORB::setWTA_K ( int wta_k)
纯虚函数
Python
cv.ORB.setWTA_K(wta_k) ->

成员数据文档

◆ kBytes

const int cv::ORB::kBytes = 32
static

此类的文档生成自以下文件