Ask Your Question
0

Error: Unhandled Exception VS2013

asked 2014-09-10 22:21:52 -0600

antix gravatar image

Hello,

I have installed Visual Studio 2013 and opnecv 2.4.9 version and i tried to run a very simple program i took from a blog. But the program breaks after this error:

Unhandled exception at 0x75EB812F in proj.exe: Microsoft C++ exception: cv::Exception at memory location 0x0019F918.

The code is as follows:

image description

I read all similar questions asked based on this 'unhandled exception' error, but all of those are specific to that program. I am a novice in opencv, so please guide me.

Thank you!!! Any help is greatly appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-09-12 06:03:40 -0600

[before]

Mat img = imread("MyPic.JPG");

[after]

Mat img = imread("MyPic.JPG");
if(img.empty())
{
    cerr << "Cannot read image file" << endl;
    return -1;
}

Could you try to change your code? If the error message("Cannot read image file") appears, imread() failed.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-09-10 22:21:52 -0600

Seen: 1,639 times

Last updated: Sep 12 '14