• Keine Ergebnisse gefunden

Rectangular Areas

Im Dokument Error Propagation (Seite 146-149)

5.5 Results and Discussion

6.3.4 Rectangular Areas

The information about the lines calculated in the previous section can be used to identify rectangular areas. The approach presented here uses the maximum extent of two crossing sets of collinear line segments belonging to different vanishing points and was, in a similar form, but without the additional information about the vanishing

6.3.4 Rectangular Areas 147

Figure 6.4: Labelling line segments within a mesh can require recursive look-up of labels.

points, first presented by us in [54]. This approach relies heavily on Features 4 and 5, i. e. collinear vertical and horizontal structure within a face, usually from windows and doors. This structure will result in a high number of collinear short line segments, which can be considered to be part of a set of imaginary longer lines.

Joining these segments, both in the vertical as well as horizontal direction, will lead to a mesh of crossing lines. A face can then be defined as the maximum extent of this mesh bounded by a quadrilateral corresponding to the two vanishing points (called here the smallest bounding rectangle).

The algorithm itself is simple and consists of three steps, namely the identification and assembly of collinear line segments into longer segments as described in Sec-tion 6.3.3, the identificaSec-tion of intersecting line segments and their bounding box, and finally a process which will merge overlapping bounding boxes with the same set of vanishing points (if desired). Each step will be outlined below.

Once the individual line segments have been merged into longer segments, we can calculate the intersections between any two line segments from two different vanish-ing points in a straightforward manner, the algorithmic complexity is in the order of O(Pk−1

i=1

Pk

j=i+1NiNj) ≈ O(k2N2), where k is the number of vanishing points, Ni the number of line segments belonging to theith vanishing point, andN the overall number of line segments. One then needs to classify the intersections into internal ones (i. e. the point of intersection is within both line segments) and external ones (the point of intersection is only within at most 1 segment). This is the actual approach used in the examples given in Section 6.5. It is however possible to reduce the algorithmic complexity to something like O(Pk−1

i=1

Pk

j=i+1Ni+Nj)≈ O(k2N) if we instead plot the individual line segments into an image and only calculate inter-sections if the new segment is passing through a pixel which is already occupied by another segment. Some additional bookkeeping is needed to detect cases where more than 2 line segments pass through the same pixel, but this is easily incorporated.

Once all internal intersections have been found, we need to identify all line segments within a single mesh and the mesh’s bounding box. This can either be done fol-lowing the calculation of the intersections, or concurrently with it. In both cases

148 Grouping

Figure 6.5: Calculating the bounding box as the maximum extent of angles.

165°

195°

15°

345°

Figure 6.6: Which of two angles is the minimum and which the maximum depends on the position of the vanishing point relative to the segments.

the approach is as follows: Each line segment is assigned a unique number, and a table mapping from the segment’s original to its current number is created, where at the beginning original and current number are identical. Every time two line segments, potentially belonging to two so far separate clusters, have been classified as intersecting each other, we assign both clusters the lower of the two numbers — note that this will usually require a recursive identification of current numbers, as some previous intersection might have lowered the number of a cluster without, so far, affecting the numbers stored for all of it’s segments. A very simple example is given in Figure 6.4: merging Segments 1 and 2 in Step 2 implicitly also changes the number of Segment 3, which was merged with Segment 2 in the previous step.

However, only when Segments 3 and 4 are merged in Step 3 is this change noticed.

In general it will be necessary to add a final resolution step once all intersections have been processed, in this step all current numbers are getting updated, starting from the lowest to the highest segment-number — this guarantees, together with the rule that a new cluster is always assigned the lower number of the two intersecting segments, that a unique and consistent result can be reached. The algorithmic com-plexity of the entire process is linear in the number of intersections and therefore usually quadratic in the number of segments.

The final resolution step mentioned above can also be combined with the calculation of the final bounding boxes around each cluster. For each new cluster found when consolidating the cluster-numbers we calculate the bounding box as the minimum and maximum angle with respect to the two vanishing points each. As each cluster

Verification 149 originally consists of only one line segment this is always a region with variations in only one direction. As we identify additional segments belonging to the same cluster, we can simply calculate the new bounding box as the minimum and maximum of the delimiting angles of the two boxes being merged. This process is exemplarily illustrated in Figure 6.5. The minimum and maximum must, of course, be calculated in a fashion suitable for angles, the numerically bigger angle can in fact be the smaller one for our purpose — but need not be — depending on where the vanishing point is relative to the segments, compare Figure 6.6, where min(15,345) = 345, but min(165,195) = 165.

Each bounding box, once found as described above, is then assumed to be com-pletely inscribed into one face of, e. g., a building. The approach described above has the advantage that it is relatively robust with respect to occlusions and missing lines, as long as the face in question is sufficiently highly structured (and the occlu-sion isn’t). It is therefore more applicable to high-rises or apartment blocks than to suburban one-family houses. Additional disadvantages are the algorithm’s inability to differentiate effectively between a long building and a row of identically struc-tured and aligned single buildings (other than by an arbitrarily chosen parameter to describe what constitutes a gap), and that the algorithm is only applicable to rect-angular (convex) areas. It never the less performs quite well even in its very limited form outlined above, and Section 6.5 shows some examples of detected buildings, highlighting both its strengths as well as its weaknesses.

6.4 Verification

This section takes a closer look at how well some of the theoretically derived ap-proaches described previously work for actual data. I start off with Section 6.4.1, which takes a look at several different error models for the representation of line segments in 2D. There I use the example of merging line segments as discussed in Section 6.3.3, and we will see that the choice of error model critically influences the accuracy with which we can detect collinear line segments. We then have a look at two different variables which are meant as a (rough) model for errors in 3D in Section 6.4.2, namely an additional positional or angular error-term as discussed in Section 6.3.1.1. In Section 6.4.2.1 this is done for the task of assigning the indi-vidual line segments to vanishing points, and we will see that for this application an additional angular term is the most appropriate model, while for the detection of collinear line segments discussed in Section 6.4.2.2 the additional term for the positional error is the more influential one.

Im Dokument Error Propagation (Seite 146-149)