Fawkes API  Fawkes Development Version
firevision::SurfClassifier Class Reference

SURF classifier. More...

#include <>>

Inheritance diagram for firevision::SurfClassifier:

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

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_dirlocation of the keypoints (descriptor file as a txt file) for the reference objects
samplingStepInitial sampling step
min_matchminimum number of features that have to be matched per ROI
min_match_ratiominimum ratio of features matched per object to be matched per ROI
octavesNumber of analysed octaves
thresBlob response treshold
doubleImageSizetrue to double the image size, false to keep original
initLobeInitial lobe size, default 3 and 5 (with double image size)
uprightrotation invariance (fasle) or upright (true)
extendedtrue to use the extended descriptor (SURF 128)
indexSizeSpatial 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(), fawkes::TimeTracker::ping_start(), fawkes::LibLogger::log_error(), and fawkes::TimeTracker::ping_end().

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_dirfile that contains an image of the object to detect
samplingStepInitial sampling step
min_matchminimum number of features that have to be matched per ROI
min_match_ratiominimum ratio of features matched per object to be matched per ROI
octavesNumber of analysed octaves
thresBlob response treshold
doubleImageSizetrue to double the image size, false to keep original
initLobeInitial lobe size, default 3 and 5 (with double image size)
uprightrotation invariance (fasle) or upright (true)
extendedtrue to use the extended descriptor (SURF 128)
indexSizeSpatial 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::TimeTracker::ping_start(), fawkes::LibLogger::log_error(), and fawkes::TimeTracker::ping_end().

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

adding feature-ROI

increment feature-match-count

Implements firevision::Classifier.

Definition at line 527 of file surf.cpp.

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


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