Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SiftGPUWrapper Class Reference

Interface for SiftGPU The class is used as an interface to SiftGPU. It's a singleton class. More...

#include <sift_gpu_wrapper.h>

List of all members.

Public Member Functions

void detect (const cv::Mat &image, cv::vector< cv::KeyPoint > &keypoints, std::vector< float > &descriptors, const cv::Mat &mask=cv::Mat()) const
int match (const std::vector< float > &descriptors1, int num1, const std::vector< float > &descriptors2, int num2, std::vector< cv::DMatch > *matches)
virtual ~SiftGPUWrapper ()

Static Public Member Functions

static void destroyInstance ()
static SiftGPUWrappergetInstance ()

Private Member Functions

void cvMatToSiftGPU (const cv::Mat &image, unsigned char *siftImage) const
void initializeMatcher ()
 SiftGPUWrapper ()
void writePGM (FILE *fp, unsigned char *data, int width, int height)

Private Attributes

unsigned char * data
 image as texture
bool error
 error happened?
bool isMatcherInitialized
 true, if matcher was initialized
SiftMatchGPUmatcher
 siftgpu matcher
SiftGPUsiftgpu
 siftgpu instance

Static Private Attributes

static const int imageHeight = 480
 height of the image constant for Kinect
static const int imageWidth = 640
 width of the image constant for Kinect
static SiftGPUWrapperinstance = NULL
 singleton instance

Detailed Description

Interface for SiftGPU The class is used as an interface to SiftGPU. It's a singleton class.

Definition at line 18 of file sift_gpu_wrapper.h.


Constructor & Destructor Documentation

Destructor

Definition at line 51 of file sift_gpu_wrapper.cpp.

private constructor, because of singleton

Definition at line 16 of file sift_gpu_wrapper.cpp.


Member Function Documentation

void SiftGPUWrapper::cvMatToSiftGPU ( const cv::Mat &  image,
unsigned char *  siftImage 
) const [private]

Building a siftgpu compatible unsigned char pointer out of the image cv::Mat (converts a cv matrix into an OpenGL texture array)

Parameters:
imagethe image
siftImagethe transformed image (output)

Definition at line 178 of file sift_gpu_wrapper.cpp.

Definition at line 61 of file sift_gpu_wrapper.cpp.

void SiftGPUWrapper::detect ( const cv::Mat &  image,
cv::vector< cv::KeyPoint > &  keypoints,
std::vector< float > &  descriptors,
const cv::Mat &  mask = cv::Mat() 
) const

Method, which is used for calculating the features and descriptors. The first parameter is the image, the second one a reference to a keypoint vector and the third parameter can be used for defining a mask

Parameters:
imagethe image
keypointsa cv::vector of cv::Keypoints, which is used for storing the keypoints
maska mask (see OpenCV)
Returns:
a pointer to the descriptor values

Definition at line 72 of file sift_gpu_wrapper.cpp.

Return instance of the singleton class

Definition at line 64 of file sift_gpu_wrapper.cpp.

Definition at line 167 of file sift_gpu_wrapper.cpp.

int SiftGPUWrapper::match ( const std::vector< float > &  descriptors1,
int  num1,
const std::vector< float > &  descriptors2,
int  num2,
std::vector< cv::DMatch > *  matches 
)

Is used for matching two descriptors

Parameters:
descriptors1the first descriptor
num1size of the first descriptor
descriptors2the second descriptor
num2size of the second descriptor
matchesis used to store the matches
Returns:
the summed distance of the corresponding descriptors

Definition at line 109 of file sift_gpu_wrapper.cpp.

void SiftGPUWrapper::writePGM ( FILE *  fp,
unsigned char *  data,
int  width,
int  height 
) [private]

For testing purposes: write a .pgm file of the SiftGPU image

Parameters:
fpa filepointer
datathe imagedata (e.g. OpenGL texture)
widthwidth
heightheight

Definition at line 189 of file sift_gpu_wrapper.cpp.


Member Data Documentation

unsigned char* SiftGPUWrapper::data [private]

image as texture

Definition at line 90 of file sift_gpu_wrapper.h.

error happened?

Definition at line 89 of file sift_gpu_wrapper.h.

const int SiftGPUWrapper::imageHeight = 480 [static, private]

height of the image constant for Kinect

Definition at line 83 of file sift_gpu_wrapper.h.

const int SiftGPUWrapper::imageWidth = 640 [static, private]

width of the image constant for Kinect

Definition at line 82 of file sift_gpu_wrapper.h.

singleton instance

Definition at line 85 of file sift_gpu_wrapper.h.

true, if matcher was initialized

Definition at line 88 of file sift_gpu_wrapper.h.

siftgpu matcher

Definition at line 87 of file sift_gpu_wrapper.h.

siftgpu instance

Definition at line 86 of file sift_gpu_wrapper.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rgbd_registration
Author(s): Ross Kidson
autogenerated on Thu May 23 2013 15:36:57