最近做东西需要用到openpose,需要用到QT搭建自己的显示界面,而且用海康摄像机的SDK来获取图像
编译环境Ubuntu14.04 x64 QT5.8
1 首先按照openpose Git上的教程安装编译,编译过程不再赘述,
2 编译完成后 make distribute ,会生成distribute文件夹,将里面的/lib/文件夹下的库文件拷到工程目录,然后 将/3rdparty/caffe/distribute/lib/文件夹下的库文件拷到工程目录
3 修改工程的.pro文件,如下:红颜色的是要根据自己的实际情况修改的,这样可以利用openpose的代码来实现自己想实现的功能。
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = pose_test
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h \
openpose_test.h
FORMS += mainwindow.ui
#增加头文件包含路径
INCLUDEPATH += /home/xxx/opencv-2.4.13/include/opencv \
INCLUDEPATH += /home/xxx/opencv-2.4.13/include/opencv2 \
INCLUDEPATH +=