ProgramCU.h
Go to the documentation of this file.
00001 
00002 //      File:           ProgramCU.h
00003 //      Author:         Changchang Wu
00004 //      Description :   interface for the ProgramCU classes.
00005 //                                      It is basically a wrapper around all the CUDA kernels
00006 //
00007 //      Copyright (c) 2007 University of North Carolina at Chapel Hill
00008 //      All Rights Reserved
00009 //
00010 //      Permission to use, copy, modify and distribute this software and its
00011 //      documentation for educational, research and non-profit purposes, without
00012 //      fee, and without a written agreement is hereby granted, provided that the
00013 //      above copyright notice and the following paragraph appear in all copies.
00014 //      
00015 //      The University of North Carolina at Chapel Hill make no representations
00016 //      about the suitability of this software for any purpose. It is provided
00017 //      'as is' without express or implied warranty. 
00018 //
00019 //      Please send BUG REPORTS to ccwu@cs.unc.edu
00020 //
00022 
00023 #ifndef _PROGRAM_CU_H
00024 #define _PROGRAM_CU_H
00025 #if defined(CUDA_SIFTGPU_ENABLED)
00026 
00027 class CuTexImage;
00028 
00029 class ProgramCU
00030 {
00031 public:
00032     //GPU FUNCTIONS
00033         static void FinishCUDA();
00034         static int  CheckErrorCUDA(const char* location);
00035     static int  CheckCudaDevice(int device);
00036 public:
00038         static void CreateFilterKernel(float sigma, float* kernel, int& width);
00039         template<int KWIDTH> static void FilterImage(CuTexImage *dst, CuTexImage *src, CuTexImage* buf);
00040         static void FilterImage(CuTexImage *dst, CuTexImage *src, CuTexImage* buf, float sigma);
00041         static void ComputeDOG(CuTexImage* gus, CuTexImage* dog, CuTexImage* got);
00042         static void ComputeKEY(CuTexImage* dog, CuTexImage* key, float Tdog, float Tedge);
00043         static void InitHistogram(CuTexImage* key, CuTexImage* hist);
00044         static void ReduceHistogram(CuTexImage*hist1, CuTexImage* hist2);
00045         static void GenerateList(CuTexImage* list, CuTexImage* hist);
00046         static void ComputeOrientation(CuTexImage*list, CuTexImage* got, CuTexImage*key, 
00047                 float sigma, float sigma_step, int existing_keypoint);
00048         static void ComputeDescriptor(CuTexImage*list, CuTexImage* got, CuTexImage* dtex, int rect = 0, int stream = 0);
00049 
00050     //data conversion
00051         static void SampleImageU(CuTexImage *dst, CuTexImage *src, int log_scale);
00052         static void SampleImageD(CuTexImage *dst, CuTexImage *src, int log_scale = 1); 
00053         static void ReduceToSingleChannel(CuTexImage* dst, CuTexImage* src, int convert_rgb);
00054     static void ConvertByteToFloat(CuTexImage*src, CuTexImage* dst);
00055     
00056     //visualization
00057         static void DisplayConvertDOG(CuTexImage* dog, CuTexImage* out);
00058         static void DisplayConvertGRD(CuTexImage* got, CuTexImage* out);
00059         static void DisplayConvertKEY(CuTexImage* key, CuTexImage* dog, CuTexImage* out);
00060         static void DisplayKeyPoint(CuTexImage* ftex, CuTexImage* out);
00061         static void DisplayKeyBox(CuTexImage* ftex, CuTexImage* out);
00062         
00063         //SIFTMATCH FUNCTIONS   
00064         static void MultiplyDescriptor(CuTexImage* tex1, CuTexImage* tex2, CuTexImage* texDot, CuTexImage* texCRT);
00065         static void MultiplyDescriptorG(CuTexImage* texDes1, CuTexImage* texDes2,
00066                 CuTexImage* texLoc1, CuTexImage* texLoc2, CuTexImage* texDot, CuTexImage* texCRT,
00067                 float H[3][3], float hdistmax, float F[3][3], float fdistmax);
00068         static void GetRowMatch(CuTexImage* texDot, CuTexImage* texMatch, float distmax, float ratiomax);
00069         static void GetColMatch(CuTexImage* texCRT, CuTexImage* texMatch, float distmax, float ratiomax);
00070 };
00071 
00072 #endif
00073 #endif
00074 


siftgpu
Author(s): Changchang Wu (library), Bence Magyar (ROS wrapper)
autogenerated on Thu Jan 2 2014 11:38:01