KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cv_features_to_track.h
Go to the documentation of this file.
1 /* =========================================================================== *
2  |
3  | Copyright (c) 1994-2011 by Kobus Barnard (author)
4  |
5  | Personal and educational use of this code is granted, provided that this
6  | header is kept intact, and that the authorship is not misrepresented, that
7  | its use is acknowledged in publications, and relevant papers are cited.
8  |
9  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
10  |
11  | Please note that the code in this file has not necessarily been adequately
12  | tested. Naturally, there is no guarantee of performance, support, or fitness
13  | for any particular task. Nonetheless, I am interested in hearing about
14  | problems that you encounter.
15  |
16  | Author: Jinyan Guan
17  * =========================================================================== */
18 
19 /* $Id: cv_features_to_track.h 17393 2014-08-23 20:19:14Z predoehl $ */
20 
21 #ifndef CV_FEATURES_TO_TRACK_DETECTOR_H_
22 #define CV_FEATURES_TO_TRACK_DETECTOR_H_
23 
24 #ifdef KJB_HAVE_OPENCV
25 #include <wrap_opencv_cpp/cv.h>
26 #endif
27 
28 #include <i_cpp/i_image.h>
29 #include <m_cpp/m_vector.h>
30 
31 #define DEFAULT_QUALITY_LEVEL 0.05
32 #define DEFAULT_MIN_DISTANCE 5.0
33 #define DEFAULT_BLOCK_SIZE 3
34 #define DEFAULT_K_VALUE 0.04
35 //#define DEFAULT_MAX_CORNERS 500
36 
37 namespace kjb
38 {
39 namespace opencv
40 {
41 
43 {
44 public:
45  // Constructor
47  quality_level(DEFAULT_QUALITY_LEVEL),
48  min_distance(DEFAULT_MIN_DISTANCE),
49  block_size(DEFAULT_BLOCK_SIZE),
50  use_harris(false),
52  {}
53 
55  (
56  double quality_level_,
57  double min_distance_,
58  int block_size_,
59  bool use_harris_,
60  double k_
61  ) :
62  quality_level(quality_level_),
63  min_distance(min_distance_),
64  block_size(block_size_),
65  use_harris(use_harris_),
66  k(k_)
67  {}
68 
70 
71 
72 public:
73  std::vector<Vector> find_good_features
74  (
75  const Image& image
76  ) const;
77 
78  std::vector<Vector> find_good_features
79  (
80  const Image& image,
81  int lower_left_x,
82  int lower_left_y,
83  int higher_right_x,
84  int higher_right_y
85  ) const;
86 
87 private:
88 
93  double quality_level;
94 
99  double min_distance;
100 
104  int block_size;
105 
109  bool use_harris;
110 
114  double k;
115 
116 };
117 
118 
119 
120 } //namespace opencv
121 } // namespace kjb
122 
123 
124 
125 #endif /* CV_FEATURES_TO_TRACK_DETECTOR_H_ */
#define DEFAULT_QUALITY_LEVEL
Definition: cv_features_to_track.h:31
CV_features_to_track_detector()
Definition: cv_features_to_track.h:46
std::vector< Vector > find_good_features(const Image &image) const
Definition: cv_features_to_track.h:42
#define DEFAULT_BLOCK_SIZE
Definition: cv_features_to_track.h:33
~CV_features_to_track_detector()
Definition: cv_features_to_track.h:69
#define DEFAULT_K_VALUE
Definition: cv_features_to_track.h:34
#define DEFAULT_MIN_DISTANCE
Definition: cv_features_to_track.h:32
Code for a wrapper class around the C struct KJB_Image.
Wrapped version of the C struct KJB_image.
Definition: i_image.h:76
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...