Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7420953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:19:34+00:00 2026-05-29T08:19:34+00:00

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

  • 0

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()));
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:19:35+00:00Added an answer on May 29, 2026 at 8:19 am

    Adding my previous comment as an answer since it helped you solve the problem:

    I want you to replace the cvCreateCameraCapture() call for something else, like cvWaitKey(0);. If this is a runtime issue related to environment variables and Windows not finding OpenCV, this simple test will show. So, if it continues to crash then it might really be related to the environment configuration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the follow code in my program where I hit a SQLCe database
i have the follow code: searchResults.SearchResultCollection.Add( new SearchResult() { Header = HttpUtility.HtmlDecode( htmlDocument.DocumentNode .SelectSingleNode(initialXPath
I'm trying to follow code-to-interface on a project. Should I be creating an interface
Hi i am having the follow code <div id=container> <div class=element NOTME></div> <div class=element></div>
This has me stumped. The follow code returns ,,,,,,: <script type=text/javascript> $(function() { $('#listB').sortable({
I had created a zip file (together with directory) under Windows as follow (Code
I was wondering what everyone thinks of this. Is the code easy to follow?
I have the following code which reads in the follow file, append a \r\n
How is your javaScript code organized? Does it follow patterns like MVC, or something
What guidelines do you follow to improve the general quality of your code? Many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.