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

此類的文件生成自以下檔案