7/1/12

OpenCV, VC++2010, Kinect, OpenNI

OpenCV, VC++2010, Kinect, OpenNI

How to install OpenCV with VC++2010 express.

1. Download & Install VC++2010
3. Reboot
4. Create Hello-World CLR program and run (test)

5. Download OpenCV 2.1 (2.2 has a webcam bug?)
6. Download TBB (the oss version)
7. Unzip TBB to OpenCV Directory
8. Install and Run CMake (point to OpenCV directory)
9. Make sure you point the TBB Lib directory to /lib/{type}/{vc++ ver}
10. Generate and Build

11. Copy over everything in OpenCV2.1/build/lib/{Debug,Release} to OpenCV2.1/lib
12. Copy over everything in OpenCV2.1/build/bin/{Debug,Release} to OpenCV2.1/bin

13. Run HelloWorld Test!

--
Note:
If you get "**.dll" not found or "Native' has exited with code -1072365566 (0xc0150002)"
This means that you are using DLLs that were compile for another VC Redistributable (AKA, if you don't have the VC++2008 Redist/IDE installed your program wont run with those dlls)

This is some interlope problem with compiling the dlls with 2008 and your new program compiling against 2010.

This is solved by Rebuilding OpenCV using the VC++ version you intend to use. (VC10) If you update your WinSDK and you compile using the new platform, you need to recompile OpenCV against that.

You can tell what platform your are compiling for in
-> Project Property Page -> Configuration Properties -> General -> Platform Toolset
Make sure if you are using VC++2010, that you compile OpenCV against VC++2010.


------------- Kinect & OpenNI --------------

Follow this guide here:

Also a interesting idea:

Now I have Kinect, OpenCV, VC++2010 all ready! let the hacking begin.

Bài đăng phổ biến