why CMake!

asked 2013-09-25 06:33:43 -0500

HDolat gravatar image

updated 2013-09-25 08:34:19 -0500

Moster gravatar image

Hi I downloaded the OpenCV 2.4.6, extracted in C:\openCV246. I want to use visual studio 2012. using the tutorial in the youtube link : http://youtu.be/cgo0UitHfp8

first I am really confused, when I can call libraries after extraction of opencv.exe file why should I suffer to build the opencv using cmake?!

then I added several libraries as instructed in the tutorial to simply capture video from my laptop camera.


using namespace cv;

int main()
    Mat img;
    VideoCapture cap;

    return 0;

but when it reaches the imshow("window", img); it returns an unhandled exception which I don't understand!

I appreciate any help to figure out these. regards

edit retag flag offensive close merge delete


There is ready Visual Studio project in OpenCV Windows Pack. You can use it. Please add exception message to your question.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-09-26 01:54:16 -0500 )edit

the exception text is: Unhandled exception at 0x7592812f in consoletest.exe: Microsoft C++ exception: cv::Exception at memory location 0x0035fa5c..

I also checked the assembly file but got nothing

HDolat gravatar imageHDolat ( 2013-09-27 23:15:35 -0500 )edit