Ask Your Question

Revision history [back]

It is dependent on the version of OpenCV you use. In 2.4.9 (also 2.4.9.x-prep), the answer is no since the SVM part of opencv_ml library only supports three kernel types: RBF, POLY and SIGMOID. But in the 3.0.0 version, OpenCV implements 5 kernel functions, the two additional ones are CHISQUARE (CHI2) and INTERSECTION (INTER) (see more at svm source). So if your wish is staying with 2.4.9 version, you have to do it yourself while no more effort is needed with version 3.0.0, but it is unstable at the moment. It would be better if there is an extra option to use user-defined kernel functions as in LibSVM.

It is dependent on the version of OpenCV you use. In 2.4.9 version (also 2.4.9.x-prep), the answer is no since the SVM part of the opencv_ml library only supports three kernel types: RBF, POLY and SIGMOID. But in the 3.0.0 version, OpenCV implements 5 kernel functions, the two additional ones are CHISQUARE (CHI2) and INTERSECTION (INTER) (see more at svm source). So if your wish is staying with 2.4.9 version, you have to do it yourself while no more effort is needed with version 3.0.0, but it is unstable at the moment. It would be better if there is an extra option to use user-defined kernel functions as in LibSVM.