Open gitZGQ518 opened 3 years ago
将下面虚函数添加到SVMImp1类public里面。
CV_WRAP virtual bool trainAuto(InputArray samples,
int layout,
InputArray responses,
int kFold = 10,
Ptr<ParamGrid> Cgrid = SVM::getDefaultGridPtr(SVM::C),
Ptr<ParamGrid> gammaGrid = SVM::getDefaultGridPtr(SVM::GAMMA),
Ptr<ParamGrid> pGrid = SVM::getDefaultGridPtr(SVM::P),
Ptr<ParamGrid> nuGrid = SVM::getDefaultGridPtr(SVM::NU),
Ptr<ParamGrid> coeffGrid = SVM::getDefaultGridPtr(SVM::COEF),
Ptr<ParamGrid> degreeGrid = SVM::getDefaultGridPtr(SVM::DEGREE),
bool balanced = false)
{
return false;
}
CV_WRAP virtual Mat getUncompressedSupportVectors() const
{
return getSupportVectors();
}
I'm submitting a ... (check one with "x")
Current behavior Compiling EasyPR in QT project, occur error :
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\memory:1801: error: C2259: “cv::ml::SVMImpl”: 不能实例化抽象类
QT 5.9.0
openCV 4.5.2 OS : win10 Build tool: Desktop QT5.9.0 MSVC2017 64bit
Expected/desired behavior
求各位大侠帮助,非常感谢
Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce.
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
System: Windown10
Compiler version/IDE: Desktop QT5.9.0 MSVC2017 64bit
CMake version: 3.20.2
**OpenCV version: 4.5.2