OpenCV453
公開メンバ関数 | 静的公開メンバ関数 | 限定公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
cv::BFMatcher クラス

Brute-force descriptor matcher. [詳解]

#include <features2d.hpp>

cv::DescriptorMatcherを継承しています。

公開メンバ関数

CV_WRAP BFMatcher (int normType=NORM_L2, bool crossCheck=false)
 Brute-force matcher constructor (obsolete). Please use BFMatcher.create()
 
virtual bool isMaskSupported () const CV_OVERRIDE
 Returns true if the descriptor matcher supports masking permissible matches. [詳解]
 
virtual Ptr< DescriptorMatcherclone (bool emptyTrainData=false) const CV_OVERRIDE
 Clones the matcher. [詳解]
 
- 基底クラス cv::DescriptorMatcher に属する継承公開メンバ関数
virtual CV_WRAP void add (InputArrayOfArrays descriptors)
 Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor collection. [詳解]
 
CV_WRAP const std::vector< Mat > & getTrainDescriptors () const
 Returns a constant link to the train descriptor collection trainDescCollection .
 
virtual CV_WRAP void clear () CV_OVERRIDE
 Clears the train descriptor collections. [詳解]
 
virtual CV_WRAP bool empty () const CV_OVERRIDE
 Returns true if there are no train descriptors in the both collections. [詳解]
 
virtual CV_WRAP void train ()
 Trains a descriptor matcher [詳解]
 
CV_WRAP void match (InputArray queryDescriptors, InputArray trainDescriptors, CV_OUT std::vector< DMatch > &matches, InputArray mask=noArray()) const
 Finds the best match for each descriptor from a query set. [詳解]
 
CV_WRAP void knnMatch (InputArray queryDescriptors, InputArray trainDescriptors, CV_OUT std::vector< std::vector< DMatch > > &matches, int k, InputArray mask=noArray(), bool compactResult=false) const
 Finds the k best matches for each descriptor from a query set. [詳解]
 
CV_WRAP void radiusMatch (InputArray queryDescriptors, InputArray trainDescriptors, CV_OUT std::vector< std::vector< DMatch > > &matches, float maxDistance, InputArray mask=noArray(), bool compactResult=false) const
 For each query descriptor, finds the training descriptors not farther than the specified distance. [詳解]
 
CV_WRAP void match (InputArray queryDescriptors, CV_OUT std::vector< DMatch > &matches, InputArrayOfArrays masks=noArray())
 
CV_WRAP void knnMatch (InputArray queryDescriptors, CV_OUT std::vector< std::vector< DMatch > > &matches, int k, InputArrayOfArrays masks=noArray(), bool compactResult=false)
 
CV_WRAP void radiusMatch (InputArray queryDescriptors, CV_OUT std::vector< std::vector< DMatch > > &matches, float maxDistance, InputArrayOfArrays masks=noArray(), bool compactResult=false)
 
CV_WRAP void write (const String &fileName) const
 
CV_WRAP void read (const String &fileName)
 
virtual CV_WRAP void read (const FileNode &) CV_OVERRIDE
 Reads algorithm parameters from a file storage [詳解]
 
virtual void write (FileStorage &) const CV_OVERRIDE
 Stores algorithm parameters in a file storage [詳解]
 
CV_WRAP void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 
- 基底クラス cv::Algorithm に属する継承公開メンバ関数
CV_WRAP void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
 
virtual CV_WRAP void save (const String &filename) const
 
virtual CV_WRAP String getDefaultName () const
 

静的公開メンバ関数

static CV_WRAP Ptr< BFMatchercreate (int normType=NORM_L2, bool crossCheck=false)
 Brute-force matcher create method. [詳解]
 
- 基底クラス cv::DescriptorMatcher に属する継承静的公開メンバ関数
static CV_WRAP Ptr< DescriptorMatchercreate (const String &descriptorMatcherType)
 Creates a descriptor matcher of a given type with the default parameters (using default constructor). [詳解]
 
static CV_WRAP Ptr< DescriptorMatchercreate (const DescriptorMatcher::MatcherType &matcherType)
 
- 基底クラス cv::Algorithm に属する継承静的公開メンバ関数
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node [詳解]
 
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file [詳解]
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String [詳解]
 

限定公開メンバ関数

virtual void knnMatchImpl (InputArray queryDescriptors, std::vector< std::vector< DMatch > > &matches, int k, InputArrayOfArrays masks=noArray(), bool compactResult=false) CV_OVERRIDE
 
virtual void radiusMatchImpl (InputArray queryDescriptors, std::vector< std::vector< DMatch > > &matches, float maxDistance, InputArrayOfArrays masks=noArray(), bool compactResult=false) CV_OVERRIDE
 
- 基底クラス cv::DescriptorMatcher に属する継承限定公開メンバ関数
void checkMasks (InputArrayOfArrays masks, int queryDescriptorsCount) const
 
- 基底クラス cv::Algorithm に属する継承限定公開メンバ関数
void writeFormat (FileStorage &fs) const
 

限定公開変数類

int normType
 
bool crossCheck
 
- 基底クラス cv::DescriptorMatcher に属する継承限定公開変数類
std::vector< MattrainDescCollection
 Collection of descriptors from train images.
 
std::vector< UMatutrainDescCollection
 

その他の継承メンバ

- 基底クラス cv::DescriptorMatcher に属する継承公開型
enum  MatcherType {
  FLANNBASED = 1 , BRUTEFORCE = 2 , BRUTEFORCE_L1 = 3 , BRUTEFORCE_HAMMING = 4 ,
  BRUTEFORCE_HAMMINGLUT = 5 , BRUTEFORCE_SL2 = 6
}
 
- 基底クラス cv::DescriptorMatcher に属する継承静的限定公開メンバ関数
static bool isPossibleMatch (InputArray mask, int queryIdx, int trainIdx)
 
static bool isMaskedOut (InputArrayOfArrays masks, int queryIdx)
 
static Mat clone_op (Mat m)
 

詳解

Brute-force descriptor matcher.

For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches of descriptor sets.

関数詳解

◆ clone()

virtual Ptr< DescriptorMatcher > cv::BFMatcher::clone ( bool  emptyTrainData = false) const
virtual

Clones the matcher.

引数
emptyTrainDataIf emptyTrainData is false, the method creates a deep copy of the object, that is, copies both parameters and train data. If emptyTrainData is true, the method creates an object copy with the current parameters but with empty train data.

cv::DescriptorMatcherを実装しています。

◆ create()

static CV_WRAP Ptr< BFMatcher > cv::BFMatcher::create ( int  normType = NORM_L2,
bool  crossCheck = false 
)
static

Brute-force matcher create method.

引数
normTypeOne of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor description).
crossCheckIf it is false, this is will be default BFMatcher behaviour when it finds the k nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the matcher's collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent pairs. Such technique usually produces best results with minimal number of outliers when there are enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.

◆ isMaskSupported()

virtual bool cv::BFMatcher::isMaskSupported ( ) const
inlinevirtual

Returns true if the descriptor matcher supports masking permissible matches.

cv::DescriptorMatcherを実装しています。

◆ knnMatchImpl()

virtual void cv::BFMatcher::knnMatchImpl ( InputArray  queryDescriptors,
std::vector< std::vector< DMatch > > &  matches,
int  k,
InputArrayOfArrays  masks = noArray(),
bool  compactResult = false 
)
protectedvirtual

In fact the matching is implemented only by the following two methods. These methods suppose that the class object has been trained already. Public match methods call these methods after calling train().

cv::DescriptorMatcherを実装しています。

◆ radiusMatchImpl()

virtual void cv::BFMatcher::radiusMatchImpl ( InputArray  queryDescriptors,
std::vector< std::vector< DMatch > > &  matches,
float  maxDistance,
InputArrayOfArrays  masks = noArray(),
bool  compactResult = false 
)
protectedvirtual

cv::DescriptorMatcherを実装しています。


このクラス詳解は次のファイルから抽出されました: