OpenCV  2.4.13.2
Open Source Computer Vision
cv::FernClassifier Class Reference

#include <legacy.hpp>

Classes

struct  Feature
 

Public Types

enum  {
  PATCH_SIZE = 31, DEFAULT_STRUCTS = 50, DEFAULT_STRUCT_SIZE = 9, DEFAULT_VIEWS = 5000,
  DEFAULT_SIGNATURE_SIZE = 176, COMPRESSION_NONE = 0, COMPRESSION_RANDOM_PROJ = 1, COMPRESSION_PCA = 2,
  DEFAULT_COMPRESSION_METHOD = COMPRESSION_NONE
}
 

Public Member Functions

 FernClassifier ()
 
 FernClassifier (const FileNode &node)
 
 FernClassifier (const vector< vector< Point2f > > &points, const vector< Mat > &refimgs, const vector< vector< int > > &labels=vector< vector< int > >(), int _nclasses=0, int _patchSize=PATCH_SIZE, int _signatureSize=DEFAULT_SIGNATURE_SIZE, int _nstructs=DEFAULT_STRUCTS, int _structSize=DEFAULT_STRUCT_SIZE, int _nviews=DEFAULT_VIEWS, int _compressionMethod=COMPRESSION_NONE, const PatchGenerator &patchGenerator=PatchGenerator())
 
virtual ~FernClassifier ()
 
virtual void read (const FileNode &n)
 
virtual void write (FileStorage &fs, const String &name=String()) const
 
virtual void trainFromSingleView (const Mat &image, const vector< KeyPoint > &keypoints, int _patchSize=PATCH_SIZE, int _signatureSize=DEFAULT_SIGNATURE_SIZE, int _nstructs=DEFAULT_STRUCTS, int _structSize=DEFAULT_STRUCT_SIZE, int _nviews=DEFAULT_VIEWS, int _compressionMethod=COMPRESSION_NONE, const PatchGenerator &patchGenerator=PatchGenerator())
 
virtual void train (const vector< vector< Point2f > > &points, const vector< Mat > &refimgs, const vector< vector< int > > &labels=vector< vector< int > >(), int _nclasses=0, int _patchSize=PATCH_SIZE, int _signatureSize=DEFAULT_SIGNATURE_SIZE, int _nstructs=DEFAULT_STRUCTS, int _structSize=DEFAULT_STRUCT_SIZE, int _nviews=DEFAULT_VIEWS, int _compressionMethod=COMPRESSION_NONE, const PatchGenerator &patchGenerator=PatchGenerator())
 
virtual int operator() (const Mat &img, Point2f kpt, vector< float > &signature) const
 
virtual int operator() (const Mat &patch, vector< float > &signature) const
 
virtual void clear ()
 
virtual bool empty () const
 
void setVerbose (bool verbose)
 
int getClassCount () const
 
int getStructCount () const
 
int getStructSize () const
 
int getSignatureSize () const
 
int getCompressionMethod () const
 
Size getPatchSize () const
 

Protected Member Functions

virtual void prepare (int _nclasses, int _patchSize, int _signatureSize, int _nstructs, int _structSize, int _nviews, int _compressionMethod)
 
virtual void finalize (RNG &rng)
 
virtual int getLeaf (int fidx, const Mat &patch) const
 

Protected Attributes

bool verbose
 
int nstructs
 
int structSize
 
int nclasses
 
int signatureSize
 
int compressionMethod
 
int leavesPerStruct
 
Size patchSize
 
vector< Featurefeatures
 
vector< intclassCounters
 
vector< float > posteriors
 

Member Enumeration Documentation

§ anonymous enum

anonymous enum
Enumerator
PATCH_SIZE 
DEFAULT_STRUCTS 
DEFAULT_STRUCT_SIZE 
DEFAULT_VIEWS 
DEFAULT_SIGNATURE_SIZE 
COMPRESSION_NONE 
COMPRESSION_RANDOM_PROJ 
COMPRESSION_PCA 
DEFAULT_COMPRESSION_METHOD 

Constructor & Destructor Documentation

§ FernClassifier() [1/3]

cv::FernClassifier::FernClassifier ( )

§ FernClassifier() [2/3]

cv::FernClassifier::FernClassifier ( const FileNode node)

§ FernClassifier() [3/3]

cv::FernClassifier::FernClassifier ( const vector< vector< Point2f > > &  points,
const vector< Mat > &  refimgs,
const vector< vector< int > > &  labels = vector< vector< int > >(),
int  _nclasses = 0,
int  _patchSize = PATCH_SIZE,
int  _signatureSize = DEFAULT_SIGNATURE_SIZE,
int  _nstructs = DEFAULT_STRUCTS,
int  _structSize = DEFAULT_STRUCT_SIZE,
int  _nviews = DEFAULT_VIEWS,
int  _compressionMethod = COMPRESSION_NONE,
const PatchGenerator patchGenerator = PatchGenerator() 
)

§ ~FernClassifier()

virtual cv::FernClassifier::~FernClassifier ( )
virtual

Member Function Documentation

§ clear()

virtual void cv::FernClassifier::clear ( )
virtual

§ empty()

virtual bool cv::FernClassifier::empty ( ) const
virtual

§ finalize()

virtual void cv::FernClassifier::finalize ( RNG rng)
protectedvirtual

§ getClassCount()

int cv::FernClassifier::getClassCount ( ) const

§ getCompressionMethod()

int cv::FernClassifier::getCompressionMethod ( ) const

§ getLeaf()

virtual int cv::FernClassifier::getLeaf ( int  fidx,
const Mat patch 
) const
protectedvirtual

§ getPatchSize()

Size cv::FernClassifier::getPatchSize ( ) const

§ getSignatureSize()

int cv::FernClassifier::getSignatureSize ( ) const

§ getStructCount()

int cv::FernClassifier::getStructCount ( ) const

§ getStructSize()

int cv::FernClassifier::getStructSize ( ) const

§ operator()() [1/2]

virtual int cv::FernClassifier::operator() ( const Mat img,
Point2f  kpt,
vector< float > &  signature 
) const
virtual

§ operator()() [2/2]

virtual int cv::FernClassifier::operator() ( const Mat patch,
vector< float > &  signature 
) const
virtual

§ prepare()

virtual void cv::FernClassifier::prepare ( int  _nclasses,
int  _patchSize,
int  _signatureSize,
int  _nstructs,
int  _structSize,
int  _nviews,
int  _compressionMethod 
)
protectedvirtual

§ read()

virtual void cv::FernClassifier::read ( const FileNode n)
virtual

§ setVerbose()

void cv::FernClassifier::setVerbose ( bool  verbose)

§ train()

virtual void cv::FernClassifier::train ( const vector< vector< Point2f > > &  points,
const vector< Mat > &  refimgs,
const vector< vector< int > > &  labels = vector< vector< int > >(),
int  _nclasses = 0,
int  _patchSize = PATCH_SIZE,
int  _signatureSize = DEFAULT_SIGNATURE_SIZE,
int  _nstructs = DEFAULT_STRUCTS,
int  _structSize = DEFAULT_STRUCT_SIZE,
int  _nviews = DEFAULT_VIEWS,
int  _compressionMethod = COMPRESSION_NONE,
const PatchGenerator patchGenerator = PatchGenerator() 
)
virtual

§ trainFromSingleView()

virtual void cv::FernClassifier::trainFromSingleView ( const Mat image,
const vector< KeyPoint > &  keypoints,
int  _patchSize = PATCH_SIZE,
int  _signatureSize = DEFAULT_SIGNATURE_SIZE,
int  _nstructs = DEFAULT_STRUCTS,
int  _structSize = DEFAULT_STRUCT_SIZE,
int  _nviews = DEFAULT_VIEWS,
int  _compressionMethod = COMPRESSION_NONE,
const PatchGenerator patchGenerator = PatchGenerator() 
)
virtual

§ write()

virtual void cv::FernClassifier::write ( FileStorage fs,
const String name = String() 
) const
virtual

Member Data Documentation

§ classCounters

vector<int> cv::FernClassifier::classCounters
protected

§ compressionMethod

int cv::FernClassifier::compressionMethod
protected

§ features

vector<Feature> cv::FernClassifier::features
protected

§ leavesPerStruct

int cv::FernClassifier::leavesPerStruct
protected

§ nclasses

int cv::FernClassifier::nclasses
protected

§ nstructs

int cv::FernClassifier::nstructs
protected

§ patchSize

Size cv::FernClassifier::patchSize
protected

§ posteriors

vector<float> cv::FernClassifier::posteriors
protected

§ signatureSize

int cv::FernClassifier::signatureSize
protected

§ structSize

int cv::FernClassifier::structSize
protected

§ verbose

bool cv::FernClassifier::verbose
protected

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