liuruoze / EasyPR

(CGCSTCD'2017) An easy, flexible, and accurate plate recognition project for Chinese licenses in unconstrained situations. CGCSTCD = China Graduate Contest on Smart-city Technology and Creative Design
Apache License 2.0
6.36k stars 2.51k forks source link

运行错误:“...error while loading shared libraries: libopencv_core.so.3.4...” #288

Open HuixiangLiu opened 6 years ago

HuixiangLiu commented 6 years ago

环境:Ubuntu 14.04 + OpenCV 3.4.1 + QT 问题:EasyPR安装,命令模式下运行Demo都没问题,在QT环境中 测试代码如下: int main(void) { // QCoreApplication a(argc, argv); // return a.exec(); CPlateRecognize pr; pr.setResultShow(false); pr.setDetectType(PR_DETECT_CMSER);

    vector<CPlate> plateVec;
    Mat src = imread("/home/liu/EasyPR-master/result.jpg");
    int result = pr.plateRecognize(src, plateVec);

}

Debug 时 没有错误,但出现很多警告,弹出窗口显示: /home/liu/code/build-EasyPR-Desktop-Debug/EasyPR: error while loading shared libraries: libopencv_core.so.3.4: cannot open shared object file: No such file or directory Press to close this window...

请问各位大神,不知这个错误跟哪个文件有关,如何修改? 我的.Pro 如下:

-------------------------------------------------

#

Project created by QtCreator 2018-07-03T15:26:40

#

-------------------------------------------------

QT += core

QT -= gui

TARGET = EasyPR CONFIG += console CONFIG -= app_bundle CONFIG += c++11

TEMPLATE = app

SOURCES += main.cpp \ EasyPR-Lib/src/core/chars_identify.cpp \ EasyPR-Lib/src/core/chars_recognise.cpp \ EasyPR-Lib/src/core/chars_segment.cpp \ EasyPR-Lib/src/core/core_func.cpp \ EasyPR-Lib/src/core/feature.cpp \ EasyPR-Lib/src/core/params.cpp \ EasyPR-Lib/src/core/plate_detect.cpp \ EasyPR-Lib/src/core/plate_judge.cpp \ EasyPR-Lib/src/core/plate_locate.cpp \ EasyPR-Lib/src/core/plate_recognize.cpp \ EasyPR-Lib/src/train/annCh_train.cpp \ EasyPR-Lib/src/train/ann_train.cpp \ EasyPR-Lib/src/train/create_data.cpp \ EasyPR-Lib/src/train/svm_train.cpp \ EasyPR-Lib/src/train/train.cpp \ EasyPR-Lib/src/util/kv.cpp \ EasyPR-Lib/src/util/program_options.cpp \ EasyPR-Lib/src/util/util.cpp \ EasyPR-Lib/thirdparty/LBP/helper.cpp \ EasyPR-Lib/thirdparty/LBP/lbp.cpp \ EasyPR-Lib/thirdparty/mser/mser2.cpp \ EasyPR-Lib/thirdparty/svm/corrected_svm.cpp \ EasyPR-Lib/thirdparty/textDetect/erfilter.cpp \ EasyPR-Lib/thirdparty/xmlParser/xmlParser.cpp

INCLUDEPATH += /usr/local/include \ /usr/local/include/opencv \ /usr/local/include/opencv2 \ /home/liu/code/EasyPR/EasyPR-Lib/include \ /home/liu/code/EasyPR/EasyPR-Lib/include/easypr \ /home/liu/code/EasyPR/EasyPR-Lib \ /home/liu/code/EasyPR/EasyPR-Lib/test

LIBS += /usr/local/lib/x86_64-linux-gnu/libopencv_core.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_highgui.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_imgproc.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_objdetect.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_face.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_ml.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_shape.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_text.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_video.so.3.4.1 \ /usr/local/lib/x86_64-linux-gnu/libopencv_core.so.3.4

HEADERS += \ EasyPR-Lib/thirdparty/LBP/helper.hpp \ EasyPR-Lib/thirdparty/LBP/lbp.hpp \ EasyPR-Lib/thirdparty/mser/mser2.hpp \ EasyPR-Lib/thirdparty/svm/precomp.hpp \ EasyPR-Lib/thirdparty/textDetect/erfilter.hpp \ EasyPR-Lib/thirdparty/xmlParser/xmlParser.h \ EasyPR-Lib/include/easypr/core/character.hpp \ EasyPR-Lib/include/easypr/core/chars_identify.h \ EasyPR-Lib/include/easypr/core/chars_recognise.h \ EasyPR-Lib/include/easypr/core/chars_segment.h \ EasyPR-Lib/include/easypr/core/core_func.h \ EasyPR-Lib/include/easypr/core/feature.h \ EasyPR-Lib/include/easypr/core/params.h \ EasyPR-Lib/include/easypr/core/plate.hpp \ EasyPR-Lib/include/easypr/core/plate_detect.h \ EasyPR-Lib/include/easypr/core/plate_judge.h \ EasyPR-Lib/include/easypr/core/plate_locate.h \ EasyPR-Lib/include/easypr/core/plate_recognize.h \ EasyPR-Lib/include/easypr/train/annCh_train.h \ EasyPR-Lib/include/easypr/train/ann_train.h \ EasyPR-Lib/include/easypr/train/create_data.h \ EasyPR-Lib/include/easypr/train/svm_train.h \ EasyPR-Lib/include/easypr/train/train.h \ EasyPR-Lib/include/easypr/util/kv.h \ EasyPR-Lib/include/easypr/util/program_options.h \ EasyPR-Lib/include/easypr/util/switch.hpp \ EasyPR-Lib/include/easypr/util/util.h \ EasyPR-Lib/include/easypr/api.hpp \ EasyPR-Lib/include/easypr/config.h \ EasyPR-Lib/include/easypr/version.h \ EasyPR-Lib/include/easypr.h

OTHER_FILES += \ EasyPR-Lib/thirdparty/xmlParser/AFPL-license.txt