sift_gpu_wrapper.h
Go to the documentation of this file.
00001 /* This file was inspired by RGBDSLAM.
00002  */
00003 
00004 
00005 #ifndef SIFT_GPU_FEATURE_DETECTOR_H
00006 #define SIFT_GPU_FEATURE_DETECTOR_H
00007 
00008 //#ifdef USE_SIFT_GPU
00009 #include <opencv2/features2d/features2d.hpp>
00010 #include <opencv/cv.h>
00011 #include <SiftGPU/SiftGPU.h>
00012 
00018 class SiftGPUWrapper {
00019 public:
00023         virtual ~SiftGPUWrapper();
00024 
00035         void detect(const cv::Mat& image, cv::vector<cv::KeyPoint>& keypoints, std::vector<float>& descriptors, const cv::Mat& mask = cv::Mat()) const;
00036 
00047         int match(const std::vector<float>& descriptors1, int num1, const std::vector<float>& descriptors2, int num2, std::vector<cv::DMatch>* matches);
00048 
00052         static SiftGPUWrapper* getInstance();
00053         static void destroyInstance();
00054 
00055 private:
00059         SiftGPUWrapper();
00060 
00061         void initializeMatcher();
00062 
00070         void cvMatToSiftGPU(const cv::Mat& image, unsigned char* siftImage) const;
00071 
00080         void writePGM(FILE *fp, unsigned char* data, int width, int height);
00081 
00082         static const int imageWidth = 640;          
00083         static const int imageHeight = 480;         
00084 
00085         static SiftGPUWrapper* instance;    
00086         SiftGPU* siftgpu;                           
00087         SiftMatchGPU *matcher;                      
00088         bool isMatcherInitialized;                  
00089         bool error;                                 
00090         unsigned char* data;                        
00091 };
00092 
00093 #endif
00094 //#endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rgbd_registration
Author(s): Ross Kidson
autogenerated on Sun Oct 6 2013 12:00:40