Hi :) Im completely new in OpenCV and Visual Studio 2010,, so as a start up testing project, I copied a sample code from here which is a basic code for loading an image
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
if( argc != 2)
{
cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
return -1;
}
Mat image;
image = imread(argv[1], CV_LOAD_IMAGE_COLOR); // Read the file
if(! image.data ) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl ;
return -1;
}
namedWindow( "Display window", CV_WINDOW_AUTOSIZE );// Create a window for display.
imshow( "Display window", image ); // Show our image inside it.
waitKey(0); // Wait for a keystroke in the window
return 0;
}
and then when i debug it, the output prints this,..
'MyNewOpenCV.exe': Loaded 'C:\Users\REgiINn\Documents\Visual Studio 2010\Projects\MyNewOpenCV\Debug\MyNewOpenCV.exe', Symbols loaded. 'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\ntdll.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\kernel32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Program Files\opencv\build\x86\vc10\bin\opencv_core246d.dll', Cannot find or open the PDB file
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Program Files\opencv\build\x86\vc10\bin\opencv_highgui246d.dll', Cannot find or open the PDB file
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\user32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\gdi32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\lpk.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\usp10.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\ole32.dll', Symbols loaded.
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\advapi32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\sechost.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Symbols loaded
(source information stripped). 'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\avifil32.dll', Symbols loaded (source information
stripped). 'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\winmm.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\msacm32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\msvfw32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\shell32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\avicap32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\version.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\imm32.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Windows\System32\msctf.dll', Symbols loaded (source information stripped).
'MyNewOpenCV.exe': Loaded 'C:\Program Files\ContinueToSave\sprotector.dll', Binary was not built with debug information.
'MyNewOpenCV.exe': Unloaded 'C:\Program Files\ContinueToSave\sprotector.dll' The program '[7228] MyNewOpenCV.exe: Native' has exited with code -1 (0xffffffff).
and it wont run.. Ive tried checking the microsoft symbol server,. but the output is the same, so I tought of rebuilding the opencv itselfe using cmake, but im using opencv version 2.4.6 and i have read that building such version is not necessary.
I dont really know whats going on here, hope anybody could help me, im using Visual Studio Ultimate in a x86 platform,