Skip to content

Commit 5facd21

Browse files
author
nils-hamel
committed
Removing sparsefeatures module (moved to utiles - Code cleaning
1 parent b933733 commit 5facd21

17 files changed

+152
-262
lines changed

src/framework-database.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
#include "framework-database.hpp"
2323

24+
//
25+
// Framework core functions
26+
//
27+
2428
Database::Database(double initialError, double initialErrorDisparity, double initialRadius, unsigned int initialGroup, unsigned int initialMatchRange, double initialDenseDisparity){
2529

2630
// Assign default parameters
@@ -648,7 +652,7 @@ void Database::filterDisparity(int pipeState){
648652
}
649653

650654
//
651-
// Section - Exportation methods
655+
// Framework exportation
652656
//
653657

654658
void Database::exportStructure(std::string path, std::string mode, unsigned int major, unsigned int group){
@@ -853,7 +857,7 @@ void Database::exportConstraint(std::string path, std::string mode, unsigned int
853857
}
854858

855859
//
856-
// Section - Development features - Will be removed
860+
// Framework development features - Will be removed
857861
//
858862

859863
// Note : this function does not respect encapsulation (development function) - need to be removed

src/framework-database.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
#include <fstream>
2727
#include <vector>
2828
#include <cmath>
29-
#include <opencv4/opencv2/core.hpp>
3029
#include <omp.h>
31-
#include <experimental/filesystem>
3230
#include <sstream>
3331
#include <iomanip>
32+
#include <experimental/filesystem>
33+
#include <opencv4/opencv2/core.hpp>
3434

3535
// Internal includes
3636
#include "framework-viewpoint.hpp"

src/framework-feature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void Feature::setFeature(double x, double y, int imageWidth, int imageHeight){
7676
position=Eigen::Vector2f(x,y);
7777

7878
// Compute direction vector
79-
direction=utiles_direction(x,y,imageWidth,imageHeight);
79+
direction=utilesDirection(x,y,imageWidth,imageHeight);
8080

8181
}
8282

src/framework-frontend.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ bool FrontendPicture::next() {
4848
newViewpoint = source->next();
4949

5050
// Compute image features and descriptors
51-
akazeFeatures(newViewpoint->getImage(), &mask, newViewpoint->getCvFeatures(), newViewpoint->getCvDescriptor(), sparseThreshold);
51+
utilesAKAZEFeatures(newViewpoint->getImage(), &mask, newViewpoint->getCvFeatures(), newViewpoint->getCvDescriptor(), sparseThreshold);
5252

5353
// Release viewpoint image
5454
newViewpoint->releaseImage();
5555

5656
//Check if the image is moving enough using features
5757
if(lastViewpoint){
58-
gmsMatcher (
58+
utilesGMSMatcher(
5959
newViewpoint->getCvFeatures(),
6060
newViewpoint->getCvDescriptor(),
6161
newViewpoint->getImage()->size(),
@@ -105,7 +105,7 @@ bool FrontendPicture::next() {
105105
}
106106
} else {
107107
std::vector<cv::DMatch> matches;
108-
gmsMatcher (
108+
utilesGMSMatcher(
109109
newViewpoint->getCvFeatures(),
110110
newViewpoint->getCvDescriptor(),
111111
newViewpoint->getImage()->size(),

src/framework-frontend.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "framework-database.hpp"
2929
#include "framework-utiles.hpp"
3030
#include "framework-viewpointsource.hpp"
31-
#include "framework-sparsefeature.hpp"
3231
#include "framework-utiles.hpp"
3332

3433
// Module object

src/framework-sparsefeature.cpp

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/framework-sparsefeature.hpp

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/framework-structure.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
#pragma once
2323

2424
// External includes
25-
#include <Eigen/Dense>
2625
#include <vector>
27-
#include <limits>
26+
#include <Eigen/Dense>
2827

2928
// Internal includes
3029
#include "framework-feature.hpp"

src/framework-transform.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ void Transform::computePose(){
115115
// Compute rotation
116116
rotation=svd.matrixV()*svd.matrixU().transpose();
117117

118-
// Stability mechanism - In some cases, the rotation matrix has an inversion that has to be removed
118+
// Stability mechanism - In some cases, the rotation matrix has an inversion
119+
// which appears as a minus one determinant. This procedure is there to
120+
// remove the inversion and to obtain a rotation matrix with determinant to
121+
// plus one. Most of the time, having a SVD fault message is not a very good
122+
// sign for the reconstruction (need to be formally confirmed).
119123
if (rotation.determinant()<0){
120124
std::cerr << "SVD fault" << std::endl;
121125
Eigen::Matrix3d correctV(svd.matrixV());

src/framework-transform.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#pragma once
2323

2424
// External includes
25+
#include <iostream>
2526
#include <Eigen/Dense>
2627

2728
// Internal includes

0 commit comments

Comments
 (0)