Fawkes API  Fawkes Development Version
sift.h
1 
2 /***************************************************************************
3  * sift.h - Feature-based classifier using OpenCV structures
4  *
5  * Created: Mon Mar 15 15:47:11 2008
6  * Copyright 2008 Stefan Schiffer [stefanschiffer.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_CLASSIFIERS_SIFT_H_
25 #define __FIREVISION_CLASSIFIERS_SIFT_H_
26 
27 #ifndef HAVE_SIFT
28 # error SIFT not available, you may not use the SiftClassifier
29 #endif
30 
31 #include <fvclassifiers/classifier.h>
32 
33 //#ifdef FEAT_TIMETRACKER
34 namespace fawkes {
35  class TimeTracker;
36 }
37 //#endif
38 
39 struct CvMemStorage;
40 typedef struct _IplImage IplImage;
41 
42 struct feature;
43 
44 namespace firevision {
45 #if 0 /* just to make Emacs auto-indent happy */
46 }
47 #endif
48 class SiftClassifier : public Classifier
49 {
50  public:
51  SiftClassifier(const char * features_file,
52  unsigned int pixel_width, unsigned int pixel_height,
53  int kdtree_bbf_max_nn_chks = 200, float nn_sq_dist_ratio_thr = 0.49, int flags = 0);
54 
55  virtual ~SiftClassifier();
56 
57  virtual std::list< ROI > * classify();
58 
59  private:
60 
61  const char ** __features_files;
62 
63  IplImage *__obj_img;
64  feature *__obj_features;
65  int __obj_num_features;
66 
67  CvMemStorage *__storage;
68  IplImage *__image;
69 
70  feature* __img_features;
71 
72  float __nn_sq_dist_ratio_thr;
73  int __kdtree_bbf_max_nn_chks;
74  int __flags;
75 
76  //#ifdef FEAT_TIMETRACKER
77  fawkes::TimeTracker *__tt;
78  unsigned int __loop_count;
79  unsigned int __ttc_objconv;
80  unsigned int __ttc_objfeat;
81  unsigned int __ttc_imgconv;
82  unsigned int __ttc_imgfeat;
83  unsigned int __ttc_matchin;
84  unsigned int __ttc_roimerg;
85  //#endif
86 
87 };
88 
89 } // end namespace firevision
90 
91 #endif
Fawkes library namespace.
SIFT classifier.
Definition: sift.h:48
Time tracking utility.
Definition: tracker.h:38
Classifier to extract regions of interest.
Definition: classifier.h:37