I'm trying to implement a digi recognition program with c++ and opencv3, when i define a varible using KNearest i get this error:
main.cpp:19:18: error: variable or field 'RunSelfTest' declared void
void RunSelfTest(KNearest& knn2);
^
main.cpp:19:18: error: 'KNearest' was not declared in this scope
main.cpp:19:18: note: suggested alternative:
In file included from c:/OpenCV/build/include/opencv2/ml/ml.hpp:48:0,
from main.cpp:1:
c:/OpenCV/build/include/opencv2/ml.hpp:397:20: note: 'cv::ml::KNearest'
class CV_EXPORTS_W KNearest : public StatModel
this is my code:
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/ml/ml.hpp"
#include <iostream>
#include <stdio.h>
using namespace cv;
using namespace std;
void RunSelfTest(KNearest& knn2);
void AnalyseImage(KNearest knearest);
i totally can't find where is the problem