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

  • SEARCH
  • Home
  • 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 746995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:09:17+00:00 2026-05-14T14:09:17+00:00

I have installed VS2008 and am able to run the demo codes camshiftdemo and

  • 0

I have installed VS2008 and am able to run the demo codes “camshiftdemo and lkdemo ” which comes in the opencv library. With this done, now I am trying to run some simple codes from the internet to get acquainted with the OpenCV. I am just trying to display video from webcam and I am getting the following error..

Error I am getting is :

Unhandled exception at 0x5e7e3d10
(highgui200.dll) in opencv.exe:
0xC0000005: Access violation reading
location 0x719b3856.

The code I am trying to run is :

#include <cv.h>
#include <highgui.h>
void main(int argc,char *argv[])
{
    int c;
    IplImage* color_img;
    CvCapture* cv_cap = cvCaptureFromCAM(-1); // -1 = only one cam or doesn't matter
    cvNamedWindow("Video",1); // create window
    for(;;) {
        color_img = cvQueryFrame(cv_cap); // get frame
        if(color_img != 0)
            cvShowImage("Video", color_img); // show frame
        c = cvWaitKey(10); // wait 10 ms or for key stroke
        if(c == 27)
            break; // if ESC, break and quit
    }
    /* clean up */
    cvReleaseCapture( &cv_cap );
    cvDestroyWindow("Video");
}

Any help in this will be greatly appreciated.

  • 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-14T14:09:17+00:00Added an answer on May 14, 2026 at 2:09 pm

    The following code compiles and works for me in VS2008 using OpenCV 2.1

    #include <cv.h>
    #include <highgui.h>
    void main(int argc,char *argv[])
    {
        int c;
        IplImage* color_img;
        CvCapture* cv_cap = cvCaptureFromCAM(0);
        cvNamedWindow("Video",0); // create window
        for(;;) {
            color_img = cvQueryFrame(cv_cap); // get frame
            if(color_img != 0)
                cvShowImage("Video", color_img); // show frame
            c = cvWaitKey(10); // wait 10 ms or for key stroke
            if(c == 27)
                break; // if ESC, break and quit
        }
        /* clean up */
        cvReleaseCapture( &cv_cap );
        cvDestroyWindow("Video");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just installed VS2008 and have run into a problem that I'm sure can
i have installed SharePoint 2007 and VS2008 extension on my computer.i have created a
I have several wdprojects (web deployment 2008) in vs2008 solutions. When I installed vs2010
I have built a web setup project in VS2008 which installs my ASP.NET/Silverlight app
I have a Setup project (MSI) in VS2008 which installs my project. Within the
I've done some recovery activities with my computer. Now, I've re-installed VS2008 professional edition.
I have a VPS and I would like to be able to run ASP.NET
Today I had to reinstall. I used to have some hotfixes installed for VS2008
I have VS2008 and VS2010 installed on my machine. Both works fine when there
I have VS2008 with .net 3.5 SP1 installed on my machine, I have written

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.