环境配置
1、资源下载
2、环境配置
2.1、1、将EasyPR压缩包拷贝到Ubuntu 三种方法任选一种
a)VMware tools
b)FTP工具
c)共享文件夹
2.2、解压得到EasyPR文件夹(文件夹一层进入后EasyPR资源内容)
2.3、终端命令修改权限chmod -R 777 ./ EasyPR
a)注意:只要进入Ubuntu压缩包解压之后都要做chmod -R动作修改权限
b)注意:EasyPR文件夹放入/opt文件夹下
2.4、查找EasyPR/include/easypr/config.h,使用gedit方式打开
修改#define CV_VERSION_THREE_ZERO 这个是针对OpenCV 3.0以下版本
修改成#define CV_VERSION_THREE_TWO 这个是针对OpenCV 3.0以上版本,目前使用OpenCV 3.4.2
修改后保存文档,注意查看:
2.5、在EasyPR下终端执行./build.sh 进行编译
2.6、运行检查可执行程序 demo
3、创建Qt工程修改pro文件
3.1、添加OpenCV环境配置 (之前文档配置过的)
3.2、添加EasyPR 环境配置
a)cpp文件
/opt/EasyPR/src/core/chars_identify.cpp
/opt/EasyPR/src/core/chars_recognise.cpp
/opt/EasyPR/src/core/chars_segment.cpp
/opt/EasyPR/src/core/core_func.cpp
/opt/EasyPR/src/core/feature.cpp
/opt/EasyPR/src/core/params.cpp
/opt/EasyPR/src/core/plate_detect.cpp
/opt/EasyPR/src/core/plate_judge.cpp
/opt/EasyPR/src/core/plate_locate.cpp
/opt/EasyPR/src/core/plate_recognize.cpp
/opt/EasyPR/src/train/ann_train.cpp
/opt/EasyPR/src/train/annCh_train.cpp
/opt/EasyPR/src/train/create_data.cpp
/opt/EasyPR/src/train/svm_train.cpp
/opt/EasyPR/src/train/train.cpp
/opt/EasyPR/src/util/kv.cpp
/opt/EasyPR/src/util/program_options.cpp
/opt/EasyPR/src/util/util.cpp
/opt/EasyPR/thirdparty/LBP/helper.cpp
/opt/EasyPR/thirdparty/LBP/lbp.cpp
/opt/EasyPR/thirdparty/mser/mser2.cpp
/opt/EasyPR/thirdparty/svm/corrected_svm.cpp
/opt/EasyPR/thirdparty/textDetect/erfilter.cpp
/opt/EasyPR/thirdparty/xmlParser/xmlParser.cpp
b)h、hpp文件
/opt/EasyPR/include/easypr/core/character.hpp
/opt/EasyPR/include/easypr/core/chars_identify.h
/opt/EasyPR/include/easypr/core/chars_recognise.h
/opt/EasyPR/include/easypr/core/chars_segment.h
/opt/EasyPR/include/easypr/core/core_func.h
/opt/EasyPR/include/easypr/core/feature.h
/opt/EasyPR/include/easypr/core/params.h
/opt/EasyPR/include/easypr/core/plate.hpp
/opt/EasyPR/include/easypr/core/plate_detect.h
/opt/EasyPR/include/easypr/core/plate_judge.h
/opt/EasyPR/include/easypr/core/plate_locate.h
/opt/EasyPR/include/easypr/core/plate_recognize.h
/opt/EasyPR/include/easypr/train/ann_train.h
/opt/EasyPR/include/easypr/train/annCh_train.h
/opt/EasyPR/include/easypr/train/create_data.h
/opt/EasyPR/include/easypr/train/svm_train.h
/opt/EasyPR/include/easypr/train/train.h
/opt/EasyPR/include/easypr/util/kv.h
/opt/EasyPR/include/easypr/util/program_options.h
/opt/EasyPR/include/easypr/util/switch.hpp
/opt/EasyPR/include/easypr/util/util.h
/opt/EasyPR/include/easypr/api.hpp
/opt/EasyPR/include/easypr/config.h
/opt/EasyPR/include/easypr/version.h
/opt/EasyPR/include/easypr.h
/opt/EasyPR/test/accuracy.hpp
/opt/EasyPR/test/chars.hpp
/opt/EasyPR/test/config.hpp
/opt/EasyPR/test/plate.hpp
/opt/EasyPR/test/result.hpp
/opt/EasyPR/thirdparty/LBP/helper.hpp
/opt/EasyPR/thirdparty/LBP/lbp.hpp
/opt/EasyPR/thirdparty/mser/mser2.hpp
/opt/EasyPR/thirdparty/svm/precomp.hpp
/opt/EasyPR/thirdparty/textDetect/erfilter.hpp
/opt/EasyPR/thirdparty/xmlParser/xmlParser.h
c)将model文件夹拷贝到Qt工程下(之前放置在opt文件夹下的EasyPR)
d)Pro文件中添加
INCLUDEPATH += /opt/EasyPR/include/
DISTFILES +=
model/ann_chinese.xml
model/ann.xml
model/annCh.xml
model/svm_hist.xml
e)编译会出现四个报错,每一个报错,双击打开源码文件进行修改,thirdparty头文件路径存在问题在include增加“…/…/”
正常运行可
f)影子构建目录,查看此处不能勾选以显示窗口
4、一劳永逸解决影子构建目录