-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathframework-structure.hpp
72 lines (64 loc) · 2.84 KB
/
framework-structure.hpp
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* sfs-framework
*
* Nils Hamel - nils.hamel@bluewin.ch
* Charles Papon - charles.papon.90@gmail.com
* Copyright (c) 2019-2020 DHLAB, EPFL & HES-SO Valais-Wallis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// External includes
#include <vector>
#include <Eigen/Dense>
// Internal includes
#include "framework-feature.hpp"
#include "framework-transform.hpp"
#include "framework-viewpoint.hpp"
#include "framework-utiles.hpp"
// Define structure activity
#define STRUCTURE_REMOVE ( 0 ) /* Removed by filtering process - no more usable */
#define STRUCTURE_NORMAL ( 1 ) /* Normal structure, containing two features or more */
#define STRUCTURE_PIONER ( 2 ) /* Structure that contains all the last viewpoints in the pipeline active head (configGroup) */
// Module object
class Structure {
public: /* Need to be set back to private */
Eigen::Vector3d position;
std::vector<Feature*> features;
unsigned int state;
unsigned int start;
public:
Structure() : position(Eigen::Vector3d::Zero()), state(STRUCTURE_REMOVE) {}
unsigned int getFeatureCount();
unsigned int getFeatureViewpointIndex(unsigned int featureIndex);
bool getHasScale(unsigned int scaleGroup);
Eigen::Vector3d * getPosition();
unsigned int getState();
cv::Vec3b getColor();
void setReset();
void addFeature(Feature * feature);
void sortFeatures();
void computeState(unsigned int scaleGroup, unsigned int highViewpoint);
void computeModel();
void computeCentroid(std::vector<std::shared_ptr<Transform>> & transforms, unsigned int lowViewpoint);
void computeCorrelation(std::vector<std::shared_ptr<Transform>> & transforms, unsigned int lowViewpoint);
void computeOriented(unsigned int lowViewpoint);
void computeOptimalPosition(unsigned int lowViewpoint);
void computeRadius(unsigned int lowViewpoint);
unsigned int computeDisparityMean(double * const meanValue,unsigned int lowViewpoint);
void computeDisparityStd(double * const stdValue, double const meanValue,unsigned int lowViewpoint);
void filterRadialRange(double lowClamp, double highClamp,unsigned int lowViewpoint);
void filterDisparity(double limitValue,unsigned int headStart);
void filterResize(unsigned int resize);
};