Python: wrap Algorithm::read and Algorithm::write

This commit is contained in:
Pavel Rojtberg
2017-11-27 17:04:56 +01:00
parent f071a48ec7
commit 6fbf0758bc
3 changed files with 31 additions and 4 deletions
+13
View File
@@ -55,6 +55,19 @@ Algorithm::~Algorithm()
CV_TRACE_FUNCTION();
}
void Algorithm::write(const Ptr<FileStorage>& fs, const String& name) const
{
CV_TRACE_FUNCTION();
if(name.empty())
{
write(*fs);
return;
}
*fs << name << "{";
write(*fs);
*fs << "}";
}
void Algorithm::save(const String& filename) const
{
CV_TRACE_FUNCTION();