DBow3
DBow3 copied to clipboard
matrix.cpp:307: error: (-215) s >= 0
i try this project and i meet a problem at Vocabulary voc("small_voc.yml.gz");the error is as follows:OpenCV Error: Assertion failed (s >= 0) in cv::setSize, file C:\build\master_winpack-build-win64-vc14\opencv\modules\core\src\matrix.cpp, line 307 C:\build\master_winpack-build-win64-vc14\opencv\modules\core\src\matrix.cpp:307: error: (-215) s >= 0 in function cv::setSize,and i don't know how to fix it
hi,@liudongdong1 Have you worked out any approach to solve the problem? I also meet that when I load a database file. I get the error at this statement: DBoW3::Database db( database_dir ); the error is as follows: OpenCV Error: Assertion failed (s >= 0) in setSize, file /home/robot/opencv-3.3.0/modules/core/src/matrix.cpp, line 310 terminate called after throwing an instance of 'cv::Exception' what(): /home/robot/opencv-3.3.0/modules/core/src/matrix.cpp:310: error: (-215) s >= 0 in function setSize
i found the answer which already solved by other in issues,and change it,
void DescManip::fromString(cv::Mat &a, const std::string &s)
{
string ss_aux;
stringstream ss(s);
ss>>ss_aux;
if(ss_aux.find("dbw3")==std::string::npos){
int val;
vector
}
} it does work
Thank you very much,it really works after change,but there are two small mistake in the code you given,
vector data;data.reserve(100);
float *p = a.ptr();
I corrected it and it worked.thank you!