fix warnings on Windows. No need to create variable in catch statement if you're not going to use it. It generates unreferenced variable warnings.
parent
351e9ace72
commit
470527ff99
|
@ -244,7 +244,7 @@ void LevenbergMarquardtOptimizer::iterate() {
|
||||||
try {
|
try {
|
||||||
delta = solve(dampedSystem, state_.values, params_);
|
delta = solve(dampedSystem, state_.values, params_);
|
||||||
systemSolvedSuccessfully = true;
|
systemSolvedSuccessfully = true;
|
||||||
} catch (IndeterminantLinearSystemException& e) {
|
} catch (IndeterminantLinearSystemException) {
|
||||||
systemSolvedSuccessfully = false;
|
systemSolvedSuccessfully = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -325,7 +325,7 @@ public:
|
||||||
const Cameras& cameras, const Point3& point,
|
const Cameras& cameras, const Point3& point,
|
||||||
const double lambda = 0.0) const {
|
const double lambda = 0.0) const {
|
||||||
|
|
||||||
int numKeys = this->keys_.size();
|
size_t numKeys = this->keys_.size();
|
||||||
std::vector<KeyMatrix2D> Fblocks;
|
std::vector<KeyMatrix2D> Fblocks;
|
||||||
double f = computeJacobians(Fblocks, E, PointCov, b, cameras, point,
|
double f = computeJacobians(Fblocks, E, PointCov, b, cameras, point,
|
||||||
lambda);
|
lambda);
|
||||||
|
@ -352,7 +352,7 @@ public:
|
||||||
Eigen::JacobiSVD<Matrix> svd(E, Eigen::ComputeFullU);
|
Eigen::JacobiSVD<Matrix> svd(E, Eigen::ComputeFullU);
|
||||||
Vector s = svd.singularValues();
|
Vector s = svd.singularValues();
|
||||||
// Enull = zeros(2 * numKeys, 2 * numKeys - 3);
|
// Enull = zeros(2 * numKeys, 2 * numKeys - 3);
|
||||||
int numKeys = this->keys_.size();
|
size_t numKeys = this->keys_.size();
|
||||||
Enull = svd.matrixU().block(0, 3, 2 * numKeys, 2 * numKeys - 3); // last 2m-3 columns
|
Enull = svd.matrixU().block(0, 3, 2 * numKeys, 2 * numKeys - 3); // last 2m-3 columns
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
|
|
|
@ -262,7 +262,7 @@ public:
|
||||||
try {
|
try {
|
||||||
Point2 reprojectionError(camera.project(point_) - zi);
|
Point2 reprojectionError(camera.project(point_) - zi);
|
||||||
totalReprojError += reprojectionError.vector().norm();
|
totalReprojError += reprojectionError.vector().norm();
|
||||||
} catch (CheiralityException& e) {
|
} catch (CheiralityException) {
|
||||||
cheiralityException_ = true;
|
cheiralityException_ = true;
|
||||||
}
|
}
|
||||||
i += 1;
|
i += 1;
|
||||||
|
|
|
@ -28,7 +28,7 @@ void FileWriter::emit(bool add_header, bool force_overwrite) const {
|
||||||
bool file_exists = true;
|
bool file_exists = true;
|
||||||
try {
|
try {
|
||||||
existing_contents = file_contents(filename_.c_str(), add_header);
|
existing_contents = file_contents(filename_.c_str(), add_header);
|
||||||
} catch (CantOpenFile& e) {
|
} catch (CantOpenFile) {
|
||||||
file_exists = false;
|
file_exists = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue