1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

core: FileStorage - add support for writing vector<String> with bindings (#11883)

* core: FileStorage - add support for writing vector<String> with bindings

* python: extend persistence test for string sequences
This commit is contained in:
Pavel Rojtberg
2018-07-17 12:38:48 +02:00
committed by Vadim Pisarevsky
parent 5e31c82b5b
commit 3f65924c45
3 changed files with 19 additions and 3 deletions
@@ -444,7 +444,9 @@ public:
/// @overload
CV_WRAP void write(const String& name, const String& val);
/// @overload
CV_WRAP void write(const String& name, InputArray val);
CV_WRAP void write(const String& name, const Mat& val);
/// @overload
CV_WRAP void write(const String& name, const std::vector<String>& val);
/** @brief Writes a comment.
+7 -2
View File
@@ -194,9 +194,14 @@ void FileStorage::write( const String& name, const String& val )
*this << name << val;
}
void FileStorage::write( const String& name, InputArray val )
void FileStorage::write( const String& name, const Mat& val )
{
*this << name << val.getMat();
*this << name << val;
}
void FileStorage::write( const String& name, const std::vector<String>& val )
{
*this << name << val;
}
void FileStorage::writeComment( const String& comment, bool append )