14.11.2012 Views

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

Submitted version of the thesis - Airlab, the Artificial Intelligence ...

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.

56 Chapter 5. Vision<br />

To calculate PR ball which is 3D homogeneous coordinates <strong>of</strong> <strong>the</strong> point in<br />

world, <strong>the</strong> transformation matrix camera to robot (TR C ) is used.<br />

P R ball = T R C ∗PC ball<br />

The second configuration is for <strong>the</strong> object on <strong>the</strong> ground. This case is<br />

simpler since it requires a 2 D to 2 D transformation. The transformation<br />

between camera and robot is used again and <strong>the</strong> calculation is <strong>the</strong> same as<br />

<strong>the</strong> previous configuration. The homography is defined for this case as:<br />

H = K ∗T C ⎡ ⎤<br />

1 0 0<br />

⎢<br />

⎢0<br />

1 0<br />

⎥<br />

R ∗⎢<br />

⎥<br />

⎣0<br />

0 0⎦<br />

0 0 0<br />

The third row <strong>of</strong> <strong>the</strong> matrix is all zeros since <strong>the</strong> we assume that <strong>the</strong><br />

objectisatgroundwithZ=0, hencethisreduces<strong>the</strong>mappingfrom3Dto2D.<br />

To calculate <strong>the</strong> object position Pobject, we will use <strong>the</strong> inverse homography<br />

on <strong>the</strong> image point Pimage.<br />

Pobject = H -1 ∗Pimage.<br />

Pobject is <strong>the</strong>n normalized. The resulting point is <strong>the</strong> distance <strong>of</strong> <strong>the</strong><br />

robot to <strong>the</strong> target object. This information is later used to calculate <strong>the</strong><br />

motor contributions.<br />

Among <strong>the</strong> mentioned approaches, we started with <strong>the</strong> first configuration<br />

(for <strong>the</strong> ball). The idea was to detect a ball, no matter whe<strong>the</strong>r it is<br />

on <strong>the</strong> ground or up in <strong>the</strong> air. We started by testing with a red ball, since<br />

<strong>the</strong> color red, blue, green were initially defined for <strong>the</strong> camera. The results<br />

were not sufficient to follow <strong>the</strong> ball for greater distances because <strong>of</strong> several<br />

effects. One <strong>of</strong> <strong>the</strong>m is related with <strong>the</strong> camera resolution. Normally <strong>the</strong><br />

camera can work with 160x120 resolution for <strong>the</strong> blob search. This does<br />

not cause a problem if <strong>the</strong> ball is close to <strong>the</strong> camera, but as <strong>the</strong> ball goes<br />

fur<strong>the</strong>r from <strong>the</strong> camera, <strong>the</strong> ball represented in <strong>the</strong> image is getting smaller<br />

and smaller. Due to <strong>the</strong> low-cost optics, at <strong>the</strong> worst case <strong>the</strong> ball becomes<br />

1 pixel in <strong>the</strong> picture. Using only this pixel, it is impossible to detect <strong>the</strong><br />

ball. Even though, we can recognize <strong>the</strong> ball for some cases, in most <strong>of</strong> <strong>the</strong><br />

cases we cannot. Due to <strong>the</strong> low-cost optics, it is possible to have several<br />

o<strong>the</strong>r 1 pixel size red blobs that are not our ball. In order to detect <strong>the</strong> ball,<br />

inside <strong>the</strong> blob search algorithm we need to eliminate <strong>the</strong> blobs that are not<br />

<strong>the</strong> ball we are searching.

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

Saved successfully!

Ooh no, something went wrong!