FileStorage key only takes letters as first value. (Bug #2295)


Added by Andreas Holz over 12 years ago. Updated about 12 years ago.


Status:Cancelled Start date:2012-08-23
Priority:Low Due date:
Assignee:- % Done:

0%

Category:documentation
Target version:2.4.4
Affected version:branch '2.4' Operating System:
Difficulty: HW Platform:
Pull request:

Description

I'm not sure if that's a bug, or just not reported in the documentation

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

Example Code:

std::stringstream str2;
str2 <<  i << "_" << k << "_" n;
filestorage_ << str2.str().c_str() << tmp_matrix;

Error message

OpenCV Error: Unspecified error (Incorrect element name 4_0_0) in operator<<, file /home/andreas/Downloads/OpenCV-2.4.2/modules/core/src/persistence.cpp, line 5239

It took me a couple of hours to figure out, that it only takes a letter as first key value.

Looking at persistence.cpp it checks cv_isalpha on the char.
I don't know if that's a XML / YAML specification or just a bug.
But please mention it in the documentation :)

Cheers,
Andreas


Associated revisions

Revision 86b6c487
Added by Andrey Pavlenko about 11 years ago

Merge pull request #2295 from alalek:opencl_align_rw_buffers

History

Updated by Vadim Pisarevsky over 12 years ago

  • Target version deleted ()

Updated by dongsun shin over 12 years ago

I read your problem. But, I think this is not an error.
in the xml_yaml document, 'name' and 'value' have to read sequencially.
for example..
filestorage_ << "name" << 5;
but your example is as below
filestorage_ << 5 << "_" << 6;

"_" is not an alphabet and that is not a name.

Best Regards
dsshin. ()

Andreas Holz wrote:

I'm not sure if that's a bug, or just not reported in the documentation

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

Example Code:

[...]

Error message

[...]

It took me a couple of hours to figure out, that it only takes a letter as first key value.

Looking at persistence.cpp it checks cv_isalpha on the char.
I don't know if that's a XML / YAML specification or just a bug.
But please mention it in the documentation :)

Cheers,
Andreas

Updated by Vsevolod Glumov over 12 years ago

  • Assignee set to Vsevolod Glumov

Updated by Kirill Kornyakov over 12 years ago

  • Target version set to Next Hackathon

Updated by Vadim Pisarevsky about 12 years ago

  • Target version deleted (Next Hackathon)

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee deleted (Vsevolod Glumov)

Updated by Daniil Osokin about 12 years ago

I'm agree with dongsun shin, this isn't a bug; cancelling this ticket.

  • Affected version set to branch '2.4'
  • Status changed from Open to Cancelled

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF