Ask Your Question

Revision history [back]

A question of reading yaml file

When I write my yaml file, it's created like this: %YAML:1.0 name: object1 Date of storage: "Wed Jul 26 16:45:46 2017\n" object1: !!opencv-matrix rows: 540 cols: 960 dt: "3u" data: // blabla, a matrix here

...

name: object2 Date of storage: "Wed Jul 26 16:45:46 2017\n" object1: !!opencv-matrix rows: 540 cols: 960 dt: "3u" data: // blabla, a matrix here ...

The problem is how can I get all the Mats of the objects, here when I use operator like fs["name"], I can only get the first object's data. Anyone Help? Thanks!

A question of reading yaml file

When I write my yaml file, it's created like this: this:

%YAML:1.0
name: object1
Date of storage: "Wed Jul 26 16:45:46 2017\n"
object1: !!opencv-matrix
   rows: 540
   cols: 960
   dt: "3u"
   data: // blabla, a matrix here

...

here ... --- name: object2 Date of storage: "Wed Jul 26 16:45:46 2017\n" object1: !!opencv-matrix rows: 540 cols: 960 dt: "3u" data: // blabla, a matrix here ...

...

The problem is how can I get all the Mats of the objects, here when I use operator like fs["name"], I can only get the first object's data. Anyone Help? Thanks!