mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Correct spelling in comments and docs.
Change-Id: Iad9a0599d644d3b3cd54244edaf64d408cb1308e
This commit is contained in:
@@ -78,7 +78,7 @@ BALProblem::BALProblem(const std::string& filename, bool use_quaternions) {
|
||||
return;
|
||||
};
|
||||
|
||||
// This wil die horribly on invalid files. Them's the breaks.
|
||||
// This will die horribly on invalid files. Them's the breaks.
|
||||
FscanfOrDie(fptr, "%d", &num_cameras_);
|
||||
FscanfOrDie(fptr, "%d", &num_points_);
|
||||
FscanfOrDie(fptr, "%d", &num_observations_);
|
||||
|
||||
@@ -120,7 +120,7 @@ DEFINE_double(point_sigma, 0.0, "Standard deviation of the point "
|
||||
"perturbation.");
|
||||
DEFINE_int32(random_seed, 38401, "Random seed used to set the state "
|
||||
"of the pseudo random number generator used to generate "
|
||||
"the pertubations.");
|
||||
"the perturbations.");
|
||||
DEFINE_bool(line_search, false, "Use a line search instead of trust region "
|
||||
"algorithm.");
|
||||
DEFINE_bool(mixed_precision_solves, false, "Use mixed precision solves.");
|
||||
@@ -298,7 +298,7 @@ void BuildProblem(BALProblem* bal_problem, Problem* problem) {
|
||||
LossFunction* loss_function =
|
||||
CERES_GET_FLAG(FLAGS_robustify) ? new HuberLoss(1.0) : nullptr;
|
||||
|
||||
// Each observation correponds to a pair of a camera and a point
|
||||
// Each observation corresponds to a pair of a camera and a point
|
||||
// which are identified by camera_index()[i] and point_index()[i]
|
||||
// respectively.
|
||||
double* camera =
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
// Note that for good denoising results the weighting between the data term
|
||||
// and the Fields of Experts term needs to be adjusted. This is discussed
|
||||
// in [1]. This program assumes Gaussian noise. The noise model can be changed
|
||||
// by substituing another function for QuadraticCostFunction.
|
||||
// by substituting another function for QuadraticCostFunction.
|
||||
//
|
||||
// [1] S. Roth and M.J. Black. "Fields of Experts." International Journal of
|
||||
// Computer Vision, 82(2):205--229, 2009.
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
// Author: strandmark@google.com (Petter Strandmark)
|
||||
//
|
||||
// Class for loading the data required for descibing a Fields of Experts (FoE)
|
||||
// Class for loading the data required for describing a Fields of Experts (FoE)
|
||||
// model.
|
||||
|
||||
#include "fields_of_experts.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
// Author: strandmark@google.com (Petter Strandmark)
|
||||
//
|
||||
// Class for loading the data required for descibing a Fields of Experts (FoE)
|
||||
// Class for loading the data required for describing a Fields of Experts (FoE)
|
||||
// model. The Fields of Experts regularization consists of terms of the type
|
||||
//
|
||||
// alpha * log(1 + (1/2)*sum(F .* X)^2),
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
// Image number shall be greater or equal to zero. Order of cameras does not
|
||||
// matter and gaps are possible.
|
||||
//
|
||||
// Every 3D point is decribed by:
|
||||
// Every 3D point is described by:
|
||||
//
|
||||
// - Track number point belongs to (single 4 bytes integer value).
|
||||
// - 3D position vector, 3-component vector of float values.
|
||||
|
||||
@@ -380,10 +380,10 @@ int main(int argc, char** argv) {
|
||||
|
||||
Mat x2 = x1;
|
||||
for (int i = 0; i < x2.cols(); ++i) {
|
||||
Vec3 homogenous_x1 = Vec3(x1(0, i), x1(1, i), 1.0);
|
||||
Vec3 homogenous_x2 = homography_matrix * homogenous_x1;
|
||||
x2(0, i) = homogenous_x2(0) / homogenous_x2(2);
|
||||
x2(1, i) = homogenous_x2(1) / homogenous_x2(2);
|
||||
Vec3 homogeneous_x1 = Vec3(x1(0, i), x1(1, i), 1.0);
|
||||
Vec3 homogeneous_x2 = homography_matrix * homogeneous_x1;
|
||||
x2(0, i) = homogeneous_x2(0) / homogeneous_x2(2);
|
||||
x2(1, i) = homogeneous_x2(1) / homogeneous_x2(2);
|
||||
|
||||
// Apply some noise so algebraic estimation is not good enough.
|
||||
x2(0, i) += static_cast<double>(rand() % 1000) / 5000.0;
|
||||
|
||||
+3
-3
@@ -117,7 +117,7 @@ DEFINE_int32(max_line_search_restarts,
|
||||
"Maximum number of restarts of line search direction algorithm.");
|
||||
DEFINE_string(line_search_interpolation,
|
||||
"cubic",
|
||||
"Degree of polynomial aproximation in line search, choices are: "
|
||||
"Degree of polynomial approximation in line search, choices are: "
|
||||
"bisection, quadratic & cubic.");
|
||||
DEFINE_int32(lbfgs_rank,
|
||||
20,
|
||||
@@ -179,7 +179,7 @@ void SplitStringUsingChar(const string& full,
|
||||
} else {
|
||||
const char* start = p;
|
||||
while (++p != end && *p != delim) {
|
||||
// Skip to the next occurence of the delimiter.
|
||||
// Skip to the next occurrence of the delimiter.
|
||||
}
|
||||
*it++ = string(start, p - start);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ class NISTProblem {
|
||||
final_parameters_(0, parameter_id) = atof(pieces[2 + kNumTries].c_str());
|
||||
}
|
||||
|
||||
// Certfied cost
|
||||
// Certified cost
|
||||
SkipLines(ifs, 1);
|
||||
GetAndSplitLine(ifs, &pieces);
|
||||
certified_cost_ = atof(pieces[4].c_str()) / 2.0;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
//
|
||||
// There are two types of residuals in this problem:
|
||||
// 1) The OdometryConstraint residual, that accounts for the odometry readings
|
||||
// between successive pose estimatess of the robot.
|
||||
// between successive pose estimates of the robot.
|
||||
// 2) The RangeConstraint residual, that accounts for the errors in the observed
|
||||
// range readings from each pose.
|
||||
//
|
||||
@@ -97,14 +97,14 @@
|
||||
// timesteps 0 to i for that variable, both inclusive.
|
||||
//
|
||||
// Bayes' rule is used to derive eq. 3 from 2, and the independence of
|
||||
// odometry observations and range readings is expolited to derive 4 from 3.
|
||||
// odometry observations and range readings is exploited to derive 4 from 3.
|
||||
//
|
||||
// Thus, the Belief, up to scale, is factored as a product of a number of
|
||||
// terms, two for each pose, where for each pose term there is one term for the
|
||||
// range reading, P(y_i | u*_(0:i) and one term for the odometry reading,
|
||||
// P(u*_i | u_i) . Note that the term for the range reading is dependent on all
|
||||
// odometry values u*_(0:i), while the odometry term, P(u*_i | u_i) depends only
|
||||
// on a single value, u_i. Both the range reading as well as odoemtry
|
||||
// on a single value, u_i. Both the range reading as well as odometry
|
||||
// probability terms are modeled as the Normal distribution, and have the form:
|
||||
//
|
||||
// p(x) \propto \exp{-((x - x_mean) / x_stddev)^2}
|
||||
@@ -123,7 +123,7 @@
|
||||
// variable, and will be computed by an AutoDiffCostFunction, while the term
|
||||
// for the range reading will depend on all previous odometry observations, and
|
||||
// will be computed by a DynamicAutoDiffCostFunction since the number of
|
||||
// odoemtry observations will only be known at run time.
|
||||
// odometry observations will only be known at run time.
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
|
||||
@@ -59,7 +59,7 @@ bool ReadVertex(std::ifstream* infile,
|
||||
return true;
|
||||
}
|
||||
|
||||
// Reads the contraints between two vertices in the pose graph
|
||||
// Reads the constraints between two vertices in the pose graph
|
||||
template <typename Constraint, typename Allocator>
|
||||
void ReadConstraint(std::ifstream* infile,
|
||||
std::vector<Constraint, Allocator>* constraints) {
|
||||
|
||||
Reference in New Issue
Block a user