In a previous post I explained how to add a simulated stereo camera to your simulated robot. OK! Having a stereo camera is fun... but, process the images and getting some interesting results is even funnier!!
Now, you could implement several Computer Vision techniques by yourself or take advantage of existing libraries.
For that matter, one of the most used libraries for computer vision is OpenCV. There is only a small problem... OpenCV is intended to be used under C/C++ and Microsoft Robotics Developer Studio is programmed in C#.
The solution to that problem is called EmguCV. Emgu CV is a cross platform .Net wrapper to the Intel OpenCV image processing library. Allowing OpenCV functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython etc. The wrapper can be compiled in Mono and run on Linux / Mac OS X.
In order to use it in your MRDS projects you should:
1. Install EmguCV
2. Add a reference to Emgu.CV and Emgu.Util to your project in Visual Studio.
3. Add the needed "using" statements at the beginning of your source code
using Emgu.CV; using Emgu.Util;
And that is it. Now you can use all the functionality of OpenCV in your robots (real or simulated).