123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- #ifndef __OPENCV_XFEATURES2D_CUDA_HPP__
- #define __OPENCV_XFEATURES2D_CUDA_HPP__
- #include "opencv2/core/cuda.hpp"
- namespace cv { namespace cuda {
- class CV_EXPORTS SURF_CUDA
- {
- public:
- enum KeypointLayout
- {
- X_ROW = 0,
- Y_ROW,
- LAPLACIAN_ROW,
- OCTAVE_ROW,
- SIZE_ROW,
- ANGLE_ROW,
- HESSIAN_ROW,
- ROWS_COUNT
- };
-
- SURF_CUDA();
-
- explicit SURF_CUDA(double _hessianThreshold, int _nOctaves=4,
- int _nOctaveLayers=2, bool _extended=false, float _keypointsRatio=0.01f, bool _upright = false);
-
- int descriptorSize() const;
-
- int defaultNorm() const;
-
- void uploadKeypoints(const std::vector<KeyPoint>& keypoints, GpuMat& keypointsGPU);
-
- void downloadKeypoints(const GpuMat& keypointsGPU, std::vector<KeyPoint>& keypoints);
-
- void downloadDescriptors(const GpuMat& descriptorsGPU, std::vector<float>& descriptors);
-
-
-
-
-
-
-
-
-
-
- void operator()(const GpuMat& img, const GpuMat& mask, GpuMat& keypoints);
-
-
- void operator()(const GpuMat& img, const GpuMat& mask, GpuMat& keypoints, GpuMat& descriptors,
- bool useProvidedKeypoints = false);
- void operator()(const GpuMat& img, const GpuMat& mask, std::vector<KeyPoint>& keypoints);
- void operator()(const GpuMat& img, const GpuMat& mask, std::vector<KeyPoint>& keypoints, GpuMat& descriptors,
- bool useProvidedKeypoints = false);
- void operator()(const GpuMat& img, const GpuMat& mask, std::vector<KeyPoint>& keypoints, std::vector<float>& descriptors,
- bool useProvidedKeypoints = false);
- void releaseMemory();
-
- double hessianThreshold;
- int nOctaves;
- int nOctaveLayers;
- bool extended;
- bool upright;
-
- float keypointsRatio;
- GpuMat sum, mask1, maskSum;
- GpuMat det, trace;
- GpuMat maxPosBuffer;
- };
- }}
- #endif
|