Autonomous Space Robotics Lab

Speeded Up SURF

UTIAS ASRL

asrl::GpuSurfFeatures Class Reference

Memory required for SURF features on the GPU. More...

#include <GpuSurfFeatures.hpp>

List of all members.

Public Member Functions

 GpuSurfFeatures ()
 ~GpuSurfFeatures ()
KeypointdeviceFeatures ()
KeypointhostFeatures ()
float * deviceDescriptors ()
float * hostDescriptors ()
unsigned int * deviceFtCount ()
unsigned int * hostFtCount ()
KeypointdownloadFeatures ()
unsigned int ftCount ()
unsigned int rawFeatureCount ()
void clearFeatureCounts ()
float * downloadDescriptors ()
void setDirty ()
CudaSynchronizedMemory
< Keypoint > & 
featuresMem ()
CudaSynchronizedMemory< float > & descriptorsMem ()
CudaSynchronizedMemory
< unsigned int > & 
featureCounterMem ()
CudaSynchronizedMemory< int4 > & rawFeatureMem ()
template<typename CV_KEYPOINT_VECTOR >
void getKeypoints (CV_KEYPOINT_VECTOR &outKeypoints)
template<typename CV_KEYPOINT_VECTOR >
void getRawKeypoints (CV_KEYPOINT_VECTOR &outKeypoints)
template<typename CV_KEYPOINT_VECTOR >
void setKeypoints (CV_KEYPOINT_VECTOR const &inKeypoints)

Private Attributes

CudaSynchronizedMemory< Keypointm_features
 Synchronized memory for features.
CudaSynchronizedMemory< float > m_descriptors
 Synchronized memory for descriptors.
CudaSynchronizedMemory
< unsigned int > 
m_feature_counter
 Synchronized memory for the feature counters.
CudaSynchronizedMemory< int4 > m_rawFeatures
 Synchronized memory for the raw (uninterpolated) features.
bool m_descriptorsDirty
 Do the descriptors need to be pulled from the device?
bool m_featuresDirty
 Do the features need to be pulled from the device?
bool m_countDirty
 Do the feature counters need to be pulled from the device?

Detailed Description

Memory required for SURF features on the GPU.

Definition at line 55 of file GpuSurfFeatures.hpp.


Constructor & Destructor Documentation

asrl::GpuSurfFeatures::GpuSurfFeatures (  ) 

Constructor This allocates memory for the features found by the asrl::GpuSurfDetector.

As there is no concept of dynamic memory on the GPU, this allocates memory for the maximum number of possible features as defined by ASRL_SURF_MAX_FEATURES and ASRL_SURF_MAX_CANDIDATES

Definition at line 41 of file GpuSurfFeatures.cpp.

asrl::GpuSurfFeatures::~GpuSurfFeatures (  ) 

Destructor, cleans up the memory associated with the features.

Definition at line 55 of file GpuSurfFeatures.cpp.


Member Function Documentation

void asrl::GpuSurfFeatures::clearFeatureCounts (  ) 

Clears the feature counts on the host and the device.

Definition at line 95 of file GpuSurfFeatures.cpp.

CudaSynchronizedMemory<float>& asrl::GpuSurfFeatures::descriptorsMem (  )  [inline]
Returns:
The memory object used for descriptors

Definition at line 179 of file GpuSurfFeatures.hpp.

float* asrl::GpuSurfFeatures::deviceDescriptors (  )  [inline]

gets a pointer to the device (GPU) memory for descriptors

Returns:
a pointer to the start of the device (GPU) memory for descriptors

Definition at line 97 of file GpuSurfFeatures.hpp.

Keypoint* asrl::GpuSurfFeatures::deviceFeatures (  )  [inline]

gets a pointer to the device (GPU) memory for features.

Returns:
a pointer to the start of the device (GPU) feature memory

Definition at line 81 of file GpuSurfFeatures.hpp.

unsigned int* asrl::GpuSurfFeatures::deviceFtCount (  )  [inline]

gets a pointer to the device (GPU) memory for the feature counters

Returns:
a pointer to the device (GPU) memory for the feature counters

Definition at line 113 of file GpuSurfFeatures.hpp.

float * asrl::GpuSurfFeatures::downloadDescriptors (  ) 

Downloads the descriptors from the device (GPU) to the device (CPU).

Returns:
a pointer to the start of the memory used for the descriptors.

Definition at line 100 of file GpuSurfFeatures.cpp.

Keypoint * asrl::GpuSurfFeatures::downloadFeatures (  ) 

Pulls features from the device (GPU) to the host (CPU).

Returns:
a pointer to the start of the host memory for features.

Definition at line 61 of file GpuSurfFeatures.cpp.

CudaSynchronizedMemory<unsigned int>& asrl::GpuSurfFeatures::featureCounterMem (  )  [inline]
Returns:
The memory object used for feature counters

Definition at line 184 of file GpuSurfFeatures.hpp.

CudaSynchronizedMemory<Keypoint>& asrl::GpuSurfFeatures::featuresMem (  )  [inline]
Returns:
The memory object used for features

Definition at line 174 of file GpuSurfFeatures.hpp.

unsigned int asrl::GpuSurfFeatures::ftCount (  ) 

Gets the number of features found by the detector. This is the value stored at

 this->featureCounterMem()[0]
Returns:
The number of features found by the detector.

Definition at line 73 of file GpuSurfFeatures.cpp.

template<typename CV_KEYPOINT_VECTOR >
void asrl::GpuSurfFeatures::getKeypoints ( CV_KEYPOINT_VECTOR &  outKeypoints  )  [inline]

Gets keypoints and packs them into a vector of type T that looks like a cv::KeyPoint. The function is templated to avoid having any OpenCV headers in this file.

Parameters:
outKeypoints The vector of keypoints to pack.

Definition at line 245 of file GpuSurfFeatures.hpp.

template<typename CV_KEYPOINT_VECTOR >
void asrl::GpuSurfFeatures::getRawKeypoints ( CV_KEYPOINT_VECTOR &  outKeypoints  )  [inline]

Gets the raw (uninterpolated) keypoints from the device. The function is templated to avoid having any OpenCV headers in this file.

Parameters:
outKeypoints A vector slated to hold the keypoints from the device

Definition at line 277 of file GpuSurfFeatures.hpp.

float* asrl::GpuSurfFeatures::hostDescriptors (  )  [inline]

gets a pointer to the host (CPU) memory for descriptors

Returns:
a pointer to the start of the host (CPU) memory for descriptors

Definition at line 105 of file GpuSurfFeatures.hpp.

Keypoint* asrl::GpuSurfFeatures::hostFeatures (  )  [inline]

gets the host (CPU) memory for features.

Returns:
a pointer to the start of the host (CPU) feature memory

Definition at line 89 of file GpuSurfFeatures.hpp.

unsigned int* asrl::GpuSurfFeatures::hostFtCount (  )  [inline]

gets a pointer to the host (CPU) memory for the feature counters

Returns:
a pointer to the host (GPU) memory for the feature counters

Definition at line 121 of file GpuSurfFeatures.hpp.

unsigned int asrl::GpuSurfFeatures::rawFeatureCount (  ) 

Gets the number of features found by the detector before subpixel interpolation. This is the value stored at

 this->featureCounterMem()[1]
Returns:
The number of features found by the detector before subpixel interpolation.

Definition at line 84 of file GpuSurfFeatures.cpp.

CudaSynchronizedMemory<int4>& asrl::GpuSurfFeatures::rawFeatureMem (  )  [inline]
Returns:
The memory object used for features before subpixel interpolation

Definition at line 188 of file GpuSurfFeatures.hpp.

void asrl::GpuSurfFeatures::setDirty (  ) 

Sends a signal to the object that it must download feature counts, features, and descriptors if requested. Calling this doesn't cause any data to be downloaded from the GPU.

Definition at line 110 of file GpuSurfFeatures.cpp.

template<typename CV_KEYPOINT_VECTOR >
void asrl::GpuSurfFeatures::setKeypoints ( CV_KEYPOINT_VECTOR const &  inKeypoints  )  [inline]

Pushes a vector of keypoints to the device

The function is templated to avoid having any OpenCV headers in this file.

Parameters:
inKeypoints The vector of keypoints to push to the device.

Definition at line 306 of file GpuSurfFeatures.hpp.


Member Data Documentation

Do the feature counters need to be pulled from the device?

Definition at line 239 of file GpuSurfFeatures.hpp.

Synchronized memory for descriptors.

Definition at line 224 of file GpuSurfFeatures.hpp.

Do the descriptors need to be pulled from the device?

Definition at line 233 of file GpuSurfFeatures.hpp.

Synchronized memory for the feature counters.

Definition at line 227 of file GpuSurfFeatures.hpp.

Synchronized memory for features.

Definition at line 221 of file GpuSurfFeatures.hpp.

Do the features need to be pulled from the device?

Definition at line 236 of file GpuSurfFeatures.hpp.

Synchronized memory for the raw (uninterpolated) features.

Definition at line 230 of file GpuSurfFeatures.hpp.


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

Generated on Fri Apr 30 20:06:20 2010 for gpusurf by doxygen 1.6.2