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
int imageHeight
 height of the image constant for Kinect
int imageWidth
 width of the image constant for Kinect
bool isMatcherInitialized
 true, if matcher was initialized
SiftMatchGPU * matcher
 siftgpu matcher
SiftGPU * siftgpu
 siftgpu instance

Static Private Attributes

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 [mutable, private]

image as texture

Definition at line 98 of file sift_gpu_wrapper.h.

bool SiftGPUWrapper::error [private]

error happened?

Definition at line 104 of file sift_gpu_wrapper.h.

QMutex SiftGPUWrapper::gpu_mutex [mutable, private]

Definition at line 105 of file sift_gpu_wrapper.h.

int SiftGPUWrapper::imageHeight [mutable, private]

height of the image constant for Kinect

Definition at line 97 of file sift_gpu_wrapper.h.

int SiftGPUWrapper::imageWidth [mutable, private]

width of the image constant for Kinect

Definition at line 96 of file sift_gpu_wrapper.h.

singleton instance

Definition at line 100 of file sift_gpu_wrapper.h.

true, if matcher was initialized

Definition at line 103 of file sift_gpu_wrapper.h.

SiftMatchGPU* SiftGPUWrapper::matcher [private]

siftgpu matcher

Definition at line 102 of file sift_gpu_wrapper.h.

SiftGPU* SiftGPUWrapper::siftgpu [private]

siftgpu instance

Definition at line 101 of file sift_gpu_wrapper.h.


The documentation for this class was generated from the following file:


rgbdslam_v2
Author(s): Felix Endres, Juergen Hess, Nikolas Engelhard
autogenerated on Thu Jun 6 2019 21:49:45