Master Thesis - Fachbereich Informatik
Master Thesis - Fachbereich Informatik
Master Thesis - Fachbereich Informatik
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 75<br />
for measuring. An overview of the algorithm is shown in Listing 4.1. A size filter operation,<br />
which can be parametrized with respect to the given target length, is used to remove<br />
too small foreground segments (e.g. caused by dirt on the conveyor belt).<br />
The output of the algorithm is either one large background segment (i.e. all foreground<br />
segments have been removed if existed since they did not fulfill the criteria) or three<br />
segments in the form BG-TUBE-BG. In the later case, the peaks belonging to the left<br />
and right boundary of the remaining foreground segment are finally verified with respect<br />
to the sign of the derivative. With the derivative operator used, the position of the left<br />
boundary must result in a negative first-order derivative value (bright-dark edge) and the<br />
right boundary in a positive value (dark-bright edge). If the predicted tube boundaries<br />
are consistent with this last criterion, they are used to define two local ROIs of width<br />
WROI as starting point for a more precise detection of the measuring points. The local<br />
ROI height is defined over the distance between the two guide bars.<br />
ThemergingofthesegmentsisalinearoperationinthecomplexityofO(NΩ). Since it<br />
is only allowed to reclassify a former foreground segment into background in this procedure<br />
and never vice versa, Step2 of the algorithm is repeated only once if at all. Hence, the<br />
algorithm terminates for sure.<br />
If all segment are classified as TUBE in the first step, an error is returned. This error<br />
indicates the presence of state full (See Figure 4.2(i)). The reason can be due to a too<br />
small field of view of the camera or to a missing spacing between consecutive tubes. In<br />
any case it is not possible to perform a measuring. Since this state is critical compared to<br />
other states that can not be used for measuring, it is important to detect this situation.<br />
In practice, if this situation occurs an alert must be produced.<br />
4.5. Measuring Point Detection<br />
The previous sections described a fast method to distinguish whether a frame is useful or<br />
not. If a measuring is possible, two regions around the potential left and right boundary<br />
of a tube to be measured are the output of this first step. In the following, the exact tube<br />
boundaries have to be detected with subpixel accuracy.<br />
4.5.1. Edge Enhancement<br />
As introduced in Section 2.3 there is a large number of approaches for edge detection. Four<br />
common methods including the Sobel operator, Laplace operator, Canny edge detector [13]<br />
and a steerable filter edge detector based on the derivative of a parametrized Gaussian<br />
have been applied to test images. The results can be found in Table 4.2. It includes<br />
experiments with two transparent tubes (left boundary) of the same sequence and one<br />
black tube boundary. All tubes have a inner diameter of 8mm. The difference in size<br />
between the transparent and black tubes is due to a different camera-object distance.<br />
As can be seen the edge of the transparent tubes can differ in brightness, contrast and<br />
background pattern between frames.<br />
The goal was to find an edge detection operation that adequately extracts the tube<br />
boundaries under the presence of background structure and noise, and which is computational<br />
inexpensive in addition.