Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error when running demo_general (The written string is too long in function icvYMLWriteString) #13

Open
llloadinglll opened this issue Sep 22, 2017 · 1 comment

Comments

@llloadinglll
Copy link

llloadinglll commented Sep 22, 2017

When I ran demo_general , there was an error occurred. Here is part of the output:
" Saving database...
1
OpenCV Error: Bad argument (The written string is too long) in icvYMLWriteString, file /tmp/opencv3-20170727-41914-1s9pxfl/opencv-3.2.0/modules/core/src/persistence.cpp, line 2111
/tmp/opencv3-20170727-41914-1s9pxfl/opencv-3.2.0/modules/core/src/persistence.cpp:2111: error: (-5) The written string is too long in function icvYMLWriteString "

and I found that it was from the line ' f << "descriptor" << DescManip::toString(child.descriptor); ' in Vocabulary.cpp. "child.descriptor.cols()" was 32767 so the string was too long for operator<< .
What confused me most is that in the debug mode of CLion , there is no error. But in the run mode there is.

And I found that if I changed the suffix from '.yml.gz' to '.voc' it could be solved.

@tszssong
Copy link

tszssong commented Feb 5, 2018

I came across the same problem when use only 2 images, use 4 images is ok.
like this:
./demo_general orb ../../utils/images/image0.png ../../utils/images/image1.png ../../utils/images/image2.png ../../utils/images/image3.png

And the problem is finally solved by pull requests:#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants