C:/Users/Michael/Desktop/trunk/program/demo/runfollowball.h File Reference

Following balls using the camera. More...


Functions

void run_follow_ball (void)
 The "main" function to follow all the balls.
void run_follow_ball_green (void)
 The "main" function to follow the green ball.
void run_follow_ball_red (void)
 The "main" function to follow the red ball.


Detailed Description

Following balls using the camera.

Introduction

This demo show you how you can drive the camera to make vision based algorithmes. This programm uses the camera to follow balls. There are three differents configurations:

How it works

The goal of this programm is to search a ball, when one is found the e-puck has to go in it direction and has to stop at a specified distance. This is done by the following steps:

The graphe of the array when a ball is detected

pic.gif

Playing the follower

When we want to follow all the balls, the camera is used in gray scale mode.
When we want to follow the green ball for exemple, the camera is used in color mode. In color mode, we have three values: 1 for the red, 1 one for the green, 1 for the blue. Then to follow the green ball we only have to take the red constituent, because the value of green in the red constituent is near zero => it makes a pic in the array.
When we want to follow the red ball, it's the same principle: we take the green constituent,...

Playing the demo

The programm works with the contrast of the color between the ball and the environement, so to have the best result you should place the e-puck in an arena which has white wall and good luminosity.
To play the demo select the configuration you want (follow all, green, red balls) and let's go. The e-puck will turn on himself until he finds a ball.

Video of the demo

Author:
Jonathan Besuchet

Generated on Fri Feb 29 14:27:42 2008 for Demo by  doxygen 1.5.4