Wednesday, December 29, 2010

5

MICROSOFT ROBOTICS DEVELOPER STUDIO + OPENCV

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 EmguCVEmgu 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).

5 comments:

Anonymous said...

dear mr. martin,
i would like to ask about mrds and emgu cv. untill now, i really confuse about both software. could u share more detail about that?

cause i have project to make robot using lego and computer vision. i dont understand, how to combine both of them. :(

i hope u can share informatio about that. thanks

Anonymous said...

dear mr. martin,
i would like to ask about mrds and emgu cv. untill now, i really confuse about both software. could u share more detail about that?

cause i have project to make robot using lego and computer vision. i dont understand, how to combine both of them. :(

i hope u can share informatio about that. thanks

Martin Peris said...

Hi there!

Thank you very much for your comment, Sorry for taking so long to reply, I have been quite busy for the last two weeks.

Regarding your question I would be very glad to help you, but what is exactly what you don't understand?

I don't know if you have some experience with MRDS or OpenCV, but maybe you could start by taking a look at the book: "Professional Microsoft Robotics Developer Studio" by Kyle Johns and Trevor Taylor, and also the book "Learning OpenCV"

Both books come with plenty of examples that could be useful to clarify your doubts.

Best regards.
Martin

Andi said...

hi mr.martin...
long time no visit your blog,I've read the book you mentioned above...
it is about proMRDS, i try c# code, but can't run cause some error...

i know how using vpl, but still not understand to use emgu. so, my project is simple like detect object and make a robot move when the robot see it. Now, which I still do not understand is to use these emgu under MRDS. Are you able to give way step by step?

cause i still newbie. i hope u can answer it to my email andrian.puspita@gmail.com

thanks a lot

emrezengin said...

Hello i need a same thing with Andi...Could you help me please?

I can create a simulation environment with Simfollow.manifest.xml however robot does not move.Main point is i do not understand how emgucv or opencv integrated to mrds.

Thank you for your attention
emrezengin.mail@gmail.com

Post a Comment