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

closes #110

parent 1ff31f07
No related branches found
No related tags found
1 merge request!52closes #110
Pipeline #11914 passed
This commit is part of merge request !52. Comments created here will be created in the context of that merge request.
...@@ -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.
Finish editing this message first!
Please register or to comment