Master Thesis - Fachbereich Informatik
Master Thesis - Fachbereich Informatik
Master Thesis - Fachbereich Informatik
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4.6. MEASURING 89<br />
side of the tube, the worst-case displacement is 0.5 at one side and −0.5 at the other side<br />
leading to a total displacement of 1. A straight line connecting the two measuring points<br />
in an Euclidean plane is slightly longer than the distance in x. Following Pythagoras’<br />
theorem the maximum expectable error due to a vertical inaccuracy is:<br />
errory = � l 2 +1− l (4.18)<br />
where l is the pixel length between the left and right measuring point. With respect to<br />
the definition of the camera’s field of view and the image resolution, the length of a tube<br />
is about 415 pixels in an image. In this case, the worst-case error is about 0.0012 pixel.<br />
Assuming one pixel represents 0.12mm (a typical value for 50mm tubes) this corresponds<br />
to an acceptable error of 0.14µm which is far beyond the imaging capabilities of the camera<br />
used (each sensor element has a size of about 8.3 × 8.3µm).<br />
Other than in the vertical direction, a subpixel shift of the best matching template<br />
position in horizontal direction has a significant influence on the length measurement<br />
results. Again, assuming a maximum error of 0.5 pixels if discrete pixel grid resolution is<br />
used, the total error at both sides sums up to 1 in worst-case. If one pixel corresponds to<br />
0.12mm as in the example above, this means the measuring system has an inaccuracy of<br />
the same length purely depending on the edge localization. Obviously, this error depends<br />
on the resolution of the camera and can become even worse if one pixels represents a larger<br />
distance.<br />
The interpolation considers five discrete points: The maximum matching position Mmax<br />
and the two nearest neighbors left and right to Mmax in x-direction respectively. In<br />
Figure 4.24(b), the interpolation results of the local neighborhood around the discrete<br />
maximum of Figure 4.24(a) are drawn into the plot of the match profile at y =5. It<br />
shows the interpolated values describe the sampled values quite well. In this example, the<br />
interpolated subpixel maximum equals the discrete maximum. This does not always have<br />
to be the case as can be seen in Figure 4.24(c). Here, the discrete maximum is located at<br />
x = 12, whereas the subpixel maximum lies at x =12.2. In the first case, the neighbor<br />
pixels of the maximum yield almost equal results at both sides. On the other hand in the<br />
second example, the right neighbor of the maximum is significantly larger than the left<br />
one. This explains the shift of the subpixel maximum toward the right. The precision of<br />
the subpixel match localization is 1/10 pixel. Mathematically, much higher precision is<br />
possible,butthesignificanceofsuchresultsisquestionablewithrespecttotheimaging<br />
system and noise, and increases the computational costs unnecessary.<br />
4.6. Measuring<br />
The result of the template matching are two subpixel positions indicating the left and right<br />
measuring point of a tube. This section introduces how a pixel distance is transformed<br />
into a real world length and how the measurements of one tube are combined. Therefore,<br />
a tracking mechanism is required that assures the correct assignment of a measurement to<br />
a particular tube. This means, one has to detect when a tube enters or leaves the visual<br />
field of the camera.