User Tools

Site Tools


ardrone_tag_recognition

Tag Recognition Using Webcam

Introduction

We will learn to do tag recognition using your web-cam. Before we continue any further lets make sure you have the necessary package. Open up a terminal and enter :

roscd ar_recog

This should take you to the folder of the package “ar_recog”. If you don't have the package please download it from the brown repository. Open up a terminal and enter the following line:

svn checkout http://brown-ros-pkg.googlecode.com/svn/trunk/brown-ros-pkg-read-only

We obviously need an image tag before we test the code.

Step 1:Go to the folder of the package “ar_recog” Step 2:open up the file “Ar_patts.zip”. Step 3:Print out your desired image tag.

Test the code

1. Enter the following commands each in a new terminal.

roscore
rosrun gscam gscam

2.Open up a new terminal and enter the lines one after the other :

roscd ar_recog
cmake .
rosmake

Make sure you get 0 failures for rosmake.

cd bin
rosparam set aov .67
rosrun ar_recog ar_recog image:=/gscam/image_raw

Enter the following commands each in a new terminal:

rosrun image_view image_view image:=/gscam/image_raw
rosrun image_view image_view image:=/ar/image

Testing the image tag

Considering the fact that you have a printed image tag. Hold it in-front of the camera in such a way that your fingers don't touch the surface of the tag. I pasted the tag on to the surface of a box lid.

imagetag.jpg

When you test with the image tag you should see a green line outlining the image tag.



Getting the coordinates

To have a deeper insight of the image tag being recognized open up a terminal and enter:

rostopic echo  /tags

This shows you the movement of image tag along the x,y,z axes.

ardrone_tag_recognition.txt · Last modified: 2016/11/06 02:18 by dwallace