grid_filter.hpp
Go to the documentation of this file.
00001 #ifndef __fovis_grid_filter_hpp__
00002 #define __fovis_grid_filter_hpp__
00003 
00004 #include <math.h>
00005 #include <vector>
00006 #include "keypoint.hpp"
00007 
00008 namespace fovis
00009 {
00010 
00014 class GridKeyPointFilter {
00015 public:
00032   GridKeyPointFilter (int img_width, int img_height, int bucket_width, 
00033                       int bucket_height, int max_keypoints_per_bucket) :
00034       _img_width(img_width), _img_height(img_height),
00035       _bucket_width(bucket_width), _bucket_height(bucket_height),
00036       _max_keypoints_per_bucket(max_keypoints_per_bucket),
00037       _grid_rows(ceil((float)img_height/bucket_height)), 
00038       _grid_cols(ceil((float)img_width/bucket_width)),
00039       _buckets(_grid_rows * _grid_cols)
00040   { 
00041   }
00042 
00049   void filter(std::vector<KeyPoint>* keypoints);
00050 
00051 private:
00052   int _img_width;
00053   int _img_height;
00054   int _bucket_width;
00055   int _bucket_height;
00056   int _max_keypoints_per_bucket; 
00057   int _grid_rows;
00058   int _grid_cols;
00059   std::vector<std::vector<KeyPoint> > _buckets;
00060 
00061 };
00062 
00063 }
00064 
00065 #endif


libfovis
Author(s): Albert Huang, Maurice Fallon
autogenerated on Thu Jun 6 2019 20:16:12