need some basic openCV help (C++)

Soldato
Joined
15 Feb 2011
Posts
10,234
Location
Slough
After trying and failing to install it the 'complicated' way (making the libraries myself from the source code) I eventually gave up and installed it with the precompiled libraries. (this isn't the problem but it might have some bering on it so i figured i'd let you know).

I have followed the instructions to get openCV up and running in visual studios 2010 express and i am now trying to get the sample code at the bottom of the page running.

When i try to build it with the sample code as is, it will give me the error: cannot open include file 'opencv2/imgproc/imgproc.hpp'

When i change the paths in the "#include" lines to the full path imgproc seems to work but I get the same error with core instead. ie: cannot open include file 'opencv2/core/core.hpp'

I know the paths are correct because I've physically checked them about a million times now. I've even tried changing the slashes from forwards to backwards since win7 seems to think they are backslashes when i copy the full path as text and the sample code thinks i should use forward slashes

Any suggestions would be much appreciated because I've tried various solutions from people on the internet with exactly the same problem and nothing seems to work.
 
Soldato
OP
Joined
15 Feb 2011
Posts
10,234
Location
Slough
Thank you for the help guys, it has definitely pointed me in the right direction. After digging around for a bit it looks like even the written guide to get things working with VS is out of date. I noticed that it was using libraries ending with 231 rather than 236 that I have, although even fixing that hasn't solved my problem.

I think the main problem is that they have messed about with the file structure compared to the version in the tutorial (or they haven't told me to mess about with the file structure at some point). For example, after plugging "setx -m OPENCV_DIR C:\openCV\build\x86\vc10" into the command prompt it says that I should have an include directory in that folder when i do not. i do however have an include folder with all the relevant files and folders in "C:\openCV\build"

Unfortunately that is about as far as I have got, so if any of you have any ideas on how to fix this then i would be all ears.
 
Back
Top Bottom