HOGDescriptionr的使用问题
Problems using HOGDescriptor
本文关键字:问题 HOGDescriptionr 更新时间:2023-10-16
我在摆弄一些c++/occv。我在看一些样品,还没有设法编译/运行使用HOGDescriptor
的peopledetect.cpp。
我已经设置了一个基本的Qt控制台应用程序来测试和缩小问题范围,并获得了以下基本代码:
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
using namespace cv;
using namespace std;
int main(){
Mat img = imread("../images/people1.jpg");
HOGDescriptor hog;
namedWindow("people detect test");
imshow("TaDa!",img);
waitKey(5000);
return 1;
}
由于以下行而无法编译:HOGDescriptor hog;
。以下是Qt给出的编译输出:
Running build steps for project HoGTest...
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w
make: Entering directory `/Users/george/Documents/Qt/HoGTest'
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o HoGTest main.o -F/Users/george/QtSDK/Desktop/Qt/474/gcc/lib -L/Users/george/QtSDK/Desktop/Qt/474/gcc/lib /opt/local/lib/libopencv_core.2.3.1.dylib /opt/local/lib/libopencv_highgui.2.3.1.dylib -framework QtCore
Undefined symbols:
"vtable for cv::HOGDescriptor", referenced from:
cv::HOGDescriptor::HOGDescriptor()in main.o
cv::HOGDescriptor::~HOGDescriptor()in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [HoGTest] Error 1
make: Leaving directory `/Users/george/Documents/Qt/HoGTest'
The process "/usr/bin/make" exited with code 2.
Error while building project HoGTest (target: Desktop)
When executing build step 'Make'
不幸的是,当谈到c++/opencv时,我是一个n00b,所以不确定是什么错误的确切含义以及如何修复。提示/提示?
您需要链接到libopencv objdetect。2.3.1
相关文章:
- 警告处理为错误这里有什么问题
- 最小硬币更换问题(自上而下方法)
- 为"adjacent"变量赋值时出现问题
- 我的神经网络不起作用 [XOR 问题]
- 在Ubuntu 16.04上安装Cilk时出现问题
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 编译包含字符串的代码时遇到问题
- Project Euler问题4的错误解决方案
- 问题:什么是QAbstractItemView::NoEditTriggers的反面
- 在编译C++代码(具有dlib和opencv)到WASM时面临问题
- 在进程中对同一管道进行读取和写入时C++管道出现问题
- 静态数据成员的问题-修复链接错误会导致编译器错误
- C++ 雷神库 - 使用资源加载器类时出现问题(不命名类型)
- 一个关于在C++中重载布尔运算符的问题
- 首要问题的答案让值班员搞错了
- setlocale的C++土耳其字符串问题
- 如何重构类层次结构以避免菱形问题
- 基于boost的程序的静态链接——zlib问题
- C++格式化输出问题
- 使用mongocxx驱动程序时包含头文件问题