美文网首页
QT openCV入门

QT openCV入门

作者: dyg540 | 来源:发表于2018-04-03 14:44 被阅读0次

    工程配置:

    INCLUDEPATH +=D:\opencv\build\include

    LIBS+=-LD:\opencv\build\x64\vc12\lib
    -lopencv_calib3d249d
    -lopencv_contrib249d
    -lopencv_core249d
    -lopencv_features2d249d
    -lopencv_flann249d
    -lopencv_gpu249d
    -lopencv_highgui249d
    -lopencv_imgproc249d
    -lopencv_legacy249d
    -lopencv_ml249d
    -lopencv_nonfree249d
    -lopencv_objdetect249d
    -lopencv_ocl249d
    -lopencv_photo249d
    -lopencv_stitching249d
    -lopencv_superres249d
    -lopencv_ts249d
    -lopencv_video249d
    -lopencv_videostab249d

    debug配置:


    debug.png

    代码:

    include <QCoreApplication>

    include <iostream>

    include <opencv2/opencv.hpp>

    using namespace std;
    using namespace cv;

    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);

    QMessageLogger *logger=new QMessageLogger;
    logger->info("this is a test");
    logger->info(CV_VERSION);
    
    Mat image = imread("D:\\cctv.jpg");
    cvNamedWindow("window", CV_WINDOW_NORMAL);
    imshow("window",image);
    
    cv::waitKey(5000);
    return a.exec();
    

    }

    相关文章

      网友评论

          本文标题:QT openCV入门

          本文链接:https://www.haomeiwen.com/subject/igaqhftx.html