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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
54 Chapter 5. Vision<br />
Figure 5.2: Perspective projection in a pinhole camera<br />
means <strong>the</strong> object can be represented by a X,Y,Z position in <strong>the</strong> world coordinate<br />
system, with Z=0. This reduces <strong>the</strong> transformation into a 2D-2D<br />
transformation, and needs a new H matrix.<br />
We need to calculate <strong>the</strong> transformation matrix between <strong>the</strong> robot and<br />
) coordinates. The transformation matrix between world frame<br />
camera (TR C<br />
andcamera(T C W )coordinatesisknownfrom<strong>the</strong>externalcameraparameters.<br />
The world frame to robot frame transformation matrix TR W is calculated by<br />
<strong>the</strong> target object position and robot center (shown in Figure 5.3). TR C is<br />
derived as follows:<br />
T R C = TR W ∗TW C<br />
For <strong>the</strong> ball localization case, <strong>the</strong> calculation is made for <strong>the</strong> pixel diameter<br />
Dpx <strong>of</strong> <strong>the</strong> ball at known distance l and <strong>the</strong> real diameter Dball. For <strong>the</strong><br />
camera, we introduced a parameter f ∗ , to indicate <strong>the</strong> dimension <strong>of</strong> a unit<br />
pixel, which is a statical parameter <strong>of</strong> <strong>the</strong> camera. Using this information,<br />
<strong>the</strong> distance <strong>of</strong> <strong>the</strong> ball lnew can be calculated by counting <strong>the</strong> pixels <strong>of</strong> <strong>the</strong><br />
diameter <strong>of</strong> <strong>the</strong> ball Dpx and by multiplying this by f ∗ .<br />
f ∗ = l<br />
∗Dpx<br />
Dball<br />
lnew = f∗<br />
∗Dball<br />
Dpx<br />
The next step is converting <strong>the</strong> direction from camera to <strong>the</strong> ball −−−→<br />
d c ball