Opencv Python文件存储API

2024-06-26 14:40:56 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用opencvpythonapi来读取yml文件。在

如何读取具有嵌套元素的'yml'文件,例如

'示例.yml'

%YAML:1.0
empty:
   - { type:0, condition:0, slot:0, tr:[ 269, 120 ], tl:[ 204, 120 ] }
   - { type:0, condition:0, slot:0, tr:[ 200, 121 ], tl:[ 131, 121 ] }
   - { type:0, condition:0, slot:0, tr:[ 127, 123 ], tl:[ 56, 123 ] }

我试过了

^{pr2}$

它工作正常,但我无法访问嵌套元素,如“type”、“condition”、“slot”、“tr”和“tl”。在

你知道怎么接近他们吗?在


Tags: 文件元素yaml示例ymltypeconditiontr