6
Computación y Sistemas Vol. 6 No. 4 pp. 247 - 252 @ 2003, CIC - IPN. ISSN 1405-5546 Impreso en México A Fast Method for Plotting Binary Solids Composed of a Large Number ofVoxels Un Método Rápido para Graficar Sólidos Binarios Compuestos de una Gran Cantidad de Voxels Ernesto Bcribiescaand Carlos B. Velarde Vázquez Departamento de Ciencias de la Computaión Instituto de Investigaciones en Matemáticas Aplicadas y en Sistemas Universidad Nacional Autónoma de México, Apdo. Postal. 20-726 México, D.F., 01000, México E-mail: [email protected], [email protected] Abstract Article received on SeTJtember 24. 2001: acceTJted on March 03, 2003 1 Introd uction Wepresent afast and ejjicient methodfor plotting rigidsolids composed of a large number of voxels. This method is based on the concept ofthe contact surface area. The contact surface area corresponds to the sum of the contact surface areas of the face-connected voxels of solids. A relation between the area of the surface enclosing the volume and the contact surface area is presented. We analyze the minimum and maximum contact surface areas. Final/y, we present a result using a binary solid of the real world. Keywords: Binary Solids,Voxel-Based Objects, Plotting. Resumen Se presenta un método rápido y eficiente para graficar obje- tos sólidos y rígdos compuestos por un gran número de voxels. Este método se basa en el concepto del área de super- ficie de contacto. El área de superficie de contacto corres- ponde a la suma de las áreas de las superficies de contacto de los voxels vecinos de los sólidos. La relación entre la superficie envolvente y la de contacto del volumen es defini- da. Se analizan las áreas de las superficies de contacto míni- mas máximas. Finalmente, se presenta un resultado del mé- todo usando datos reales de un sólido binario. Palabras clave: Sólidos Binaiios, Objetos Voxelizados y Graficación. The study of rigid solids is an important part in com- puter vision. In the content of this work, we present the concept of contact surface area for rigid solids composed of voxels (Bribiesca, 1998). Thus, solids are represented as 3D arrays of voxels which are marked as filled with matter. The representation ofsolids by means of spatial occupancy arrays can require much storage if resolution is high, since space requirements increase as the cube of linear resolution (Ballard and Brown, 1982). Never- theless, at present with the declining cost of computer memory and storage devices, explicit spatial occupancy arrays are often used. An advantage of using this kind of representation is that slices through objects may be easily produced. Several authors have been using different kinds of representations for solids: rigid solids represented by their boundaries or enclosing surfaces are shown in Re- quicha (1980) and Besl and Jain (1985); constructive salid geometry schemes are presented and analized in Voelcker and Requicha (1977) and Boyse (1979); gener- alized cylinders as 3D volumetric primitives are shown in Soroka (1979), Soroka and Bajcsy (1976), and Brooks (1983); and superquadrics in Pentland (1986). Salid objects are normally represented by their en- closing surfaces, commonly defined as graphics primi- tives. In this manner, the interior of a salid objectis not explicity represented. On the other hand, salid ob- ject voxelization has not been sufficiently studied (Fang and Chen, 2000). Voxelization is mainly used as a pre- processing step in the current volume graphics process. The voxelization process needs to be done on-the-fly af- ter each change of the model for volume rendering and other volume-related applications. In arder to support dynamic scenes and interactive applications, it is neces- sary that fast voxelization algorithms be used (Manohar, 1999). This work deals with a fast method for plotting voxel-based objects. 247

A Fast Method for Plotting Binary Solids Composed of a ... › pdf › cys › v6n4 › v6n4a2.pdfE. Bribiesca, C. Velarde: A Fast Method for Plotting Binary Solids Composed of a Large

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

  • Computación y Sistemas Vol. 6 No. 4 pp. 247 - 252@ 2003, CIC - IPN. ISSN 1405-5546 Impreso en México

    A Fast Method for Plotting Binary Solids Composed of aLarge Number ofVoxels

    Un Método Rápido para Graficar Sólidos Binarios Compuestos deuna Gran Cantidad de Voxels

    Ernesto Bcribiescaand Carlos B. Velarde Vázquez

    Departamento de Ciencias de la ComputaiónInstituto de Investigaciones en Matemáticas Aplicadas y en Sistemas

    Universidad Nacional Autónoma de México, Apdo. Postal. 20-726México, D.F., 01000, México

    E-mail: [email protected], [email protected]

    Abstract

    Article received on SeTJtember 24. 2001: acceTJted on March 03, 2003

    1 Introd uction

    Wepresent afast and ejjicient methodfor plotting rigidsolidscomposed of a large number of voxels. This method is basedon theconcept ofthe contact surface area. Thecontact surfacearea corresponds to the sum of the contact surface areas ofthe face-connected voxels of solids. A relation between thearea of the surface enclosing the volume and the contactsurface area is presented. We analyze the minimum andmaximum contact surface areas. Final/y, we present a resultusing a binary solid of the real world.

    Keywords: Binary Solids,Voxel-Based Objects, Plotting.

    Resumen

    Se presenta un método rápido y eficiente para graficar obje-tos sólidos y rígdos compuestos por un gran número devoxels. Este método se basa en el concepto del área de super-ficie de contacto. El área de superficie de contacto corres-ponde a la suma de las áreas de las superficies de contactode los voxels vecinos de los sólidos. La relación entre la

    superficie envolvente y la de contacto del volumen es defini-da. Se analizan las áreas de las superficies de contacto míni-mas máximas. Finalmente, se presenta un resultado del mé-

    todo usando datos reales de un sólido binario.

    Palabras clave: Sólidos Binaiios, Objetos Voxelizados yGraficación.

    The study of rigid solids is an important part in com-puter vision. In the content of this work, we present theconcept of contact surface area for rigid solids composedof voxels (Bribiesca, 1998). Thus, solids are representedas 3D arrays of voxels which are marked as filled withmatter. The representation ofsolids by means of spatialoccupancy arrays can require much storage if resolutionis high, since space requirements increase as the cubeof linear resolution (Ballard and Brown, 1982). Never-theless, at present with the declining cost of computermemory and storage devices, explicit spatial occupancyarrays are often used. An advantage of using this kindof representation is that slices through objects may beeasily produced.

    Several authors have been using different kinds ofrepresentations for solids: rigid solids represented bytheir boundaries or enclosing surfaces are shown in Re-quicha (1980) and Besl and Jain (1985); constructivesalid geometry schemes are presented and analized inVoelcker and Requicha (1977) and Boyse (1979); gener-alized cylinders as 3D volumetric primitives are shownin Soroka (1979), Soroka and Bajcsy (1976), and Brooks(1983); and superquadrics in Pentland (1986).

    Salid objects are normally represented by their en-closing surfaces, commonly defined as graphics primi-tives. In this manner, the interior of a salid objectisnot explicity represented. On the other hand, salid ob-ject voxelization has not been sufficiently studied (Fangand Chen, 2000). Voxelization is mainly used as a pre-processing step in the current volume graphics process.The voxelization process needs to be done on-the-fly af-ter each change of the model for volume rendering andother volume-related applications. In arder to supportdynamic scenes and interactive applications, it is neces-sary that fast voxelization algorithms be used (Manohar,1999). This work deals with a fast method for plottingvoxel-based objects.

    247

  • ==

    E. Bribiesca, C. Velarde: A Fast Methad far Platting Binary Salids Campased af a Large Number af Vaxels

    This paper is organized as followso In Section 2 wegive a set of concepts and definitions and present thecontact surface afea and its relation to the enclosingsurface areao In Section 3 we give the methodhereproposed for plotting rigid solids composed of a largenumber of voxelso Section 4 presents some results us-ing digital elevation models as rigid solids and finally, inSection 5 we give some conclusionso

    2 Concepts and Definitions

    In arder to introduce our concept of contact surfaceafea we use volumetric representation for rigid solidsby means of spatial occupancy arrayso Thus, the solidsare represented as 3D arrays of voxels which are markedas filled with mattero Furthermore, shape is referred asshape-of-object, and object is considered as a geometricsalid composed of voxelso

    In the content of this work, arca is a numerical valueexpressing 2D extent in aplane, or sometimes it is usedto IDean the interior region itself (Karush, 1989)0 An-other consideration is the assumption that an entity hasbeen isolated from the real worldo This is called the rigidsolid, and is defined as a result of previous processingoIn this work, the length of all the edges of voxels is con-sidered equal to oneo

    In this section, we define the contact surfaces forrigid solids composed of voxelso Also, we define the re-lation between the contact surface afea and the afeaof the surface enclosing the volume. This relation be-tween the afeas of the surfaces can be used in differentpolyhedrons, which cover up spaceo In this case, wedemonstrate the above mentioned using hexahedronsoIn arder to introduce our plotting method, a number ofgeometrical concepts are defined below:

    The arca A 01 the enclosing surlace of a rigid salidcomposed of a finite number n of voxels, corresponds tothe sum of the afeas of the external plane polygons ofthe voxels which forro the visible faces of the solido

    The contact surface arca Ac of a rigid salid composedof a finite number n of voxels, corresponds to the sumof the afeas of the contact surfaces which are commonto two voxels.

    The relation between the arcas 01 the enclosing sur-lace and the contact surlace. For any binary salid com-posed of n voxels, the relation between the afeas is de-fined by:

    2Ac + A = aFn, (1)

    where Ac is the contact surface afea, A is the afea ofthe enclosing surface, a is the afea of the face of thevoxel (a = 1 is assumed in the forward examples cor-responding to figures 1 to 3), and F is the number ofplane polygons or faces of the voxel (Bribiesca, 2000)0

    248

    Geometrically, it means that the sum of twú times thecontact surface afea plus the enclosing surface afea isequal to the total sum of the polygon afeas of all thevoxels of the solido Notice that the above-mentionedrelation is preserved for solids having holes and innerholeso

    By Eqo (1), the contact surface afea is:

    A - aFn - Ac - ~2 o

    (2)

    The contact surlace arca is maximized by a digitalcube. In the digital domain, when we are using regularhexahedrons the contact surface afea is maximized tothe forro of the used polyhedron. Thus, if the solids aredescribed using voxels (F = 6) the contact surface afeais maximized by a digital cube. Figo 1 shows this: in thefigures l(a) and (b) we show a digital cube and a digitalsphere composed of 19,683 voxels each oneo The cuberoot of 19,683 is a positive integer: .q'19683 = 27, Le.19,683 is a perfect cubeo The contact surface afea forthis digital cube is equal to 56,862 and for this digitalsphere is equal to 56,4530 Notice that the maximumcontact surface afea belongs to the digital cubeo Herewe do not prove this, we only illustrate ito

    The mínimum contact surlacearcaACminfor a salidcomposed of n voxels is given by:

    ACmin = a(n - 1); (3)

    this minimum value is attained if each voxel has only onecontact face, for example when the voxels are aligned orarranged as illustrated in Fig. 2(0)0

    The maximum contact surlace arca Acma~ for a salidcomposed of n voxels, where n = m3 is a perfect cube,is easily obtained from Eqo (2):

    Acma~= 3a(m3 - m2)0 (4)

    If n is not a perfect cube, say mr < n < m~ for somesuccessive integers mI and mI, then:

    3a(mr - mi) < Acma~ < 3a(m~ - mD, (5)

    and a rough estimate of Acma~ is given by

    Acma~ ~ 3a(n - {.In)2)0 (6)

    Figo 2 shQWSexamples of solids composed of 27 vox-els each oneo Notice that the maximum contact surfaceafea corresponds to the salid in Fig. 2(a), its value is54 and may be obtained by Eqo (4)0 Figures 2(b), (c),(d),o..,(o) show different examples of solids which havedescending contact surface afeas in steps of 20 Thus, foreach salid in Figo 2 we have: (a) Ac = 54 and A = 54;(b) Ac = 52 and A = 58; (c) Ac = 50 and A = 62; 000; (o) Ac = 26 aqd A = 1100 Notice that the values of

  • E. Bribiesca, C. Velarde: A Fast Method for Plotting Binary Solids Composed of a Large Number of Voxels

    A simple algorithm for eliminating the hidden facesof a salid S of n voxels is as follows. Assume the vox-els are unit cubes. Let P be the smallest rectangular

    parallelepiped containing S and let the lengths of its 5sides be denoted a, fJ, and 'Y. A three-dimensional bi-nary matrix M of afJ"r elements is used to representP and S. The elements of M correspond in the obvi-ous way to the voxels of P, and an element of M is 1if and only the corresponding voxel is in S. Each ele-ment of lv[ is visited once following a natural arder and abounded number of operations (simple boolean compar-isons and writings to an ouput file). Thus, the time (andthe space) complexity of the algorithm is O(afJ'Y)' Theworst-case complexity is O(n3), it is achieved for solidslike the one shown in Fig. 2(0) when a = fJ = 'Y~ n/3.The best-case complexity is O(n), obviously this is thecase when afJ'Y = n (Le. when S = P, as for the cubeshown in Fig. 2(a)). In applications as the one to be A k 1presented in the next section, it is common that each S e now edgementsfills more than a constant fraction of its correspondingP, thus afJ'Y :::; kn holds for the consídered family ofsolids and the complexity is O(n).

    the contact surface afeas of the solids in Fig. 2 are de-creasing in steps of 2 whereas the values ofthe endosingsurface afeas are increasing in steps of 4. The mínimumcontact surface afea belongs to the salid presented inthe Fig. 2(0), its contact surface afea is 26, which maybe obtained using the Eq. (3). The contact surface afeadecreases linearly.

    3 The ProposedMethod for Plot-ting Solids

    The endosing surface afea of a salid corresponds to thesum of the afeas of visible faces of the solido On theother hand, the contact surfaces correspond to the hid-den faces of the solido Therefore, when a salid is plottedthe contact surfaces must be eliminated from the plot-ting, this decreases the computation greatly. Thus, thenumber of hidden faces which must be eliminated ofany plotting is equal to 2Ac. Subsequently, the visiblefaces of the salid are represented in a standard vectorfile format, this produces a wireframe plotting in whichall Hiles are represented, induding those that would behidden by faces. To eliminate these hidden Hiles fromthe plotting, the HIDE command is used (which is pro-grammed in most 3D CAD software). The final efIect isthat objects are plotted as opaque solids.

    4 Results

    In this section, we present an example of digital eleva-tion models of "El Valle de México". Those models aredigital representations of the Earth's surface. Gener-ally speaking, a digital elevation model is generated asa uniform rectangular grid organízed in profiles. In thiscase, the digital elevation models are represented as rigidsolids composed of a large number of voxels (Karabassiet al., 1999). The digitalization of these models is basedon 1:250,000 scale contours.

    Fig. 3 shows the digital elevation model of the vol-cano "Iztaccíhuatl". This volcano is to the east of "ElValle de México" and what is shown is the western sirleofthe mountain. In Fig. 3(a) the volcano is representedby a 3D mesh of 200 x 200. The elevation data val-ues of the model presented in this study were increasedto enhance their characteristics. Fig. 3(b) illustratesthe volcano as a rigid salid composed of 960,903 vox-els, where A = 121,544 and Ac = 2,821,937 ((6) givesAc"",z ~ 2,853,496). Therefore, the number of hid-den faces which were eliminated is equal to 5,643,874.When the volcano has this representation it is possi-ble to use morphological operators to erode it, simplifybinary salid data, and preserve essential shape charac-teristics (Bribiesca, 1998). Of course, when we are usingmorphological operators all the amount of informationof the binary salid is considered. Notice that in Fig. 3(c) the volcano Iztaccíhuatl represented as a binary salidwas cut across to present its interior without inner faces,which were eliminated using the proposed method.

    Conc1usions

    Using the concept of contact surfaces a fast and effi-cient method for plotting rigid solids composed of a largenumber of polyhedrons, is defined. Suggestions for fur-ther work: prove the concept of contact surfaces for rigidsolids using difIerent polyhedrons (which cover up space,for instance non-regular octahedrons) , in arder to obtaina better representation and plotting; when we are work-ing in the digital domain using rigid solids composed ofpolyhedrons, demonstrate that the contact surface afeais maximized to the forro of the used polyhedron.

    This work was in part supported by the REDIl CONA-CYT. Digital elevation model data used in this studywere provided by INEGI. We thank the anonymous ref-erees for their valuable comments.

    249

  • -E. Bribiesca,C. B.VelardeV: A Fast Method for P/otting Sinary So/ids Composed of a Large Number of Voxe/s

    '-~"-..-.

    -.,-

    (a)

    11=19683

    Ac=56862

    (b)

    n=1!J68:3

    Ac=::)G4~:3

    Figure 1. The contact surface afea is maximized by a digital cube: (a) a digital cube composed of 19,683 voxels, its contact surfaceafea is equal to 56,862; (b) a digital sphere composed of 19,683 voxels, its contact surface afea is equal to 56,453.

    ."c'o

    fl\ll,[~+~ 11

    ¿-cO[lL-

    I~~JJ](d) Ac=4B (e) Ac=46

    [f~![1

    c;:.~J.CC-

    lt..

    I~[~TT,

    -

    fc

    ¡iJ¡1--1511J

    (i) Ac=:38 (j) Ac-=36 I

    I ¡~:'-

    d~-~ -.."

    [&:[1tT)1i)

  • E. Bribiesca, C. Velarde: A Fast Method for PlottingBinary Solids Composed of a Large Number of Voxels

    (a)

    (b)

    (e)

    Figure 3: The digital elevation model ofthe vo1cano «Iztaccihuat1»: (a) represented by a 3D mesh of200 x 200 elements; (b)composed of960,903 voxels; (c) the vo1cano without inner faces.

    251

  • E. Bribiesca, C. Velarde: A Fast Method 'or Plotting Binary Solids Composed o, a Large Number o, Voxels

    References

    Ballard D. H. and C. M. Brown, Computer Vision,EnglewoodClifIs,NJ: Prentíee-Hall, 1982.

    Besl P. and R. Jain, "Three-Dimensional ObjectReeognition". ACM Computo Surv.. 17(1): 75-145,1985.

    Boyse J. W., "Data Strueture for a Salid Mod-eller". NSF Workshop on the Representation 01 Three-Dimensional Objects, Univ. Pennsylvania, 1979.

    Bribiesca E., "Digital Elevation Model Data AnalysisUsing the Contact Surfaee Area". Gmphical Models andImage Processing. 60(2): 166-172, 1998.

    Bribiesca E., "A Measure of Compactness for 3DShapes". Computers f3 Mathematics with Applications.40: 1275-1284, 2000.

    Brooks R., "Model-based 3-D interpretations of 2-Dimages". IEEE Trans. Pattern Anal. Mach. Intelligence.5(2): 140-150, 1983.

    Fang S. and H. Chen, "Hardware Aeeelerated Vox-elization". Computers f3 Gmphics. 24: 433-442, 2000.

    Karabassi E.-A., G. Papaioannou, and T. Theo-haris, "A Fast Depth-BufIer-BasedVoxelizationAlgo-rithm". Journal 01Gmphics Tools.4(4): 5-10,1999.

    Karush W., Webster's New World Dictionary 01Math-ematics, Webster's New World. New York, giman &Sehuster, lne., 1989.

    Manohar S., "Advanees in Volume Graphíes". Com-puters f3 Gmphics. 23: 73-84, 1999.

    Pentland A., "Pereeptual Organization and the Rep-resentation of Natural Form". Artificial Intelligence. 28:293-331, 1986.

    Requicha A. A. G., "Representations of Rigid SalidObjects". Computer Surv.eys. 12: 4, 1980.

    Soroka B. I. and R. K. Bajcsy, "GeneralizedCylin-ders from Serial Seetions". Proc., 3rd IJCPR: 734-735,1976.

    B. I. Soroka, "Generalised Cylinders from ParallelSliees".Proc., PRIP: 421-426,1979.

    Voelcker H. B. and A. A. G. Requicha, "Geomet-ríe Modelingof MechaniealParts and Proeesses", Com-putero10: 48-57,1977.

    Ernesto Bribiesca, received the E.Sc. degree in electronics engineering from the Instituto Politecnico Nacional

    in 1976. He received the Ph.D. degree in mathematicsfrom the UniversidadAutonoma Metropolitana in 1996, he wasresearcher at the IEM Latin American Scientific Center, and at the Direccion General de Estudios del Territorio

    Nacional (DETENAL). He is associate editor of the Pattern Recognition journal. He has twice beenchosen Honorable Mention winner of the Annual Pattern Recognition Society Award. Currently,he is Professor at the Instituto de Investigaciones en Matematicas Aplicadas y en Sistemas (IlMAS) at the UniversidadNacional Autonoma de Mexico (UNAM), where he teaches graduate courses inPattern Recognition.

    Carlos Bruno Velarde Velázquez, received the ES in Mathematics in 1978from the Universidad Nacional Autónoma

    de México. He works as assistant professor at this institution, in the computer science department of the Instituto deInvestigaciones en Matemáticas Aplicadas y en Sistemas.

    252