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?
QMutex gpu_mutex
bool isMatcherInitialized
 true, if matcher was initialized
SiftMatchGPU * matcher
 siftgpu matcher
SiftGPU * siftgpu
 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
 singleton instance

Detailed Description

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

Definition at line 32 of file sift_gpu_wrapper.h.


Constructor & Destructor Documentation

virtual SiftGPUWrapper::~SiftGPUWrapper ( ) [virtual]

Destructor

private constructor, because of singleton


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)
static void SiftGPUWrapper::destroyInstance ( ) [static]
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

Return instance of the singleton class

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
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

Member Data Documentation

unsigned char* SiftGPUWrapper::data [private]

image as texture

Definition at line 104 of file sift_gpu_wrapper.h.

error happened?

Definition at line 103 of file sift_gpu_wrapper.h.

QMutex SiftGPUWrapper::gpu_mutex [mutable, private]

Definition at line 105 of file sift_gpu_wrapper.h.

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

height of the image constant for Kinect

Definition at line 97 of file sift_gpu_wrapper.h.

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

width of the image constant for Kinect

Definition at line 96 of file sift_gpu_wrapper.h.

singleton instance

Definition at line 99 of file sift_gpu_wrapper.h.

true, if matcher was initialized

Definition at line 102 of file sift_gpu_wrapper.h.

SiftMatchGPU* SiftGPUWrapper::matcher [private]

siftgpu matcher

Definition at line 101 of file sift_gpu_wrapper.h.

SiftGPU* SiftGPUWrapper::siftgpu [private]

siftgpu instance

Definition at line 100 of file sift_gpu_wrapper.h.


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


rgbdslam
Author(s): Felix Endres, Juergen Hess, Nikolas Engelhard
autogenerated on Wed Dec 26 2012 15:53:09