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

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -