Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Abnormal termination when using OpenCV's function
Forum Updated to NodeBB v4.3 + New Features

Abnormal termination when using OpenCV's function

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tujw2010
    wrote on last edited by
    #1

    My code as follow. When I execute cvCreateCameraCapture(-1) in openCamera, the app ends.

    TIP: Abnormal program termination. during startup program exited with code 0X000135

    Why? The computer is notebook, and inner-Camera.

    @int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    return a.exec();
    }@

    @#include<highgui.h>
    #include<cv.h>

    class MainWindow : public QMainWindow
    {
    Q_OBJECT
    public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    private slots:
    void openCamera();
    void readFrame();
    void closeCamera();
    void takingPhote();

    private:
    Ui::MainWindow ui;
    QTimer
    timer;
    QImage* image;
    CvCapture* cam;
    IplImage* frame;
    };

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    cam = NULL;
    timer = new QTimer(this);
    image = new QImage;

    connect(ui->openCamera, SIGNAL(clicked()), this, SLOT(openCamera()));
    

    }

    void MainWindow::openCamera()
    {
    cam = cvCreateCameraCapture(-1);
    // timer->start(33);
    // connect(timer, SIGNAL(timeout()), this, SLOT(readFrame()));
    }@

    Thank you....

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved