Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

lkdemo.cpp will not run in OpenCV 3.0

I am able to build lkdemo.cpp in the samples folder of OpenCV 3.0. When I run the code, it displays the video from the webcam, but will not allow me to click and errors out with the following:

"Unhandled exception at 0x521ac3d2 in test.exe: 0xC0000005: Access violation reading location 0x00000000."

The code is stock. it stops at the following location: if( addRemovePt && points[1].size() < (size_t)MAX_COUNT ) { vector<point2f> tmp; tmp.push_back(point); -----> cornerSubPix( gray, tmp, winSize, Size(-1,-1), termcrit); points[1].push_back(tmp[0]); addRemovePt = false; }

Again stock code, I can see the video, but cannot click to put the dot on the screen. I also cannot auto-initialize.

I get the following when auto initializing: Unhandled exception at 0x5552df22 (msvcr110.dll) in test.exe: 0xC0000005: Access violation writing location 0x00000000.

Can Someone Please help me get this problem fixed?