Ask Your Question
0

Can OpenCV XML manage/create deep structures

asked 2013-03-06 08:38:35 -0600

joker gravatar image

Hi,

On documentation page, I see only 2-levels example: node with basic elements under it. Seems like I can't have node of nodes, f.ex. right? The idea is to implement something similar to the next C/C++ structure:

struct A { struct B { struct C { ....

Can I really do it with current XML implementation?

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-06 09:23:10 -0600

berak gravatar image

updated 2013-03-06 09:25:55 -0600

sure you can do that!

the formatting syntax for this may look a bit (...), but hey ;)

look here:

http://docs.opencv.org/trunk/modules/core/doc/xml_yaml_persistence.html

(esp. the features example)

edit flag offensive delete link more

Comments

yup!

The {...} makes the magic:

FileStorage fs("test.yml", FileStorage::WRITE);

fs << "A";

fs << "{";

fs << "B";

fs << "{";

fs << "x" << 4;

fs << "}";

fs << "}";

Thanks a lot :-)

joker gravatar imagejoker ( 2013-03-10 08:51:25 -0600 )edit

Question Tools

Stats

Asked: 2013-03-06 08:38:35 -0600

Seen: 197 times

Last updated: Mar 06 '13