Problems in running openCV in visual studio 2010 [closed]
I usually work in openCV in linux environment. when i installed opencv based on Stack Overflow. When i run a program a blank command window opens and no action. the following errors are displayed.
'jms.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_core249d.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x1a7c) has exited with code -1073741510 (0xc000013a).
The program '[2556] jms.exe: Native' has exited with code -1073741510 (0xc000013a).
What i have to do ? The program is
#include<opencv\highgui.h>
#include<iostream>
using namespace cv;
using namespace std;
int main()
{
Mat im = imread("E:\10.jpg");
if(!im.data)
{
cout<<"Image NOT FOUND "<<endl;
return -1;
}
cout<<"Test"<<endl;
namedWindow("Image",0);
imshow("Image",im);
waitKey(10);
}
while typing the code it displays the available header files and syntax of each function as hint.
Are you getting any runtime error ? and is this cout display
Test
on that black screen ?imread("E:\\10.jpg"); // 2 backslashes in paths, please
What @berak said or keep front slashes for Windows to avoid this issue. Also your issue is actually not due to this, the erro is not printed, rather a debug warning (which can be ignored here). Your problem is that you end with a
waitKey(10)
which states that you hold the application 10 millisec and then close everything down. Change it towaitKey(0)
and you will see your window!I tried @StevenPuttemans but it no text is displayed and @berak a command window with a cursor blinking opens, then some symbols are loaded then command window closes.
Can you post that symbols ? if cout is not displaying text on command then just check cout before loop whether it work there or not
i edited the question with screen shot @FLY
sorry james, but that screenshot is not helpful at all
@jamesnzt just try cout after every line :) so you can know from where your getting error or whaeva
@FLY can you please suggest some links to install opencv with visual studio 2010.that works for you (my opencv 2.4.9 for windows, extracted file contains two folders 1. Build 2. sources)
james, also no worries, we're all getting pinged even without explicitly mentioning the names ;)