AttributeError: 'module' object has no attribute 'SVM_LINEAR'

Viewed 6274

I have installed open cv 3.0 then i installed libsvm.Then i addded that to my pycharm packages.But still when typing this code

svm_params = dict( kernel_type = cv2.SVM_LINEAR,
                svm_type = cv2.SVM_C_SVC,
                C=2.67, gamma=5.383 )

it shows this error

svm_params = dict( kernel_type = cv2.SVM_LINEAR,
AttributeError: 'module' object has no attribute 'SVM_LINEAR'

i tried import libsvm but it didn't work.please help. Is opencv 3.0 is ok should i go back to 2.4?

1 Answers
Related