Fawkes API
Fawkes Development Version
|
SIFTPP classifier. More...
#include <>>
Classes | |
struct | Feature |
Siftpp Feature struct. More... | |
Public Member Functions | |
SiftppClassifier (const char *features_file, int samplingStep=2, int octaves=4, int levels=3, float magnif=3.0, int noorient=0, int unnormalized=0) | |
Constructor. More... | |
virtual | ~SiftppClassifier () |
Destructor. More... | |
virtual std::list< ROI > * | classify () |
Classify image. More... | |
![]() | |
Classifier (const char *name) | |
Constructor. More... | |
virtual | ~Classifier () |
Destructor. More... | |
virtual void | set_src_buffer (unsigned char *yuv422_planar, unsigned int width, unsigned int height) |
Set source buffer. More... | |
virtual const char * | name () const |
Get name of classifier. More... | |
Additional Inherited Members | |
![]() | |
unsigned char * | _src |
Source buffer, encoded as YUV422_PLANAR. More... | |
unsigned int | _width |
Width in pixels of _src buffer. More... | |
unsigned int | _height |
Height in pixels of _src buffer. More... | |
SIFTPP classifier.
This class provides a classifier that uses SIFTPP 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 siftpp from http://vision.ucla.edu/~vedaldi/code/siftpp/siftpp.html and is partly based on code from their package.
firevision::SiftppClassifier::SiftppClassifier | ( | const char * | object_file, |
int | samplingStep = 2 , |
||
int | octaves = 4 , |
||
int | levels = 3 , |
||
float | magnif = 3.0 , |
||
int | noorient = 0 , |
||
int | unnormalized = 0 |
||
) |
Constructor.
object_file | file that contains an image of the object to detect |
samplingStep | Initial sampling step |
octaves | Number of analysed octaves |
levels | Number of levels per octave |
magnif | Keypoint magnification (default = 3) |
noorient | rotation invariance (0) or upright (1) |
unnormalized | Normalization of features (default 0) |
Definition at line 72 of file siftpp.cpp.
References fawkes::TimeTracker::add_class(), firevision::PNGReader::colorspace(), firevision::SiftppClassifier::Feature::descs, firevision::SiftppClassifier::Feature::key, firevision::SiftppClassifier::Feature::number_of_desc, fawkes::TimeTracker::ping_end(), fawkes::TimeTracker::ping_start(), firevision::PNGReader::pixel_height(), firevision::PNGReader::pixel_width(), firevision::PNGReader::read(), and firevision::PNGReader::set_buffer().
|
virtual |
Destructor.
Definition at line 223 of file siftpp.cpp.
|
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.
Write image to verify correct operation
adding feature-ROI
Implements firevision::Classifier.
Definition at line 235 of file siftpp.cpp.
References firevision::Classifier::_height, firevision::Classifier::_src, firevision::Classifier::_width, firevision::SiftppClassifier::Feature::descs, firevision::SiftppClassifier::Feature::key, firevision::SiftppClassifier::Feature::number_of_desc, fawkes::TimeTracker::ping_end(), fawkes::TimeTracker::ping_start(), and fawkes::TimeTracker::print_to_stdout().