I am reading the following yaml file, converted from the xml of pascal VOC 2007:
annotation:
filename: 000001.jpg
folder: VOC2007
object:
- bndbox: {xmax: '195', xmin: '48', ymax: '371', ymin: '240'}
difficult: '0'
name: dog
pose: Left
truncated: '1'
- bndbox: {xmax: '352', xmin: '8', ymax: '498', ymin: '12'}
difficult: '0'
name: person
pose: Left
truncated: '1'
owner: {flickrid: Fried Camels, name: Jinky the Fruit Bat}
segmented: '0'
size: {depth: '3', height: '500', width: '353'}
source: {annotation: PASCAL VOC2007, database: The VOC2007 Database, flickrid: '341012865',
image: flickr}
using
FileStorage fs(fName, FileStorage::READ);
I get this error:
OpenCV Error: Parsing error (/opt/Datasets/VOCdevkit_test/VOC2007/Annotations/000001.yml(1): Valid XML should start with '') in icvXMLParse, file /home/alessandro/OpenCV/opencv-2.4.10.x-prep/modules/core/src/persistence.cpp, line 2252 terminate called after throwing an instance of 'cv::Exception' what(): /home/alessandro/OpenCV/opencv-2.4.10.x-prep/modules/core/src/persistence.cpp:2252: error: (-212) /opt/Datasets/VOCdevkit_test/VOC2007/Annotations/000001.yml(1): Valid XML should start with '' in function icvXMLParse
Aborted (core dumped) It is from an existing open source code that has worked in others settings. Does anyone idea of the problem? Is something related with OpenCv version? I am using 2.4.10