Skip to content
Snippets Groups Projects
Commit 6b356232 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

Merge branch 'bug/110/cmdline' into 'master'

closes #110

Closes #110

See merge request nicolas.pope/ftl!52
parents 1ff31f07 276b6b72
Branches
Tags
1 merge request!52closes #110
Pipeline #11916 passed
...@@ -33,12 +33,12 @@ bool hasOption(const map<string, string> &options, const string &opt) { ...@@ -33,12 +33,12 @@ bool hasOption(const map<string, string> &options, const string &opt) {
int getOptionInt(const map<string, string> &options, const string &opt, int default_value) { int getOptionInt(const map<string, string> &options, const string &opt, int default_value) {
if (!hasOption(options, opt)) return default_value; if (!hasOption(options, opt)) return default_value;
return std::stoi(getOption(options, opt)); return std::stoi(options.at(opt));
} }
double getOptionDouble(const map<string, string> &options, const string &opt, double default_value) { double getOptionDouble(const map<string, string> &options, const string &opt, double default_value) {
if (!hasOption(options, opt)) return default_value; if (!hasOption(options, opt)) return default_value;
return std::stod(getOption(options, opt)); return std::stod(options.at(opt));
} }
string getOptionString(const map<string, string> &options, const string &opt, string default_value) { string getOptionString(const map<string, string> &options, const string &opt, string default_value) {
...@@ -181,8 +181,8 @@ CalibrationChessboard::CalibrationChessboard(const map<string, string> &opt) { ...@@ -181,8 +181,8 @@ CalibrationChessboard::CalibrationChessboard(const map<string, string> &opt) {
pattern_square_size_ = getOptionDouble(opt, "square_size", 36.0); pattern_square_size_ = getOptionDouble(opt, "square_size", 36.0);
LOG(INFO) << "Chessboard calibration parameters"; LOG(INFO) << "Chessboard calibration parameters";
LOG(INFO) << " rows: " << pattern_size_.width; LOG(INFO) << " rows: " << pattern_size_.height;
LOG(INFO) << " cols: " << pattern_size_.height; LOG(INFO) << " cols: " << pattern_size_.width;
LOG(INFO) << " width: " << image_size_.width; LOG(INFO) << " width: " << image_size_.width;
LOG(INFO) << " height: " << image_size_.height; LOG(INFO) << " height: " << image_size_.height;
LOG(INFO) << " square_size: " << pattern_square_size_; LOG(INFO) << " square_size: " << pattern_square_size_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment