2013-09-28 07:37:59 -0600 | received badge | ● Scholar (source) |
2013-09-28 07:36:30 -0600 | commented answer | OpenCV undefined reference CvSVM::predict, maybe it is a bug , please check it. Thank you very much for so detail explanation. Yes, I have found that OpenCV 1.1 could work today. I think some deprecated functions should be removed from the include files. So developers could save time. |
2013-09-27 19:19:50 -0600 | received badge | ● Editor (source) |
2013-09-27 19:18:15 -0600 | asked a question | OpenCV undefined reference CvSVM::predict, maybe it is a bug , please check it. Hello, The code is from http://www.opencv.jp/sample/svm.html. I have tested the SVM in OpenCV 2.4.6.1, but there is an error as follow: and I have linked the project with libraries as follows: Then, I replace the "#include <ml.h>" with "#include <ml.hpp>", there are more than 2000 errors, some are as follows: Then, I still use the "#include <ml.h>", and I comment the line 71 "ret = svm.predict(&m)", then everything is OK! Then, I change the line 71 "ret = svm.predict (&m);" into "ret = svm.predict (&m ,false);", and modify the ml.h, in line 492, I add one row, like this: Then, everything is OK! I think the ml.h should add some more override functions, because I check the modules/ml/src/svm.cpp, there are no override function for "virtual float predict( const CvMat* _sample ) const;". Maybe this is the problem. Please Check it. Thanks. |