Merge pull request #6482 from paroj:filestorage_py

This commit is contained in:
Alexander Alekhin
2016-05-31 11:53:34 +00:00
2 changed files with 53 additions and 3 deletions

View File

@@ -5271,6 +5271,25 @@ void FileStorage::writeObj( const String& name, const void* obj )
cvWrite( fs, name.size() > 0 ? name.c_str() : 0, obj );
}
void FileStorage::write( const String& name, double val )
{
*this << name << val;
}
void FileStorage::write( const String& name, const String& val )
{
*this << name << val;
}
void FileStorage::write( const String& name, InputArray val )
{
*this << name << val.getMat();
}
void FileStorage::writeComment( const String& comment, bool append )
{
cvWriteComment(fs, comment.c_str(), append ? 1 : 0);
}
FileNode FileStorage::operator[](const String& nodename) const
{