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? | |
| 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 = NULL |
| singleton instance | |
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.
| SiftGPUWrapper::~SiftGPUWrapper | ( | ) | [virtual] |
Destructor
Definition at line 51 of file sift_gpu_wrapper.cpp.
| SiftGPUWrapper::SiftGPUWrapper | ( | ) | [private] |
private constructor, because of singleton
Definition at line 16 of file sift_gpu_wrapper.cpp.
| 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) |
Definition at line 178 of file sift_gpu_wrapper.cpp.
| void SiftGPUWrapper::destroyInstance | ( | ) | [static] |
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
| image | the image |
| keypoints | a cv::vector of cv::Keypoints, which is used for storing the keypoints |
| mask | a mask (see OpenCV) |
Definition at line 72 of file sift_gpu_wrapper.cpp.
| SiftGPUWrapper * SiftGPUWrapper::getInstance | ( | ) | [static] |
Return instance of the singleton class
Definition at line 64 of file sift_gpu_wrapper.cpp.
| void SiftGPUWrapper::initializeMatcher | ( | ) | [private] |
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
| 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 |
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
| fp | a filepointer |
| data | the imagedata (e.g. OpenGL texture) |
| width | width |
| height | height |
Definition at line 189 of file sift_gpu_wrapper.cpp.
unsigned char* SiftGPUWrapper::data [private] |
image as texture
Definition at line 90 of file sift_gpu_wrapper.h.
bool SiftGPUWrapper::error [private] |
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.
SiftGPUWrapper * SiftGPUWrapper::instance = NULL [static, private] |
singleton instance
Definition at line 85 of file sift_gpu_wrapper.h.
bool SiftGPUWrapper::isMatcherInitialized [private] |
true, if matcher was initialized
Definition at line 88 of file sift_gpu_wrapper.h.
SiftMatchGPU* SiftGPUWrapper::matcher [private] |
siftgpu matcher
Definition at line 87 of file sift_gpu_wrapper.h.
SiftGPU* SiftGPUWrapper::siftgpu [private] |
siftgpu instance
Definition at line 86 of file sift_gpu_wrapper.h.