Merge pull request #17436 from vpisarev:fix_python_io
* fixed #17044 1. fixed Python part of the tutorial about using OpenCV XML-YAML-JSON I/O functionality from C++ and Python. 2. added startWriteStruct() and endWriteStruct() methods to FileStorage 3. modifed FileStorage::write() methods to make them work well inside sequences, not only mappings. * try to fix the doc builder * added Python regression test for FileStorage I/O API ([TODO] iterating through long sequences can be very slow) * fixed yaml testing
This commit is contained in:
@@ -429,7 +429,7 @@ public:
|
||||
/** @brief Writes the registered C structure (CvMat, CvMatND, CvSeq).
|
||||
@param name Name of the written object.
|
||||
@param obj Pointer to the object.
|
||||
@see ocvWrite for details.
|
||||
@see cvWrite for details.
|
||||
*/
|
||||
void writeObj( const String& name, const void* obj );
|
||||
|
||||
@@ -456,6 +456,17 @@ public:
|
||||
*/
|
||||
CV_WRAP void writeComment(const String& comment, bool append = false);
|
||||
|
||||
/** @brief Starts to write a nested structure (sequence or a mapping).
|
||||
@param name name of the structure (if it's a member of parent mapping, otherwise it should be empty
|
||||
@param flags type of the structure (FileNode::MAP or FileNode::SEQ (both with optional FileNode::FLOW)).
|
||||
@param typeName usually an empty string
|
||||
*/
|
||||
CV_WRAP void startWriteStruct(const String& name, int flags, const String& typeName=String());
|
||||
|
||||
/** @brief Finishes writing nested structure (should pair startWriteStruct())
|
||||
*/
|
||||
CV_WRAP void endWriteStruct();
|
||||
|
||||
/** @brief Returns the normalized object name for the specified name of a file.
|
||||
@param filename Name of a file
|
||||
@returns The normalized object name.
|
||||
|
||||
Reference in New Issue
Block a user