Пример #1
0
int main(int argc, char *argv[])
{
    VideoSource videoSrc;
    videoSrc.init();

    QApplication a(argc, argv);
    CameraWindow w;
    w.show();

    CannyFilter cannyFilter;
    cannyFilter.setLowThreshold(50);
    cannyFilter.setHighThreshold(100);
    TextDetectElement textDetect;

    QObject::connect(&videoSrc, SIGNAL(pushRawFrame(Mat&)), &cannyFilter, SLOT(onPushRawFrame(Mat&)));
    QObject::connect(&videoSrc, SIGNAL(pushRawFrame(Mat&)), &textDetect, SLOT(onPushRawFrame(Mat&)));
    QObject::connect(&cannyFilter, SIGNAL(pushEdgeImage(Mat&)), &textDetect, SLOT(onPushEdgeImage(Mat&)));
    QObject::connect(&textDetect, SIGNAL(pushResultImage(Mat&)), &w, SLOT(onPushImage(Mat&)));

//    videoSrc.addPushListener(cannyFilter);
//    cannyFilter.addPushListener(textDetect);
//    textDetect.addPushListener(w);

    videoSrc.start();

    return a.exec();
}
Пример #2
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    CameraWindow w;
    w.show();
    
    return a.exec();
}
Пример #3
0
int main(int argc, char *argv[]) {
    QApplication app(argc, argv);

    CameraWindow *mainWin = new CameraWindow();
    mainWin->setWindowTitle(appName + appVersion);
    mainWin->show();

    return app.exec();
}