Interface for SiftGPU The class is used as an interface to SiftGPU. It's a singleton class. More...
#include <sift_gpu_wrapper.h>
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 SiftGPUWrapper * | getInstance () |
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 SiftGPUWrapper * | instance |
singleton instance |
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.
virtual SiftGPUWrapper::~SiftGPUWrapper | ( | ) | [virtual] |
Destructor
SiftGPUWrapper::SiftGPUWrapper | ( | ) | [private] |
private constructor, because of singleton
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)
image | the image |
siftImage | the 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
image | the image |
keypoints | a cv::vector of cv::Keypoints, which is used for storing the keypoints |
mask | a mask (see OpenCV) |
static SiftGPUWrapper* SiftGPUWrapper::getInstance | ( | ) | [static] |
Return instance of the singleton class
void SiftGPUWrapper::initializeMatcher | ( | ) | [private] |
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
descriptors1 | the first descriptor |
num1 | size of the first descriptor |
descriptors2 | the second descriptor |
num2 | size of the second descriptor |
matches | is used to store the matches |
void SiftGPUWrapper::writePGM | ( | FILE * | fp, |
unsigned char * | data, | ||
int | width, | ||
int | height | ||
) | [private] |
For testing purposes: write a .pgm file of the SiftGPU image
fp | a filepointer |
data | the imagedata (e.g. OpenGL texture) |
width | width |
height | height |
unsigned char* SiftGPUWrapper::data [private] |
image as texture
Definition at line 104 of file sift_gpu_wrapper.h.
bool SiftGPUWrapper::error [private] |
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.
SiftGPUWrapper* SiftGPUWrapper::instance [static, private] |
singleton instance
Definition at line 99 of file sift_gpu_wrapper.h.
bool SiftGPUWrapper::isMatcherInitialized [private] |
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.