Updated by Kirill Kornyakov over 12 years ago

version from site and the latest version from git have both this bug
The IDE is VS 2012.

<pre>
#include
@#include "stdafx.h"
#include "vader.h"
using namespace cv;
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPTSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
cv::String winName("cameraImage");
namedWindow(winName,CV_WINDOW_AUTOSIZE);
/*
1 window name is not the same as in code, it contains of mojibake (крякозябры) (debug configuration, in release it in most cases looks right but the string which contains its name is constantly changing)
2 some of the following function calls causes crash
*/
cvWaitKey(0);
Mat img=imread("darthvader.png");
double fps=30;
int key=0;
UINT delay=1000/fps;
while (key = cvWaitKey(delay)){
imshow(winName,img);
if (key == VK_ESCAPE) break;
}
cvDestroyAllWindows();
return 0;
} }@
</pre> version from site and the latest version from git have both this bug
The IDE is VS 2012.

Back