Open GoogleCodeExporter opened 9 years ago
The error produced from this is......
Traceback (most recent call last):
File "svm2.py", line 31, in <module>
tSvm.train(data_mat, class_mat, 0, 0, x);
Boost.Python.ArgumentError: Python argument types in
CvSVM.train(CvSVM, Mat, Mat, int, int, Boost.Python.class)
did not match C++ signature:
train(CvSVM_wrapper {lvalue}, cv::Mat _train_data, cv::Mat _responses, cv::Mat _var_idx=Mat(), cv::Mat _sample_idx=Mat(), CvSVMParams _params=<pyopencv.ml_ext.CvSVMParams object at 0x12033f0>)
train(CvSVM {lvalue}, cv::Mat _train_data, cv::Mat _responses, cv::Mat _var_idx=Mat(), cv::Mat _sample_idx=Mat(), CvSVMParams _params=<pyopencv.ml_ext.CvSVMParams object at 0x12033f0>)
train(CvSVM {lvalue} inst, cv::Mat {lvalue} _train_data, cv::Mat {lvalue} _responses, cv::Mat _var_idx=Mat(), cv::Mat _sample_idx=Mat(), CvSVMParams _params=<pyopencv.ml_ext.CvSVMParams object at 0x1203190>)
Original comment by john.mrd...@googlemail.com
on 8 Mar 2011 at 12:37
[deleted comment]
Changing the CvSVMParams line to....
x=CvSVMParams()
Circumvents this issue.
In the C++ example each value of the Term Criteria is set independently as an
attribute of the CvSVMParams.
However the attribute for epsilon etc, aren't attributes in Pyopencv?
This code produces this error.
Produces the error......
File "svm2.py", line 29, in <module>
x.term_crit =TermCriteria(1,50,0.001)
AttributeError: can't set attribute
Are the values supposed to be passed to the SVM upon instantiation? Or does the
CvSVMParams class need to be configured first?
Kind regards,
Daniel
Original comment by john.mrd...@googlemail.com
on 8 Mar 2011 at 1:31
Original issue reported on code.google.com by
john.mrd...@googlemail.com
on 8 Mar 2011 at 12:36Attachments: