当前位置:   article > 正文

Opencv中人体检测_未定义标识符 "cvlatentsvmdetector

未定义标识符 "cvlatentsvmdetector

以前做算法实现一直用的说matlab,最近做目标跟踪的算法,开始使用Opencv,发现Opencv真的很强大,集合了很多算法,封装了很多函数,使用方法跟matlab很类似,但又比matlab的效率高。下面说我使用hog算法进行人体检测的代码,跟Opencv中的peopledetect.cpp类似,不过我修改了一些代码,可以检测连续的视频序列。

代码如下:

  1. #include <fstream>
  2. #include <string>
  3. #include <cv.h>
  4. #include <highgui.h>
  5. #include <ml.h>
  6. #include <iostream>
  7. #include <fstream>
  8. #include <string>
  9. #include <vector>
  10. #include "cvaux.h"
  11. #include <iostream>
  12. #include <stdio.h>
  13. #include <string.h>
  14. #include <ctype.h>
  15. using namespace cv;
  16. using namespace std;
  17. int main()
  18. {
  19. Mat img0,img1;
  20. Mat img2;
  21. //Mat img3;
  22. int i;
  23. FILE* f = 0;
  24. char _filename[1024];
  25. //imshow("hello",img3);
  26. //waitKey(0);
  27. HOGDescriptor hog;
  28. //CvLatentSvmDetector* detector = cvLoadLatentSvmDetector("result.xml");
  29. CvSVM svm;
  30. svm.load("result.xml");
  31. //h
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/546582
推荐阅读
相关标签
  

闽ICP备14008679号