Fawkes API  Fawkes Development Version
firevision::SiftClassifier Class Reference

SIFT classifier. More...

#include <>>

Inheritance diagram for firevision::SiftClassifier:

Public Member Functions

 SiftClassifier (const char *features_file, unsigned int pixel_width, unsigned int pixel_height, int kdtree_bbf_max_nn_chks=200, float nn_sq_dist_ratio_thr=0.49, int flags=0)
 Constructor. More...
 
virtual ~SiftClassifier ()
 Destructor. More...
 
virtual std::list< ROI > * classify ()
 Classify image. More...
 
- Public Member Functions inherited from firevision::Classifier
 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

- Protected Attributes inherited from firevision::Classifier
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...
 

Detailed Description

SIFT classifier.

This class provides a classifier that uses OpenCV to detect objects in a given image by matching features using SIFT. The objects are reported back as regions of interest. Each ROI contains an object.

This code is based on the sift package provided by Rob Hess. at http://web.engr.oregonstate.edu/~hess/

Author
Stefan Schiffer

Definition at line 48 of file sift.h.

Constructor & Destructor Documentation

◆ SiftClassifier()

firevision::SiftClassifier::SiftClassifier ( const char *  object_file,
unsigned int  pixel_width,
unsigned int  pixel_height,
int  kdtree_bbf_max_nn_chks = 200,
float  nn_sq_dist_ratio_thr = 0.49,
int  flags = 0 
)

Constructor.

Parameters
object_filefile that contains the object to detect
pixel_widthwidth of images that will be processed
pixel_heightheight of images that will be processed
kdtree_bbf_max_nn_chksmaximum number of keypoint NN candidates to check during BBF search
nn_sq_dist_ratio_thrthreshold on squared ratio of distances between NN and 2nd NN
flagsflags, not used yet.

Definition at line 78 of file sift.cpp.

References fawkes::TimeTracker::add_class(), fawkes::TimeTracker::ping_end(), and fawkes::TimeTracker::ping_start().

◆ ~SiftClassifier()

firevision::SiftClassifier::~SiftClassifier ( )
virtual

Destructor.

Definition at line 131 of file sift.cpp.

Member Function Documentation

◆ classify()

std::list< ROI > * firevision::SiftClassifier::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 140 of file sift.cpp.

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


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