Use path as key in FileStorage
问题 I am trying to write a file (json/yaml/xml, the format does not matter) that stores a filepath with a specific cv::Mat . As I ended up realizing here, the key combination does not allow for a path (/home/user, for example). void persist_histograms(const QString& filepath, const QHash<QString, Mat>& histograms) { cv::FileStorage storage(filepath.toStdString(), cv::FileStorage::WRITE); QHashIterator<QString, Mat> it(histograms); while (it.hasNext()) { it.next(); storage << it.key().toStdString(