forked from ducha-aiki/mods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
correspondencebank.h
52 lines (44 loc) · 2.05 KB
/
correspondencebank.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*------------------------------------------------------*/
/* Copyright 2013, Dmytro Mishkin ducha.aiki@gmail.com */
/*------------------------------------------------------*/
#ifndef CORRESPONDENCEBANK_H
#define CORRESPONDENCEBANK_H
#include <vector>
#include <string>
#include <map>
#include "detectors/structures.hpp"
#include "detectors/detectors_parameters.hpp"
#include "descriptors_parameters.hpp"
#include "matching/matching.hpp"
#include "imagerepresentation.h"
typedef std::map<std::string, TentativeCorrespListExt> CorrespondencesMap;
class CorrespondenceBank
{
public:
CorrespondenceBank();
~CorrespondenceBank()
{
DescriptorsDBIndex = cv::flann::Index();
}
int GetCorrespondencesNumber(std::string desc_name = "All", std::string det_name = "All");
double GetSpentTime(std::string desc_name = "All", std::string det_name = "All");
TentativeCorrespListExt GetCorresponcesVector(std::string desc_name = "All", std::string det_name = "All");
int MatchImgReps(ImageRepresentation &imgrep1, ImageRepresentation &imgrep2,
IterationViewsynthesisParam &synth_par,const WhatToMatch WhatToMatchNow,
const MatchPars &par, const DescriptorsParameters &desc_pars);
void ClearCorrespondences(std::string det_name, std::string desc_name);
std::map<std::string, cv::Mat> DescriptorsDBForSNN;
cv::flann::Index DescriptorsDBIndex;
cv::Mat GetDescriptorsDB(std::string desc_name);
cv::Mat DB;
protected:
void AddCorrespondences(std::map<std::string, TentativeCorrespListExt> & CorrsToAddMap,std::string desc_name);
void AddCorrespondences(TentativeCorrespListExt& CorrsToAdd,std::string det_name, std::string desc_name);
void AddCorrespondencesToList(TentativeCorrespListExt& BaseCorrs, TentativeCorrespListExt& CorrsToAdd);
std::map<std::string, std::map<std::string, double> > MatchingTimeMapMap;
std::map<std::string, CorrespondencesMap> CorrespondencesMapMap;
private:
descriptor_type GetDescriptorType(std::string desc_name);
detector_type GetDetectorType(std::string det_name);
};
#endif // CORRESPONDENCEBANK_H