14.01.2013 Views

A.R.Drone Developer Guide - Abstract

A.R.Drone Developer Guide - Abstract

A.R.Drone Developer Guide - Abstract

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

42<br />

7.1.3 Augmented reality data stream<br />

In the previously described NavData, there are informations about vision-detected tags. The<br />

goal is to permit to the host to add some functionalities, like augmented reality features. The<br />

principle is that the AR.<strong>Drone</strong> sends informations on recognized pre-defined tags, like type<br />

and position.<br />

Listing 7.2: Navdata option for vision detection<br />

typedef struct _navdata_vision_detect_t {<br />

uint16_t tag;<br />

uint16_t size;<br />

uint32_t nb_detected;<br />

uint32_t type[4];<br />

uint32_t xc[4];<br />

uint32_t yc[4];<br />

uint32_t width[4];<br />

uint32_t height[4];<br />

uint32_t dist[4];<br />

} __attribute__ ((packed)) navdata_vision_detect_t;<br />

The drone can detect up to four 2D-tags. The kind of detected tag, and which camera to use,<br />

can be set by using the configuration parameter detect_type.<br />

Let’s detail the values in this block :<br />

• nb_detected: number of detected 2D-tags.<br />

• type[i]: Type of the detected tag #i ; see the CAD_TYPE enumeration.<br />

• xc[i], yc[i]: X and Y coordinates of detected 2D-tag #i inside the picture, with (0, 0) being<br />

the top-left corner, and (1000, 1000) the right-bottom corner regardless the picture resolution<br />

or the source camera.<br />

• width[i], height[i]: Width and height of the detection bounding-box (2D-tag #i), when<br />

applicable.<br />

• dist[i]: Distance from camera to detected 2D-tag #i in centimeters, when applicable.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!