comparison include/utils.hpp @ 1002:6c5ce3ec497e

improved handling of path for feature based tracking
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 01 Jun 2018 17:19:24 -0400
parents bee0e7407af7
children
comparison
equal deleted inserted replaced
1001:cc7c6b821ae6 1002:6c5ce3ec497e
15 std::vector<std::vector<float> > loadNumbers(const std::string& filename, const std::string& separator = ::separator); 15 std::vector<std::vector<float> > loadNumbers(const std::string& filename, const std::string& separator = ::separator);
16 16
17 /** Gets line in a file, skipping comments (starting with '#') (wrapper around getline). 17 /** Gets line in a file, skipping comments (starting with '#') (wrapper around getline).
18 * Warning: returns an empty string if all the lines to the end of the file are comments. */ 18 * Warning: returns an empty string if all the lines to the end of the file are comments. */
19 std::string getlineComment(std::ifstream& f); 19 std::string getlineComment(std::ifstream& f);
20
21 /** Get relative filename if not absolute */
22 std::string getRelativeFilename(const std::string& parentDirname, const std::string& filename);
20 23
21 /** Converts a string to an integer. */ 24 /** Converts a string to an integer. */
22 int toInt(const std::string& s); 25 int toInt(const std::string& s);
23 26
24 /** Converts a string to a float. */ 27 /** Converts a string to a float. */