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:
+3
-2
@@ -107,8 +107,9 @@ you may access it. For sequences you need to go through them to query a specific
|
||||
then we have to specify if our output is either a sequence or map.
|
||||
|
||||
For sequence before the first element print the "[" character and after the last one the "]"
|
||||
character. With Python, the "]" character could be written with the name of the sequence or
|
||||
the last element of the sequence depending on the number of elements:
|
||||
character. With Python, call `FileStorage.startWriteStruct(structure_name, struct_type)`,
|
||||
where `struct_type` is `cv2.FileNode_MAP` or `cv2.FileNode_SEQ` to start writing the structure.
|
||||
Call `FileStorage.endWriteStruct()` to finish the structure:
|
||||
@add_toggle_cpp
|
||||
@snippet cpp/tutorial_code/core/file_input_output/file_input_output.cpp writeStr
|
||||
@end_toggle
|
||||
|
||||
Reference in New Issue
Block a user