c++ - FileStorage.read() occurred an error:The sequence element is not a numerical scalar? -


guys~ i'm not @ english, i'll try best describe question.

i'm using opencv2.4.9 filestorage in opencv store mat in ".yml" file. , file 2.91g

the write code this:

fs.open(temppath, filestorage::write); fs << "tf" << wordsfreq; fs.release(); 

wordsfreq mat

but when use followed code read back.

sprintf(tmpfilename,"%s/tf.yml",trainingresultsdir.c_str()); filestorage fs(tmpfilename, filestorage::read); fs["tf"] >> wordsfreq; fs.release(); 

it occurred error :

opencv error: unspecified error (the sequence element not numerical scalar) in cvreadrawdataslice, file /users/xuhuaiyu/development/opencv-2.4.9/modules/core/src/persistence.cpp, line 3362 libc++abi.dylib: terminating uncaught exception of type cv::exception: /users/xuhuaiyu/development/opencv-2.4.9/modules/core/src/persistence.cpp:3362: error: (-2) sequence element not numerical scalar in function cvreadrawdataslice 


Comments

Popular posts from this blog

javascript - How to diff two immutable objects -

c# - How can I have the VS Debugger break in the correct location for exceptions thrown in Async methods in a Console App? -

javascript - React.js: onClick function from child to parent -