The System COBREP: Automatic Conversion of ... - Semantic Scholar

4 downloads 0 Views 269KB Size Report
Oct 21, 1996 - Real-world measurements lack in numerical accuracy and in completeness. ... Finally a brief guided tour and some ... represented as polyhedra by vertices v, edges e1, and faces f assuming that the ..... VRML Handbook 2.0.
Technical Report IAI-TR-96-10

The System COBREP: Automatic Conversion of CSG Building Data to Boundary Representation

Roman Englert

University of Bonn Institute of Computer Science III Romerstr. 164 D-53117 Bonn, Germany [email protected]

October 21, 1996

Contents 1 Introduction 2 Geometrical Properties of Buildings 3 Irregularities In uencing Analytical Geometry 4 Union of Building Polyhedra 5 A Guided Tour { Examples References

1 1 3 4 6 10

The System COBREP. . .

Roman Englert

1

1 Introduction The system COBREP converts CSG building data to its Boundary Representation (B-rep) or in other words, it computes the union of a set of polyhedra. The polyhedra represent real-world 3D building descriptions. These data could be acquired eciently using a variety of automating- and supporting tools as described in e.g. (Braun, Kolbe, Lang, Schickler, Steinhage, Cremers, Forstner, and Plumer 1995; Englert and Gulch 1996). Real-world measurements lack in numerical accuracy and in completeness. In order to tackle these irregularities we are focussing our approach on geometrical properties of buildings (Section 2) and additionally, we have extended the computation of basic geometrical operations used for the conversion (Section 3). These extensions lead to a robust algorithm which computes a minimal B-rep, where as 'minimal' refers to the number of faces and vertices (Section 4). Finally a brief guided tour and some examples are given in Section 5.

2 Geometrical Properties of Buildings Buildings can eciently be modeled from aerial images using a computer-aided reconstruction (CAR) system, e.g. Englert and Gulch (1996). The acquired data are based on Constructive Solid Geometry (CSG) or more precisely, binary trees where the leaves contain solids and pose- and form parameters (ane transformation and scaling) and the interior nodes (including the root) contain Boolean operations. Solids are internally represented as polyhedra by vertices v , edges e1 , and faces f assuming that the vertices of a face are right-oriented. The latter assumption enshures that the B-rep is unique and hence it can be realized in the three-dimensional Euclidean Space E 3.

Figure 1: A building consisting of two at roof building parts. They are touching at an edge. It has been modeled using two boxes with a 'common' edge. 1

Interchangeable edges are called segments.

The System COBREP. . .

Roman Englert

2

To model buildings representation problems arise: buildings are not 2-manifolds2 (cf. Figure 1). The problem is that the surface intersects itself at a segment. For practical purpose, such buildings can be represented as a 2-manifold by 'ignoring' the exceptional segment. One possibility to do this, is to represent the building of Figure 1 as a rigid combination of two buildings which touch each other at a common segment. In this case the Euler equation3 jv j ? jej + jf j = 2 does not hold anymore (Lakatos 1976). However the Euler characteristic (S ) = jv j ? jej + jf j, where S is the surface of a solid, remains constant. Hence, alternations of a B-rep are permissible, especially the minimization of the number of faces and vertices.

Figure 2: A suburban scene of Bonn showing di erent geometrical properties of buildings, resp. roofs. A 2-manifold M is a topological space where every point has a neighborhood topologically equivalent to an open disk of E 2 (Mantyla 1988). 3 j  j denotes the cardinality of a set. 2

The System COBREP. . .

Roman Englert

3

Buildings are tectonic constructions in origin and thus geometrical properties hold. In suburban areas one can easily verify the following general properties taken from aerial images (cf. Figure 2): 1. The ground level of a building is in general plane. Hence it is constant for the base polygon of a building. 2. Most walls touch incident walls right-angled. 3. Buildings have in most cases a gutter with constant height. 4. Nearly all roof faces (or neighboring faces of them) reach up to the roof height and meet at the ridge (in a point or at an edge). 5. Generalized building descriptions (Englert and Gulch 1996) have no wholes or indentations (Koepf 1974). 6. Roof parts have symmetrical properties (e.g. a saddleback roof has four axis) or similar substructures (e.g. a L-shaped hip-roof has two roof parts containing hips). These properties reduce the computational complexity and the classi cation ambiguities of intersecting points; they are used intensively in Section 4.

3 Irregularities In uencing Analytical Geometry The system has to tackle a variety of data irregularities due to

measurement: vertex positions depend strongly on the given orientations of the im-

ages and the cameras used to take the photographies from which the images for data acquisition are generated;

storing: building descriptions require a compact format and thus the data accuracy can be decreased;

computation: multiplication and division of real numbers cause not neglectible round-

ing errors (Wilkinson 1963). Furthermore de ning a face by three vertices it can happen that the remaining vertices of the face have a distance bigger than a small value  to the face. Li, Sun, and Tang (1990) propose a method to improve the reliability of Boolean operations based on point classi cation (Ho mann 1989). But in the former case, when a point p 'touches' a face close to a vertex v of it, and v is on the other side of the face as p, then it can happen that v will be classi ed as not coincident to p even it is (cf. Figure 3).

The System COBREP. . .

Roman Englert

4

v p

f

Figure 3: Assume, face f is de ned in a manner that the point p 'touches' only it's surface (indicated by the dashed circle) and v is a vertex of the polygon which de nes f . Due to the inaccuracy of the de nition of f the point p could be classi ed as not coincident to v , even it is.

incompleteness: incomplete data include that e.g. faces may emanate from 'closed physical objects'. Hence these buildings are not 2-manifolds, again.

As consequence an integrity check of the modeled buildings as proposed in e.g. (Mantyla 1988) is not possible. Therefore we perform a so-called sloppy classi cation of points in order to decide whether a point lays on a negative side of a face according to the orientation and its closest face, and the positions of vertices, especially intersecting points, will be relaxed using balls with a constant diameter instead of their three-dimensional coordinates. These extensions will be depicted in the following section in detail.

4 Union of Building Polyhedra The approach can be separated into two parts: the computation and classi cation of intersecting points and a post processing which includes merging of coplanar and touching faces, elimination of inner faces, and removing of redundant vertices. The main algorithm takes as input a CSG tree, unites the solids, minimizes the B-rep, and writes the B-rep as VRML4 world (Hartman and Wernecke 1996) to a le: 1. Initialize B-rep B as empty set of faces and vertices 2. Read CSG tree C from le 3. For all solids s from C do (a) For all faces f from s do 4

Virtual Reality Modeling Language

The System COBREP. . .

Roman Englert

5

i. For all faces fb from B do A. Intersect f with fb and insert intersecting points into the faces B. Classify points of face f as 'before', 'on', or 'behind' according to fb and vice versa ii. Reclassify and remove coincident vertices of B iii. Add f to B 4. Merge coplanar and touching faces of B 5. Classify and remove inner faces or parts of faces of B 6. Remove redundant vertices of B 7. Write B as VRML world to le The intersection of faces and point classi cation (paragraphs 3(a)iA and 3(a)iB) make intensively use of the above described properties. Hence we will consider them in more detail. The former takes as input a face f and the currently computed B-rep B and modi es both as following: 1. For all faces fb of B (a) For all segments s of f intersect s with fb and protocol the intersecting point p in I . An intersection exists if the embedding line of s intersects the embedding plane of f with a parameter t, where 0  t  1, and p lays in f . The latter condition can be checked using Jordan's half-line theorem (Laurini and Thompson 1994) taking into account that p lays not on a vertex or segment, of f and the constructed half-line is not collinear to any segment of f . The coincidence of points is tested by computing the intersection of two spheres with pre xed radius. The intersection of two segments can be computed by minimizing the squared Euclidean distance jjl1 ? l2jj2 of their embedding lines l1 and l2 and checking whether the distance of the intersecting point to both segments is less than a small pre xed value . (b) Classify points p of I whether they lay on a segment s of fb and determine a right-handed orientation of I . The classi cation uses Hesse's formula in order to compute the distance d of p and the embedding line of s. If d is close to zero, then it will be checked if p lays between the start- and end point of s. Determine a start point a of I using the classi cation.

The System COBREP. . .

Roman Englert

6

(c) Insert I into faces f and fb according to the intersected segments, resp. point a. The point classi cation classi es the relative position according to a face. Again, points are treated as a sphere with pre xed radius. They are classi ed being 'behind', 'on', or 'before' a face according to its orientation. Note, all intersecting points will be classi ed as 'on'. This classi cation is nally used in order to resize faces and to remove inner vertices. The post processing (paragraphs 4-6) minimizes the B-rep. It consists of the following steps: merging coplanar and touching faces, classi cation and elimination of inner faces or parts of faces, and removing of redundant vertices. The former subalgorithm constructs the normal vectors of all faces using the rst three vertices of a face according to its orientation and computes pairwise the vector product ~v of all touching faces using their normal vectors. If all components of ~v are less than a very small value , then the touching faces are considered as being coplanar. Such two faces A and B are merged together by inserting the bounding polygon of B at their common segment, resp. the segment which contains the touching part of the two faces, into the bounding polygon of A. Subsequently, face B will be deleted. Interior faces or inner parts of faces are classi ed using the following extension of Jordan's half-line theorem: the constructed half-line lh has to be tested into its negative direction, too. If lh or its counterpart lh results in being an inner point, then the tested face is an interior face. Again the constructed half-line lh and its counterpart lh must neither be coplanar to a face nor intersect a segment nor a vertex. The elimination of faces or of parts of them may result in redundant vertices, in other words vertices which are not used in the B-rep anymore. These redundant vertices are removed. Finally, the B-rep will be written as a VRML world to a le.

5 A Guided Tour { Examples A guided tour will demonstrate the practicability and operability of the system COBREP. Finally a variety of buildings with di erent properties will be converted and depicted. The system reads a CSG tree as input (cf. Section 2) from a le. The rst line contains the gutter height, which can be used in order to extract the roof of a building or to colorize for visualization. The subsequent lines contain nodes of the tree. The tree is indexed from the root up to the leaves in left order using numbers 1; 2; : : :. A line consists of the node index, a solid type, a number of parameters, the parameters, number of three-dimensional vertex coordinates, and the vertex coordinates in brackets. All entities are separated by a blank. An example is the following - compare with the

The System COBREP. . .

Roman Englert

7

Figure 4: A CSG tree of a L-shaped hip-roof building consisting of two boxes and two chocks. The form- and pose parameters are contained in the leaves. corresponding CSG tree in Figure 4; the preceding seven lines are comments to the acquisition, however the system will skip them: x : min = 2573142.000000 max = 2573160.500000 factor = 2573151.000000 y: min = 5620391.500000 max = 5620412.500000 factor = 5620402.000000 z: min = 86.483276 max = 94.184853 factor = 90.000000 1.0 #CSGLIB_VERSION Marked primitive (tree position): 2 Navigation time start: 16:17:46 end: 16:17:56 duration: 10 sec. Modeling time start: 16:17:56 end: 16:19:14 duration: 78 sec. Gutter height: 1.184853 1 -1 2 -1 3 -1 4 1 4 17.191734 4.701576 11.026018 0.000000 10.000000 (4.955748 -10.672176 -3.516724) ... (4.955748 -10.672176 -3.516724) 5 2 5 17.191734 11.026018 -5.163744 3.000000 4.701576 8.000000 (4.955748 -10.672176 1.184852) ... (4.955748 -10.672176 1.184852) 6 1 4 16.392126 4.701576 10.628622 0.000000 10.000000 (9.555371 6.002866 -3.516724) ... (9.555371 6.002866 -3.516724) 7 2 5 16.392126 10.628622 -5.163744 3.000000 4.701576 8.000000 (9.555371 6.002866 1.184852) ... (9.555371 6.002866 1.184852)

A call of the system requires three parameters: the desired diameter of the points, an initial scene description of the VRML world, and an input le. The former parameter should be very small, e.g. if all vertex coordinates have six digits after the decimal point (cf. above), then an appropriate value is 10?6 . The initial VRML world description contains the view point, eye direction, illumination, and additionally other presettings and preferences:

. cobrep 0.000001 scene.desc building01.csg

The System COBREP. . .

Roman Englert

8

Figure 5: A visualization of a L-shaped hip-roof building based on its B-rep. Executing this command the system will generate the following output to the screen, and the VRML world containing the B-rep will be written to the le building01.csg.wrl: Sphere diameter for points is 0.000001 Converting 1 file(s). Processing file building01.csg: Initialization... Reading CSG tree... Processing solids... Writing VRML world (|v|=20, |f|=15)... done.

A visualization can now be quickly performed using a so-called viewer, e.g. WEBSPACE5 (cf. Figure 5). Let us nally consider two further examples from a real scene close to Bonn (Englert and Gulch 1996). First, Figure 6 contains a variety of buildings: a saddleback- , a L-shaped saddleback-, a lop-sided saddleback- and an overlapping saddleback roof building. This group of buildings is represented as one CSG tree. The second example (Figure 7) demonstrates a building with a complex roof structure. This building also shows most of the building properties described in Section 2. 5

Silicon Graphics Corporation

The System COBREP. . .

Roman Englert

Figure 6: Di erent combinations- and variations of saddleback roof buildings.

Figure 7: A building with a complex roof structure.

9

The System COBREP. . .

Roman Englert

10

Acknowledgments The author likes gratefully to acknowledge Prof. Dr. Armin B. Cremers. Furthermore he expresses his gratitude to Adrian Spalka and Olaf Schmidt for their support in implementing a prototype. This research is supported in part by BMBF/ DLR under Grant 01 M 3018 F/ 6. The views and conclusions documented in this paper are those of the author and should not be interpreted as representing the ocial policies, expressed or implied of those agencies.

References Braun, C., T. H. Kolbe, F. Lang, W. Schickler, V. Steinhage, A. B. Cremers, W. Forstner, and L. Plumer (1995). Models for Photogrammetric Building Reconstruction. Computer & Graphics 19 (1). Englert, R. and E. Gulch (1996, August). A One-Eye Stereo System for the Acquisition of Complex 3D-Building Structures. GEO-INFORMATION-SYSTEMS, Journal for Spatial Information and Decision Making 9 (4), 16 { 21. Hartman, J. and J. Wernecke (1996). VRML Handbook 2.0. Massachusetts, U.S.A.: Addison-Wesley. Ho mann, C. M. (1989). Geometric and Solid Modeling. Palo Alto, CA, U.S.A.: Morgan Kaufmann. Koepf, H. (1974). Bildworterbuch der Architektur (2nd ed.). Stuttgart, Germany: Alfred Kroner Verlag. Lakatos, I. (1976). Proofs and Refutations: The Logic of Mathematical Discovery. Cambridge, U.K.: Cambridge University Press. Laurini, R. and D. Thompson (1994). Fundamentals of Spatial Information Systems (3rd ed.). Number 37 in A.P.I.C. London, U.K.: Harcourt Brace & Company, Academic Press. Li, X., J. Sun, and Z. Tang (1990). An Approach to Improve the Reliability of Boolean Operation on a Pair of Polyhedra. In C. E. Vandoni and D. A. Duce (Eds.), EUROGRAPHICS, North-Holland, pp. 225 { 236. Eurographics Association: Elsevier Science Publishers B. V. Mantyla, M. (1988). An Introduction to Solid Modeling. Principles of Computer Science. Maryland, U.S.A.: Computer Science Press. Wilkinson, J. (1963). Rounding Errors in Algebraic Processes. London, U.K.: Her Majesty's Stationery Oce.

Suggest Documents