01.12.2012 Views

Master Thesis - Fachbereich Informatik

Master Thesis - Fachbereich Informatik

Master Thesis - Fachbereich Informatik

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.

4.5. MEASURING POINT DETECTION 87<br />

where ψmax and ψmin indicate the overall maximum and minimum curvature a template<br />

can have. Hence, one has to compute Nψ,total × k templates for each side. This can be<br />

done in a preprocessing step to reduce the computational load. During inspection one has<br />

to determine which templates have to be checked at a given position defined by the center<br />

of the local ROI around a predicted tube edge. For an efficient implementation a look up<br />

table (LUT) is used for this task.<br />

4.5.4. Subpixel Accuracy<br />

The maximum accuracy of the template based edge localization so far is limited by the<br />

discrete pixel grid. The templates are shifted pixelwise within the local ROIs to find the<br />

position that reaches the maximum correlation score. Following the assumptions of tubes<br />

under perspective (see Section 4.2.3) the measuring is performed between the most outer<br />

points of the convex tube edges.<br />

The way the templates are defined the template center corresponds always to the most<br />

outer point of the generated ridge. This is consistent to template rotation, since the<br />

rotation is performed around the template center. In the special case that the template is<br />

not curved, the template center is still the valid measuring point. With the knowledge of<br />

this point within the template and the position where this template matches best in the<br />

underlying image, the position of the measuring point in the image can be easily computed.<br />

However, pixel grid resolution is not accurate enough in this application. For example<br />

one pixels represents about 0.12mm in the measuring plane ΠM in a typical setup for<br />

50mm tubes. The allowed tolerance for 50mm tubes is ±0.7mm. As a rule of thumb for<br />

reliable results, the measuring system should be as accurate as 1/10thofthetolerance,<br />

i.e. 0.07mm in this example. To reach that accuracy one has to apply subpixel techniques<br />

to overcome the pixel limits.<br />

Figure 4.24(a) visualizes the results of the cross-correlation of an image ROI around the<br />

right boundary of a transparent tube with the template that yields maximum score. The<br />

maximum is located at position Mmax =(19, 5). These coordinates refer directly to the<br />

edge position in the image, since the template function is known and therefore the exact<br />

location of the template ridge.<br />

The real maximum that describes the tube edge location most accurate may lie in between<br />

of two grid positions. With respect to the measuring task, the edge has to be<br />

detected as accurate as possible. Interpolation methods have been introduced in Section<br />

2.3.4 to overcome the pixel grid limits in edge detection. The same can be applied at<br />

this stage to the template matching results.<br />

Cubic spline interpolation is used to compute the subpixel maximum within a certain<br />

neighborhood around the discrete maximum. Cubic splines approximate a function based<br />

on a set of sample points using piecewise third-order polynomials. They have the advantage<br />

of being smooth in the first-derivative and continuous in the second derivative, both within<br />

an interval and its boundaries [53].<br />

The interpolation is performed only with respect to the x direction, since this is the<br />

measuring direction. A subpixel location with respect to y has only a marginal effect on<br />

themeasurements.Ideally,themeasuringpointsontheleftandrightsidehavethesame<br />

y value. Assuming the real maximum location is displaced by maximal 0.5 pixels at each

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

Saved successfully!

Ooh no, something went wrong!