SiftMatch.h
Go to the documentation of this file.
00001 
00002 //      File:           SiftMatch.h
00003 //      Author:         Changchang Wu
00004 //      Description :   interface for the SiftMatchGL
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 #ifndef GPU_SIFT_MATCH_H
00024 #define GPU_SIFT_MATCH_H
00025 class GLTexImage;
00026 class ProgramGPU;
00027 
00028 class SiftMatchGL:public SiftMatchGPU
00029 {
00030         typedef GLint ParameterGL;
00031 private:
00032         //tex storage
00033         GLTexImage _texLoc[2];
00034         GLTexImage _texDes[2];
00035         GLTexImage _texDot;
00036         GLTexImage _texMatch[2];
00037 
00038         //programs
00039         ProgramGPU * s_multiply;
00040         ProgramGPU * s_guided_mult;
00041         ProgramGPU * s_col_max;
00042         ProgramGPU * s_row_max;
00043 
00044         //matching parameters
00045         ParameterGL _param_multiply_tex1;
00046         ParameterGL _param_multiply_tex2;
00047         ParameterGL _param_multiply_size;
00048         ParameterGL _param_rowmax_param;
00049         ParameterGL _param_colmax_param;
00050 
00052         ParameterGL _param_guided_mult_tex1;
00053         ParameterGL _param_guided_mult_tex2;
00054         ParameterGL _param_guided_mult_texl1;
00055         ParameterGL _param_guided_mult_texl2;
00056         ParameterGL _param_guided_mult_h;
00057         ParameterGL _param_guided_mult_f;
00058         ParameterGL _param_guided_mult_param;
00059         //
00060         int _max_sift; 
00061         int _num_sift[2];
00062         int _id_sift[2];
00063         int _have_loc[2];
00064 
00065         //gpu parameter
00066         int _sift_per_stripe;
00067         int _sift_num_stripe;
00068         int     _sift_per_row;
00069         int     _pixel_per_sift;
00070         int _initialized;
00071         //
00072         vector<float> sift_buffer; 
00073 private:
00074         void AllocateSiftMatch();
00075         void LoadSiftMatchShadersGLSL();
00076         int  GetBestMatch(int max_match, int match_buffer[][2], float distmax, float ratiomax, int mbm);
00077 public:
00078         SiftMatchGL(int max_sift, int use_glsl);
00079         virtual ~SiftMatchGL();
00080 public:
00081         void InitSiftMatch();
00082         void SetMaxSift(int max_sift);
00083         void SetDescriptors(int index, int num, const unsigned char * descriptor, int id = -1);
00084         void SetDescriptors(int index, int num, const float * descriptor, int id = -1);
00085         void SetFeautreLocation(int index, const float* locatoins, int gap);
00086         int  GetSiftMatch(int max_match, int match_buffer[][2], float distmax, float ratiomax, int mbm);
00087         int  GetGuidedSiftMatch(int max_match, int match_buffer[][2], float H[3][3],  float F[3][3], 
00088                 float distmax, float ratiomax, float hdistmax,float fdistmax, int mbm);
00089 };
00090 
00091 
00092 #endif
00093 
 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