vocabtree  0.0.1
filesystem.hpp File Reference
#include <stdint.h>
#include <opencv2/opencv.hpp>
Include dependency graph for filesystem.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  filesystem
 Provides useful wrappers around many filesystem related functionality, including reading writing certain common data structures as well as common operations (ex.
 

Functions

std::string filesystem::basename (const std::string &path, bool include_extension=false)
 Returns the basename of the input filepath, including or not including the extension. More...
 
bool filesystem::file_exists (const std::string &name)
 Returns true if file exists at location, else returns false. More...
 
void filesystem::create_file_directory (const std::string &absfilepath)
 Recursively creates all directories if needed up to the specified file. More...
 
bool filesystem::write_cvmat (const std::string &fname, const cv::Mat &data)
 Writes a cv::Mat structure to the specified location. More...
 
bool filesystem::load_cvmat (const std::string &fname, cv::Mat &data)
 Loads a cv::Mat structure from the specified location. More...
 
bool filesystem::write_sparse_vector (const std::string &fname, const std::vector< std::pair< uint32_t, float > > &data)
 Writes the BoW feature to the specified location. More...
 
bool filesystem::load_sparse_vector (const std::string &fname, std::vector< std::pair< uint32_t, float > > &data)
 Loads the BoW feature from the specified location. More...
 
std::vector< std::string > filesystem::list_files (const std::string &path, const std::string &ext="", bool recursive=true)
 Lists all files in the given directory with an optional extension. More...
 
bool filesystem::write_text (const std::string &fname, const std::string &text)
 Writes a text file to the input file location given the input string. More...