Visual Studio 2012 and OpenCV 2.4.9 [closed]
I have some questions about installing all this stuff. I tried to do it but I have questions. I also have links to images to make things easier for comments.
I'm using Visual Studio 2012 Ultimate with OpenCV 2.4.9.
Step 1: I downloaded the .exe and ran it. I created a folder called OpenCV2.4. Question 1: Do I still need to use CMAKE here?
Step2: I tried to do this without CMAKE, and I was able to create a project but I have questions.
Question 2: Do I still need to add a system path?
Question 3: We should be using the build directory not the source, right?
Question 4: I'm creating the properties sheet but what has the Libraries been renamed to? Edit: I think I have to go in Build/x86/select(edit: changed to x86) and select the version of my visual studio and then the lib folder?
I'm working on this now...I may edit this later.
most probably not. (though the supplied libs are kinda bare-metal. if you want cuda/ocl/tbb/whatever support, you will have to recompile using cmake
yes, for sure.
for the include path, yes.
I'm really close to getting this running. Let me list my steps so I can make sure everyone who wants to comment can get an idea of what I'm dealing with
screenshot: http://1drv.ms/1qfNaYo
You need to modify the PATH environment variable to point to the directory that contains the DLLs. You are almost there.
This is so weird. The system can't find it but when I go to the bin folder I can see it.
So here's what I've done. I edited the environment/system variable and put this in.
OpenCV2.4_DIR (My OpenCV folder name is OpenCV2.4)
C:\OpenCV2.4\opencv\build\x86\vc11\bin
This should work, right? Maybe I need to reboot my machine.
I have to edit the "Path" Variable. Thanks.
Now I'm getting some kind of Access violation.
Here's the details from the output window:
'ConsoleApplication1.exe' (Win32): Loaded 'C:\Users\gcarlisle\Desktop\OpenCV\OpenCVProjects\ConsoleApplication1\Debug\ConsoleApplication1.exe'. Symbols loaded. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:\OpenCV2.4\opencv\build\x86\vc11\bin\opencv_core249d.dll'. Cannot find or open the PDB file. 'ConsoleApplication1.exe' (Win32): Loaded 'C:
Here's the link to the image, http://1drv.ms/1oSYlVz
Here's the link to my text file with my full output, http://1drv.ms/1oSYJUd
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, fi le C:\buildslave64\win64_amdocl\2_4_PackSlave-win32-vc11-shared\opencv\modules\h ighgui\src\window.cpp, line 261
This is my final error message, I don't get breaks in my code now. It compiles but exits: The text file is here, http://1drv.ms/1uJXO0t
I think my issue is PDB files.
Try recompiling the code (Rebuild Solution). Also make sure that the code is being compiled in 32-bit mode (x86) since that is what you have in your
PATH
variable.