| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | #ifndef GPU_SIFT_MATCH_H |
| | #define GPU_SIFT_MATCH_H |
| | class GLTexImage; |
| | class ProgramGPU; |
| |
|
| | class SiftMatchGL:public SiftMatchGPU |
| | { |
| | typedef GLint ParameterGL; |
| | private: |
| | |
| | GLTexImage _texLoc[2]; |
| | GLTexImage _texDes[2]; |
| | GLTexImage _texDot; |
| | GLTexImage _texMatch[2]; |
| |
|
| | |
| | ProgramGPU * s_multiply; |
| | ProgramGPU * s_guided_mult; |
| | ProgramGPU * s_col_max; |
| | ProgramGPU * s_row_max; |
| |
|
| | |
| | ParameterGL _param_multiply_tex1; |
| | ParameterGL _param_multiply_tex2; |
| | ParameterGL _param_multiply_size; |
| | ParameterGL _param_rowmax_param; |
| | ParameterGL _param_colmax_param; |
| |
|
| | |
| | ParameterGL _param_guided_mult_tex1; |
| | ParameterGL _param_guided_mult_tex2; |
| | ParameterGL _param_guided_mult_texl1; |
| | ParameterGL _param_guided_mult_texl2; |
| | ParameterGL _param_guided_mult_h; |
| | ParameterGL _param_guided_mult_f; |
| | ParameterGL _param_guided_mult_param; |
| | |
| | int _num_sift[2]; |
| | int _id_sift[2]; |
| | int _have_loc[2]; |
| |
|
| | |
| | int _sift_per_stripe; |
| | int _sift_num_stripe; |
| | int _sift_per_row; |
| | int _pixel_per_sift; |
| | int _initialized; |
| | |
| | vector<float> sift_buffer; |
| | private: |
| | void AllocateSiftMatch(); |
| | void LoadSiftMatchShadersGLSL(); |
| | int GetBestMatch(int max_match, uint32_t match_buffer[][2], float distmax, float ratiomax, int mbm); |
| | public: |
| | SiftMatchGL(int max_sift, int use_glsl); |
| | virtual ~SiftMatchGL(); |
| | public: |
| | bool Allocate(int max_sift, int mbm) override; |
| | void InitSiftMatch(); |
| | void SetMaxSift(int max_sift) override; |
| | void SetDescriptors(int index, int num, const unsigned char * descriptor, int id = -1); |
| | void SetDescriptors(int index, int num, const float * descriptor, int id = -1); |
| | void SetFeautreLocation(int index, const float* locatoins, int gap); |
| | int GetSiftMatch(int max_match, uint32_t match_buffer[][2], float distmax, float ratiomax, int mbm); |
| | int GetGuidedSiftMatch(int max_match, uint32_t match_buffer[][2], float* H, float* F, |
| | float distmax, float ratiomax, float hdistmax,float fdistmax, int mbm); |
| | }; |
| |
|
| |
|
| | #endif |
| |
|
| |
|