faster_learn Struct Reference
[Functions for detecting corners of various types.]

#include <faster_detector.h>

Inheritance diagram for faster_learn:

DetectT

List of all members.


Detailed Description

FAST-ER detector.

Definition at line 36 of file faster_detector.h.


Public Member Functions

virtual void operator() (const CVD::Image< CVD::byte > &i, std::vector< CVD::ImageRef > &c, unsigned int N) const
 faster_learn (const std::string &fname)

Private Attributes

std::auto_ptr
< tree_element
tree

Constructor & Destructor Documentation

faster_learn::faster_learn ( const std::string &  fname  ) 

Initialize a detector.

Parameters:
fname File to load the detector from. This was created from learn_detector.

Definition at line 72 of file faster_detector.cc.

References load_a_tree(), and block_bytecode::print().

00073 {
00074     init();
00075     ifstream i;
00076     i.open(fname.c_str());
00077 
00078     if(!i.good())
00079     {
00080         cerr << "Error: " << fname << ": " << strerror(errno) << endl;
00081         exit(1);
00082     }
00083     
00084     try{
00085         tree.reset(load_a_tree(i));
00086     }
00087     catch(ParseError p)
00088     {
00089         cerr << "Parse error in " << fname << endl;
00090         exit(1);
00091     }
00092 
00093     if(GV3::get<bool>("faster_tree.print_tree", 0, 1))
00094     {
00095         clog << "Tree:" << endl;
00096         tree->print(clog);
00097     }
00098 
00099     if(GV3::get<bool>("faster_tree.print_block", 0, 1))
00100     {
00101         block_bytecode f2 = tree->make_fast_detector(100);
00102         f2.print(clog,  100);
00103     }
00104 }


Member Function Documentation

void faster_learn::operator() ( const CVD::Image< CVD::byte > &  i,
std::vector< CVD::ImageRef > &  c,
unsigned int  N 
) const [virtual]

Detect corners.

Parameters:
i Image in which to detect corners
c Detected corners are inserted in to this container
N Threshold used to detect corners

Implements DetectT.

Definition at line 107 of file faster_detector.cc.

References tree_detect_corners().

00108 {
00109     Image<int> scratch(i.size(), 0);
00110 
00111     v = tree_detect_corners(i, tree.get(), t, scratch);
00112 }


Member Data Documentation

std::auto_ptr<tree_element> faster_learn::tree [private]

Loaded FAST-ER tree.

Definition at line 50 of file faster_detector.h.


The documentation for this struct was generated from the following files:
Generated on Mon Mar 2 12:47:14 2009 for FAST-ER by  doxygen 1.5.3