SiftMatchCU.h
Go to the documentation of this file.
00001 
00002 //      File:           SiftMatchCU.h
00003 //      Author:         Changchang Wu
00004 //      Description :   interface for the SiftMatchCU
00006 //      Copyright (c) 2007 University of North Carolina at Chapel Hill
00007 //      All Rights Reserved
00008 //
00009 //      Permission to use, copy, modify and distribute this software and its
00010 //      documentation for educational, research and non-profit purposes, without
00011 //      fee, and without a written agreement is hereby granted, provided that the
00012 //      above copyright notice and the following paragraph appear in all copies.
00013 //      
00014 //      The University of North Carolina at Chapel Hill make no representations
00015 //      about the suitability of this software for any purpose. It is provided
00016 //      'as is' without express or implied warranty. 
00017 //
00018 //      Please send BUG REPORTS to ccwu@cs.unc.edu
00019 //
00021 
00022 
00023 
00024 #ifndef CU_SIFT_MATCH_H
00025 #define CU_SIFT_MATCH_H
00026 #if defined(CUDA_SIFTGPU_ENABLED)
00027 
00028 class CuTexImage;
00029 class SiftMatchCU:public SiftMatchGPU
00030 {
00031 private:
00032         //tex storage
00033         CuTexImage _texLoc[2];
00034         CuTexImage _texDes[2];
00035         CuTexImage _texDot;
00036         CuTexImage _texMatch[2];
00037         CuTexImage _texCRT;
00038 
00039         //programs
00040         //
00041         int _max_sift; 
00042         int _num_sift[2];
00043         int _id_sift[2];
00044         int _have_loc[2];
00045 
00046         //gpu parameter
00047         int _initialized;
00048         vector<int> sift_buffer; 
00049 private:
00050         int  GetBestMatch(int max_match, int match_buffer[][2], float distmax, float ratiomax, int mbm);
00051 public:
00052         SiftMatchCU(int max_sift);
00053         virtual ~SiftMatchCU(){};
00054         void InitSiftMatch();
00055         void SetMaxSift(int max_sift);
00056         void SetDescriptors(int index, int num, const unsigned char * descriptor, int id = -1);
00057         void SetDescriptors(int index, int num, const float * descriptor, int id = -1);
00058         void SetFeautreLocation(int index, const float* locatoins, int gap);
00059         int  GetSiftMatch(int max_match, int match_buffer[][2], float distmax, float ratiomax, int mbm);
00060         int  GetGuidedSiftMatch(int max_match, int match_buffer[][2], float H[3][3], float F[3][3],
00061                                                                          float distmax, float ratiomax, float hdistmax, float fdistmax, int mbm);
00063     static int  CheckCudaDevice(int device);
00064 };
00065 
00066 #endif
00067 #endif
00068 


siftgpu
Author(s): Changchang Wu
autogenerated on Wed Aug 26 2015 15:24:06