In this blog I write all the activities I do, which are mainly in the embedded electronics and robotics field. I also share here my political opinions and my experiences in life

mardi 14 février 2012

Blob detection with Aforge.net to control a servo through an arduino mega

Hello,
I've already tested openCV and found a little difficulties to integrate it in a windows form application, although openCV is a great library it's still lack of this characteristic, well I found another magnificent library not so powerful as openCV but can be easily integrated in a c#.net application, it's Aforge.net

It's much easier to learn this framework if you already have knowledge of image processing.
..So I create this application that reads the images from a cheap web cam and look for a specific color in the image get some values from it(x,y,widht) to control a servo via an arduino mega ADK.

To find the object I used blob detection after filter the image with HSLfilter and the convert it to gray scale so I can use the blob detection algorithm which works only with Binary or gray images.

after that I send the X values of the object through serial to an arduino, where I map it to control a servo angle.