bool is_write_xml = true;
if (is_write_xml == true)
{
ptree pt;
pt.put("annotation.folder", "img");
pt.put("annotation.size.width", "512");
pt.put("annotation.size.height", "512");
pt.put("annotation.path", "");
pt.put("annotation.segmented", "0");
for (int index = 0; index < 2; index++)
{
ptree pt_object;
pt_object.put("name", "seting");
pt_object.put("pose", "Unspecified");
pt_object.put("bndbox.xmin", "38");
pt_object.put("bndbox.ymin", "38");
pt_object.put("bndbox.xmax", "38");
pt_object.put("bndbox.ymax", "38");
pt.add_child("annotation.object", pt_object);
}
auto settings = boost::property_tree::xml_writer_make_settings<std::string>('\t', 1);
write_xml("conf.xml", pt, std::locale(), settings);
}