Using Surface Coding to Detect Errors in Surface

0 downloads 0 Views 137KB Size Report
To reconstruct a surface of an object from a given series of cross-sectional ... checked to see whether they are topologically legal using the surface coding ...
Using Surface Coding to Detect Errors in Surface Reconstruction Yoshihisa Shinagawa and Tosiyasu L. Kunii

Abstract To reconstruct a surface of an object from a given series of cross-sectional contours, it is necessary to decide between which contours surface patches should be generated. Contemporary methods use only local information between consecutive contours and do not consider global information such as the topology of an object. This paper presents error detection and correction in surface reconstruction based on the topological information. The reconstructed surfaces are checked to see whether they are topologically legal using the surface coding method.

The

detected errors are heuristically corrected.

ory

Keywords:

surface reconstruction, surface coding, error detection, error correction, Morse the-

INTRODUCTION There are many surface reconstruction systems that utilize cross-sectional contours of 3-dimensional (3D) objects [Fuchs, Kedem and Uselton 1977, Christiansen and Sederberg 1978, Boissonnat 1988, Shinagawa and Kunii 1991b].When the distance between adjacent cross-sectional planes is large compared with the complexity of the object, it is not easy to decide between which contours surface patches should be generated. There have been several approaches to automating this process, including branch handling method. Shantz (1981) proposed a multiple-branching procedure based on a concatenation of contours. Ekoule, Peyrin and Odet (1991) proposed a heuristic method of detecting branching using the overlap of consecutive contours. Shaw and Schwarz (1989) used the voxel adjacency for the detection. This method, however, assumes that sampling in the z direction (perpendicular to the cross-sectional planes) is very dense. These methods use only local information between consecutive contours and do not consider global information such as the topology of an object. To reduce errors in surface reconstruction, it is necessary to consider the global structure of objects as described, for example, in [Kergosien 1987, Kergosien 1991]. This paper proposes a method that makes this decision based on the surface coding method described in [Shinagawa, Kergosien and Kunii 1991]. The result can be directly fed to the surface reconstruction system using cross sectional data; i.e., the surface of an object is automatically reconstructed and visualized when the cross sectional contours are given. First of all, we construct a tree representing the containment relation of the contours on each cross sectional plane. Each contour is then identi ed with a contour on its adjacent cross sectional plane based on a criteria such as the distance between the two contours. When the tree structure changes between two adjacent cross sectional planes, we check whether the change is legally based on the coding method. When it is legal, we call this change acceptable. If it is not acceptable, as is shown in Figure 1, the identi cation process is backtracked.

1

Figure unacceptable

Figure 1: Unacceptable change in the contour structure

Figure pasteCells

Figure 2: Surface Construction of a torus

Outline of the Surface Coding Method The surface coding method based on Morse theory [Shinagawa, Kergosien and Kunii 1991] enables coding of complex shaped objects such as human organs. This method codes the surface by describing the cells that form the surfaces. To decide the sequence of pasting cells, a user speci es the skeleton of the object called the Reeb graph [Reeb 1946] using the icons. In the system, we use three kinds of cells: 1D, 2D and 3D cells. They are called 1-cell, 2-cell and 3-cell. Simply speaking, a 0-cell is a point, a 1-cell is a chip of a string and a 2-cell is a patch of a surface. Figure 2 shows how the cells are pasted to form the surface of a torus. According to Morse theory, there is a one-to-one correspondence between a cell and a non-degenerate singular point of a Morse function de ned on the object surface that is a C 2 2-manifold. In our system, we use the height function that gives the height of a point on the object surface embedded in R3. In this case, there are three kinds of non-degenerate singular points: peaks, saddle points and pits (see Figure 3a). A peak corresponds to a 2-cell, a saddle point to a 1-cell and a pit to a 0-cell. (A description of Morse theory can be found, for example, in [Milnor 1963].) Scanning from top to bottom, codes are generated by listing the operations of attaching cells that correspond to the singular points. There are four kinds of operators: put e2, put e1 divide, put e1 merge and put e0 (k-cell is abbreviated to ek above). Each operator has several parameters. To attach a 1-cell, there are two operators (put e1 divide and put e1 merge): one for dividing a contour and the other for merging two contours. To specify the sequence of attaching cells, the Reeb graph [Reeb 1946] is used. The Reeb graph of the height function is obtained by considering the cross-sectional contours of the object (see Fig. 23b). A cross-sectional contour is represented by a point in the Reeb graph as shown in Fig. 23c.

Figure reeb

Figure 3: (a) A torus, (b) its cross sections and (c) its Reeb graph (Shinagawa et al. 1991)

Figure parent

Figure 4: (a) The parent-child relation of contours and (b) its tree representation Users de ne the Reeb graph using icons.

Graph construction Contour Identi cation The containment relation of the contours on each cross-sectional plane is nested and can be represented by a tree as shown in Figure 4. This relation is called the \parent-child" relation. We introduce a virtual contour #0 as the root of the tree. In this paper, the tree structure is constructed using the spatial containment check described in [Dobkin, Guibas, Hershberger and Snoeyink 1988, Guibas, Ramshaw and Stol 1983]. We construct a graph corresponding to the Reeb graph. In the graph, each cross sectional contour is represented by a node. For each node, an edge corresponding to a part of an edge of the Reeb graph is then spanned between a node representing a contour on its adjacent cross-sectional plane based on a criterion. In this paper, the `average distance' d between two contours was used; i.e., for each contour, an edge is spanned to a contour on its adjacent plane with the smallest distance. When there is more than one edge incident to a node, it is either rejected or accepted according to a criterion such as described in [Shinagawa and Kunii 1991a] or by using some threshold values. Each contour is given a number as an identi er. When the upper and lower contours are spanned by an edge, the two have the same identi er. When there is more than one edge incident to a node or when a new contour appears or a contour vanishes, the identi er is provided by the coding system as is discussed later.

Average Distance The `average distance' is de ned as follows. We denote by Lji the i-th contour on the j -th crosssectional plane and by d(Lji ; Ljk+1) the average distance of the edge that corresponds to the surface patch generated between Lji and Ljk+1 . We denote by N j the number of contours in the j -th crosssectional plane and Nframe is the number of cross-sectional planes. We assume that the contours are approximated by polygons and use d

j j +1 Li ; Lk

(

)=

j ni Dj =

X nji

m=0

f

(xji;m ; Ljk+1):

Here, Dj is the distance between the j -th and j + 1-th cross-sectional planes. of the polygon that approximates Lji which has nji vertices, f

(1)

xji;m is the

-th vertex

m

(x; A) = min d(x; y)

where d is the distance function and x; y 2 R3. in set A.

y 2A

f

gives the minimum distance between x and points

Error Detecting and Correcting Procedure After the edges are spanned, the reconstructed surface is checked to see whether it uses only legal change in the contour structure allowed by the coding method. To be precise, the nested contour structure at the lower level is compared with that obtained by applying the corresponding operator to the contours on its upper level. When they are not the same, the edges are modi ed.

Derivation of Operators First of all, the change in the contour structure is coded. The singular points are assumed to be non-degenerate and no two singular points are assumed to be at the same height. The procedure for the coding is as follows. It scans the graph from top to bottom.  When a node to which no edge from the upper level is incident rst appears at a certain level,

the corresponding code is PUT E2 . When it is contained in an existing contour (let it be contour #n), the corresponding code is PUT E2(n). The identi er of the new contour is the smallest positive integer that has not yet been used.

 When a node of the graph disappears at a certain level, the corresponding code is  When two edges are merged, the coding is

PUT E0

.

. When the child contours of the new contour do not coincide with the child contours of the two contours that have been merged, an error is reported. The identi er of the merged contour is the smaller of the two identi ers. PUT E0 MERGE

 When an edge splits, the corresponding code is

. The children of the split contour (the second parameter clist described in [Shinagawa, Kergosien and Kunii 1991]) are decided by checking the containment relation of contours. When the contour of one of the branches (let it be #m) is contained in the other (let it be #n), the third parameter described in [Shinagawa, Kergosien and Kunii 1991] is OUTSIDE , otherwise (a sibling contour) it is INSIDE . In the case of OUTSIDE , the child contours of #m are checked to see if they have become the children of #n. In the case of INSIDE , the child contours of #m and #m are checked to see if they coincide with the child contours of the old contour. The identi er of the new contour is the smallest positive integer that has not yet been used. PUT E0 DIVIDE

Figure detection

Figure 5: Error Detection

Error Detection After the code at that level is derived, the parent-child relation of contours at that level is checked to see if they coincide with the result of applying the derived operator to the tree structure of contours at its upper level. If it does not, there is an error. Let the former tree be T1 and the latter be T2 . The detection procedure is detailed below. Let the current position indicator of T1 be p1 and that of T2 be p2. Let us denote the height of p1 and p2 from the root by h1 and h2 respectively. The comparison starts from the root of T1 . (p1 is at the root). For each child of p1 , we search for a contour in T2 at height h1 with the same identi er. If there is none, the contour is marked. In Figure 5, marked contours are represented by putting * before the contour number. For each subtree with the children of p1 that are not marked as the roots, the procedure is continued. This procedure is applied recursively. When the procedure nishes and there are marked contours, then the surface reconstruction is unacceptable.

Error Correction

The error thus detected is heuristically corrected. First of all, we de ne a procedure called INTERCHANGE(# For a contour #k and a contour #l on #k's upper level, let us assume that an edge spans #k and #m and another edge spans #n and #l, INTERCHANGE(#k; #l) interchanges the two edges so that the edges (#k; #m) and (#n; #l) become (#k; #l) and (#n; #m) (see Figure 6). Note that k = m and n = l when there is no branching. When there is no edge incident to #l , it simply changes (#k; #m) into (#k; #l). After this, contour identi ers are recomputed. We also use a function NEAREST(#k; i) that gives the i-th nearest contour on #k's upper level. The procedure for error correction is as follows: Case A

When there is only one marked contour (say, #k), use (#k; 2)) (see Figure 7).

(parent of #k,

INTERCHANGE

NEAREST

When #k and #l are both marked and #l = NEAREST(#k; 2), use INTERCHANGE(#k; #l) is performed (see Figure 8).

Case B

Case C

Otherwise, for each marked contour, use INTERCHANGE(#k,NEAREST(#k; 2)).

For cases A and B, it is probable that the error will be corrected. Otherwise, the situation is more complicated and the errors might not be corrected. Also, there are cases where the correction is ambiguous if we use topological information represented by the tree structure only (see Figure 9). As the coding method cannot use the information regarding embedding, the error detection system cannot detect errors as shown in Figure 10.

Figure interchange

Figure 6: INTERCHANGE

Figure correctiona

Figure 7: Error correction for Case A

Figure correctionb

Figure 8: Error correction for Case B

Figure ambiguity

Figure 9: Ambiguity of Error Detection

Figure undistinguishable

Figure 10: Two con gurations that cannot be distinguished

Summary This paper has presented error detection and correction for the surface reconstruction systems that use cross-sectional contours. The method uses the topological information represented by the surface coding described in [Shinagawa, Kergosien and Kunii 1991]. Error correction for more complicated cases is left as future research. To remove errors completely, the result of the correction procedure must be fed back to the detection procedure. The procedure can be iterated until all the errors are removed. The analysis of the convergence of this iteration is another task of the future.

ACKNOWLEDGMENTS We wish to express our gratitude to Dr. Kansei Iwata, the president of Graphica Co., Ltd. and Mr. Norimasa Koyama, the executive director of Cadtech Inc. for o ering the drum scanner, G-225C, to Yokogawa Hewlet Packard Co., Ltd. for HP9000 model 550 and to Silicon Graphics Co., Ltd. for IRIS 4D/70GT. Special thanks are extended to Dr. Yannick L. Kergosien of Mathematiques, Universite de Paris-Sud for information on the Reeb graph and his precious comments on our papers.

References [Boissonnat 1988]

Boissonnat JD (1988) Shape reconstruction from planar cross sections. Computer Vision, Graphics, and Image Processing, 44(1):1{29.

[Christiansen and Sederberg 1978]

Christiansen HN, Sederberg TW (1978) Conversion of complex contour line de nitions into polygonal element mosaics. Computer Graphics (Proc. Siggraph), 12(3):187{192.

[Dobkin, Guibas, Hershberger and Snoeyink 1988] Dobkin D, Guibas L, Hershberger J, Snoeyink J (1988) An ecient algorithm for nding the csg representation of a simple polygon. Computer Graphics (Proc. ACM SIGGRAPH'88), 22(4):31{40. [Ekoule, Peyrin and Odet 1991]

Ekoule AB, Peyrin FC, Odet CL (1991) A triangulation algorithm from arbitrary shaped multiple planar contours. ACM Transactions on Graphics, 10(2):182{199.

[Fuchs, Kedem and Uselton 1977]

Fuchs H, Kedem ZM, Uselton SP (1977) Optimal surface reconstruction from planar contours. Communications of the ACM, 20(10):693{702.

[Guibas, Ramshaw and Stol 1983]

Guibas L, Ramshaw L, Stol J (1983) A kinetic framework for computational geometry. In: Proc. 24th Annual IEEE Symposium on Foundations of

, pp. 100{111.

Computer Science

[Kergosien 1987]

Kergosien YL (1987) Projections of smooth surfaces : Stable primitives. In: Proc. CognitivaMARI, CESTA. Paris, pp. 447{454.

[Kergosien 1991]

Kergosien YL (1991) Generic sign systems in medical imaging. IEEE Computer Graphics and Applications, 11(5):46{65.

[Milnor 1963]

Milnor J (1963) Morse Theory. Princeton University Press, New Jersey.

[Reeb 1946]

Reeb G (1946) Sur les points singuliers d'une forme de pfa completement integrable ou d'une fonction numerique. Comptes Rendus Acad. Sciences Paris, 222:847{849.

[Shantz 1981]

Shantz M (1981) Surface de nition for branching, contour-de ned objects. Computer Graphics, 15(2):242{270.

[Shaw and Schwartz 1989]

Shaw A, Schwartz EL (1989) Construction of polyhedral surfaces from serial secions: Exact and heuristic solutions. SPIE Medical Imaging III: Image Capture and Display, 1091:221{233.

[Shinagawa and Kunii 1991a]

Shinagawa Y, Kunii TL (1991) Constructing a Reeb graph automatically from cross sections. IEEE Computer Graphics and Applications, 11(6):44|51.

[Shinagawa and Kunii 1991b]

Shinagawa Y, Kunii TL (1991) The Homotopy model: A generalized model for smooth surface generation from cross sectional data. The Visual Computer, 7(2{3):72{86.

[Shinagawa, Kergosien and Kunii 1991]

Shinagawa Y, Kergosien YL, Kunii TL (1991) Surface coding based on Morse theory. IEEE Computer Graphics and Applications, 11(5):66{ 78.

Suggest Documents