mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
add std::string overload for cv::read()
This commit is contained in:
committed by
Vladislav Sovrasov
parent
5b833db558
commit
6dd9e18b2e
@@ -156,9 +156,7 @@ FileNode::operator std::string() const
|
||||
template<> inline
|
||||
void operator >> (const FileNode& n, std::string& value)
|
||||
{
|
||||
String val;
|
||||
read(n, val, val);
|
||||
value = val;
|
||||
read(n, value, std::string());
|
||||
}
|
||||
|
||||
template<> inline
|
||||
|
||||
@@ -714,6 +714,7 @@ CV_EXPORTS void read(const FileNode& node, int& value, int default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, float& value, float default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, double& value, double default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, String& value, const String& default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, std::string& value, const std::string& default_value);
|
||||
CV_EXPORTS void read(const FileNode& node, Mat& mat, const Mat& default_mat = Mat() );
|
||||
CV_EXPORTS void read(const FileNode& node, SparseMat& mat, const SparseMat& default_mat = SparseMat() );
|
||||
CV_EXPORTS void read(const FileNode& node, std::vector<KeyPoint>& keypoints);
|
||||
|
||||
Reference in New Issue
Block a user