User Tools

Site Tools


ardrone_tag_recognition

This is an old revision of the document!


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 :

<pre> roscd ar_recog </pre>

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:

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

=Print out a tag= We obviously need an image tag before we test the code. <br>Step 1:Go to the folder of the package “ar_recog” <br>Step 2:open up the file “Ar_patts.zip”. <br>Step 3:Print out your desired image tag.

=Test the code= 1. Enter the following commands each in a new terminal.

<pre> roscore rosrun gscam gscam </pre>

2.Open up a new terminal and enter the lines one after the other : <pre> roscd ar_recog cmake . rosmake </pre>

Make sure you get 0 failures for rosmake.

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

Enter the following commands each in a new terminal: <pre> rosrun image_view image_view image:=/gscam/image_raw rosrun image_view image_view image:=/ar/image </pre>

=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. <br>

200px|ar_recog

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

200px|ar_recog

200px|ar_recog

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

<pre> rostopic echo /tags </pre>

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

ardrone_tag_recognition.1478023305.txt.gz · Last modified: 2016/11/01 11:01 by dwallace