minor stitching optimization (improve buffer reuse)

This commit is contained in:
Vladislav Vinogradov
2011-08-09 13:08:54 +00:00
parent b319e7f403
commit c5adaa717b
8 changed files with 95 additions and 23 deletions

View File

@@ -59,6 +59,8 @@ public:
virtual ~FeaturesFinder() {}
void operator ()(const cv::Mat &image, ImageFeatures &features);
virtual void releaseMemory() {}
protected:
virtual void find(const cv::Mat &image, ImageFeatures &features) = 0;
};
@@ -71,6 +73,8 @@ public:
int num_octaves = 3, int num_layers = 4,
int num_octaves_descr = 4, int num_layers_descr = 2);
void releaseMemory();
protected:
void find(const cv::Mat &image, ImageFeatures &features);
@@ -104,6 +108,8 @@ public:
bool isThreadSafe() const { return is_thread_safe_; }
virtual void releaseMemory() {}
protected:
FeaturesMatcher(bool is_thread_safe = false) : is_thread_safe_(is_thread_safe) {}
@@ -120,6 +126,8 @@ public:
BestOf2NearestMatcher(bool try_use_gpu = true, float match_conf = 0.55f, int num_matches_thresh1 = 6,
int num_matches_thresh2 = 6);
void releaseMemory();
protected:
void match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info);