行人检测arm代码调试出现的问题记录

1 篇文章 0 订阅
1 篇文章 0 订阅

平台:嵌视科技arm板

  1. /opt/gcc/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/tq-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/include/c++/4.6.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.                                                                                                                                                                  解决方案:在build_arm.sh文件中只生成到Makefile文件就结束,在makefile文件中 加入                                                          LINK            = arm-none-linux-gnueabi-g++ -lts -std=c++0x
    CXX           = arm-none-linux-gnueabi-g++ -lts -std=c++0x                                                                                                                     接着在终端输入make

  2. 要用到IplImage与Mat之间的转换,如下:https://mp.csdn.net/postedit/81432133

  3. error: 'createBackgroundSubtractorMOG2' was not declared in this scope                                                                                        解决方案:(原因是opencv版本不同,3和2之间的函数调用有差别,也添加了#include <opencv/cvaux.h>)                          原代码是:Ptr<BackgroundSubtractorMOG2> mog2 = createBackgroundSubtractorMOG2(History, T1, true);                                                  mog2->apply(moveFound, moveFound);                                                                                                                            现代码为:Ptr<BackgroundSubtractorMOG2> mog2 =  new BackgroundSubtractorMOG2(History, T1, true);                                                   mog2->operator()(moveFound, moveFound);

  4. error: ISO C++ forbids in-class initialization of non-const static member 'flag'
    解决方案:(c++版本不同,typedef struct定义的结构体类型中不能初始化un-const static 的变量)                                            在结构体外对变量赋初值,放置的位置不同也会出现错误,本段代码中将其放置在 void match(Mat frameHSV, vector<Rect> found)。了解一下结构体的定义与使用                                                                                                                                                      

  5. error: call of overloaded 'Rect_(cv::Rect_<double>&)' is ambiguous                                                                                                    解决方案:double改int型

  6. 在Ubuntu16.04下的错误如下:                                                                                                                                    src/moveDetect.h: In function 'void moveDetect(cv::Mat, cv::Mat&)':
    src/moveDetect.h:26: error: 'class cv::BackgroundSubtractorMOG2' has no member named 'apply'
    In file included from src/MainDlg.h:16,
                     from src/main.cpp:6:
    src/svmDetect.h: In function 'void svmDetect(cv::Mat, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >&)':
    src/svmDetect.h:27: warning: comparison between signed and unsigned integer expressions
    In file included from src/MainDlg.h:17,
                     from src/main.cpp:6:
    src/pedestrianJudge.h: In function 'void pedestrianJudge(cv::Mat, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >&)':
    src/pedestrianJudge.h:30: warning: comparison between signed and unsigned integer expressions
    src/pedestrianJudge.h:54: warning: comparison between signed and unsigned integer expressions
    In file included from src/MainDlg.h:18,
                     from src/main.cpp:6:
    src/particleFilter.h: At global scope:
    src/particleFilter.h:40: error: 'default_random_engine' does not name a type
    src/particleFilter.h:59: error: ISO C++ forbids initialization of member 'flag'
    src/particleFilter.h:59: error: making 'flag' static
    src/particleFilter.h:59: error: ISO C++ forbids in-class initialization of non-const static member 'flag'
    src/particleFilter.h:61: error: ISO C++ forbids initialization of member 'deleteN'
    src/particleFilter.h:61: error: making 'deleteN' static
    src/particleFilter.h:61: error: ISO C++ forbids in-class initialization of non-const static member 'deleteN'
    src/particleFilter.h: In function 'void match(cv::Mat, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >)':
    src/particleFilter.h:102: warning: comparison between signed and unsigned integer expressions
    src/particleFilter.h: In function 'void updateParticles(cv::Mat)':
    src/particleFilter.h:185: error: 'e' was not declared in this scope
    src/particleFilter.h:190: error: 'e' was not declared in this scope
    src/particleFilter.h:273: error: call of overloaded 'Rect_(cv::Rect_<double>&)' is ambiguous
    src/opencv2/core/operations.hpp:1902: note: candidates are: cv::Rect_<_Tp>::Rect_(const CvRect&) [with _Tp = int]
    src/opencv2/core/operations.hpp:1901: note:                 cv::Rect_<_Tp>::Rect_(const cv::Rect_<_Tp>&) [with _Tp = int]
    src/particleFilter.h: At global scope:
    src/particleFilter.h:330: warning: unused parameter 'frameDetect'
    Makefile:286: recipe for target 'main.o' failed
    make: *** [main.o] Error 1

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值