OpenCV类和函数不起作用

时间:2013-10-02 11:10:46

标签: qt opencv

我正在尝试运行我的应用程序Qt + OpenCV,但是当我使用类或函数时,opencv应用程序无法运行,返回错误:

这是头文件:

MyQLabel *myQLabelFrameUmHSV ;
     MyQLabel *myQLabelFrameDoisHSV ;
     MyQLabel *myQLabelFrameTresHSV ;
     MyQLabel *myQLabelFrameQuatroHSV ;

    cv :: Mat matFrameConv ;

    cv :: Mat matFrameUmHSV ;
    cv :: Mat matFrameDoisHSV ;
    cv :: Mat matFrameTresHSV ;
    cv :: Mat matFrameQuatroHSV ;

    QImage imageFrameUmHSV ;
    QImage imageFrameDoisHSV ;
    QImage imageFrameTresHSV ;
    QImage imageFrameQuatroHSV ;

    cv :: VideoCapture cap ;

    QImage * toQImage ( cv :: Mat matImage ) ;
    / / void TimerEvent ( QTimerEvent * t ) ;
    doFindClicle void ();

退出,代码为-1073741511

但是,如果我将类声明为指针,则应用程序运行(但是,我没有实例化指针,只是声明,但不使用,否则,应用程序不会再次运行。)

 MyQLabel* myQLabelFrameUmHSV ;
     MyQLabel* myQLabelFrameDoisHSV ;
     MyQLabel* myQLabelFrameTresHSV ;
     MyQLabel* myQLabelFrameQuatroHSV ;

    cv :: Mat * matFrameConv ;

    cv :: Mat * matFrameUmHSV ;
    cv :: Mat * matFrameDoisHSV ;
    cv :: Mat * matFrameTresHSV ;
    cv :: Mat * matFrameQuatroHSV ;

    QImage imageFrameUmHSV ;
    QImage imageFrameDoisHSV ;
    QImage imageFrameTresHSV ;
    QImage imageFrameQuatroHSV ;

    cv :: VideoCapture * cap ;

    QImage * toQImage ( cv :: Mat * matImage ) ;
    / / void TimerEvent ( QTimerEvent * t ) ;
    doFindClicle void ();

的。亲

QT + = core gui

greaterThan ( QT_MAJOR_VERSION , 4 ) : QT + = widgets

TARGET = Projeto_FPGA
TEMPLATE = app

IncludePath + = D : \ opencv \ build \ include
LIBS + = - LD : \ opencv \ build \ x86 \ mingw \ lib \
            llibopencv_core246 - \
            llibopencv_highgui246 - \
            - llibopencv_imgproc246

SOURCES + = main.cpp \
        mainwindow.cpp \
    myqlabel.cpp

Mainwindow.h HEADERS + = \
    myqlabel.h

FORMS + = mainwindow.ui

RESOURCES + = \
    Icons.qrc

(Qt 5.0.2 MinGW 32 bit)和(OpenCV 2:46)

我已经感谢了

0 个答案:

没有答案