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

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

This commit is contained in:
Pavel Rojtberg
2017-07-27 14:34:32 +02: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();