firevision::SurfClassifier Class Reference

SURF classifier. More...

#include <classifiers/surf.h>

Inheritance diagram for firevision::SurfClassifier:

[legend]
List of all members.

Public Member Functions

 SurfClassifier (std::string keypoints_descriptor_txt_file, unsigned int min_match=5, float min_match_ratio=MIN_MATCH_RATIO, int samplingStep=2, int octaves=4, double thres=4.0, bool doubleImageSize=false, int initLobe=3, bool upright=false, bool extended=false, int indexSize=4)
 Constructor.
 SurfClassifier (const char *image_directory_png_files, unsigned int min_match=5, float min_match_ratio=MIN_MATCH_RATIO, int samplingStep=2, int octaves=4, double thres=4.0, bool doubleImageSize=false, int initLobe=3, bool upright=false, bool extended=false, int indexSize=4)
 Constructor.
virtual ~SurfClassifier ()
 Destructor.
virtual std::list< ROI > * classify ()
 Classify image.

Detailed Description

SURF classifier.

This class provides a classifier that uses SURF to detect objects in a given image by matching features. The objects are reported back as regions of interest. Each ROI contains an object. ROIs with 11x11 are matched features.

This code uses libSurf from http://www.vision.ee.ethz.ch/~surf/ and is partly based on code from their package.

Author:
Stefan Schiffer

Definition at line 65 of file surf.h.


Constructor & Destructor Documentation

firevision::SurfClassifier::SurfClassifier ( std::string  keypoints_dir,
unsigned int  min_match = 5,
float  min_match_ratio = MIN_MATCH_RATIO,
int  samplingStep = 2,
int  octaves = 4,
double  thres = 4.0,
bool  doubleImageSize = false,
int  initLobe = 3,
bool  upright = false,
bool  extended = false,
int  indexSize = 4 
)

Constructor.

Parameters:
keypoints_dir location of the keypoints (descriptor file as a txt file) for the reference objects
samplingStep Initial sampling step
min_match minimum number of features that have to be matched per ROI
min_match_ratio minimum ratio of features matched per object to be matched per ROI
octaves Number of analysed octaves
thres Blob response treshold
doubleImageSize true to double the image size, false to keep original
initLobe Initial lobe size, default 3 and 5 (with double image size)
upright rotation invariance (fasle) or upright (true)
extended true to use the extended descriptor (SURF 128)
indexSize Spatial size of the descriptor window (default 4)

surf::ImLoad::saveImage( "obj.pgm", __obj_img);

Definition at line 216 of file surf.cpp.

References fawkes::TimeTracker::add_class(), firevision::loadIpoints(), fawkes::LibLogger::log_error(), fawkes::TimeTracker::ping_end(), and fawkes::TimeTracker::ping_start().

firevision::SurfClassifier::SurfClassifier ( const char *  object_dir,
unsigned int  min_match = 5,
float  min_match_ratio = MIN_MATCH_RATIO,
int  samplingStep = 2,
int  octaves = 4,
double  thres = 4.0,
bool  doubleImageSize = false,
int  initLobe = 3,
bool  upright = false,
bool  extended = false,
int  indexSize = 4 
)

Constructor.

Parameters:
object_dir file that contains an image of the object to detect
samplingStep Initial sampling step
min_match minimum number of features that have to be matched per ROI
min_match_ratio minimum ratio of features matched per object to be matched per ROI
octaves Number of analysed octaves
thres Blob response treshold
doubleImageSize true to double the image size, false to keep original
initLobe Initial lobe size, default 3 and 5 (with double image size)
upright rotation invariance (fasle) or upright (true)
extended true to use the extended descriptor (SURF 128)
indexSize Spatial size of the descriptor window (default 4)

surf::ImLoad::saveImage( "obj.pgm", __obj_img);

Definition at line 335 of file surf.cpp.

References fawkes::TimeTracker::add_class(), fawkes::LibLogger::log_error(), firevision::malloc_buffer(), fawkes::TimeTracker::ping_end(), fawkes::TimeTracker::ping_start(), and firevision::saveIpoints().

firevision::SurfClassifier::~SurfClassifier (  )  [virtual]

Destructor.

Definition at line 520 of file surf.cpp.


Member Function Documentation

std::list< ROI > * firevision::SurfClassifier::classify (  )  [virtual]

Classify image.

The current buffer is processed and scanned for the features the classifier has been written and initialized for. It returns a list of disjunct regions of interest.

Returns:
disjunct list of extracted regions of interest

Implements firevision::Classifier.

Definition at line 527 of file surf.cpp.

References firevision::Classifier::_height, firevision::Classifier::_src, firevision::Classifier::_width, fawkes::cblue, fawkes::cgreen, fawkes::cnormal, firevision::ROI::num_hint_points, fawkes::TimeTracker::ping_end(), and fawkes::TimeTracker::ping_start().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:31:43 2011 for Fawkes API by  doxygen 1.4.7