Efficient Approximation of Range Images Through

0 downloads 0 Views 207KB Size Report
fax: +34 3 401 60 50, E-mail: garcia@turing.upc.es. Abstract ... segmenting range images approximated by triangular meshes. ... the maximum range able to be measured by the sensor or when there are ..... the sense that can be applied to all kinds of quadrilateral meshes: ... is the dot product between both vectors. This.
IEEE Int. Conf. on Computer Vision and Pattern Recognition, San Juan, Puerto Rico, June 1997, 628-633.

Efficient Approximation of Range Images Through Data-Dependent Adaptive Triangulations Miguel Angel García‡

Angel Domingo Sappa†

Luis Basañez†

‡ Department

of Software (Computer Graphics Section) † Institute of Cybernetics Polytechnic University of Catalonia Diagonal 647, planta 8. 08028 Barcelona, SPAIN fax: +34 3 401 60 50, E-mail: [email protected]

Abstract This paper presents an efficient algorithm for generating adaptive triangular meshes from dense range images. The proposed technique consists of two stages. First, a quadrilateral mesh is generated from the given range image. The points of this mesh adapt to the surface shapes represented in the range image by grouping in areas of high curvature and dispersing in low-variation regions. The second stage splits each quadrilateral cell obtained before into two triangles. Between the two possible flips, it is chosen the one whose diagonal´s direction is closest to the orientation of the discontinuities present in that cell. Both stages avoid costly iterative optimization techniques. Results with real range images are presented. They show low CPU times and accurate triangular approximations of the given images. Keywords: Shape Representation and Recovery, Adaptive Triangular Meshes, Range Images, Data-Dependent Triangulation.

1

Introduction

Computer vision has traditionally relied on intensity image processing for obtaining 3D shapes. Different techniques have been utilized for that purpose, such as shapefrom-focus, shape-from-stereo or shape-from-shadows, to mention a few. However this process is conceptually involved since, in the end, 3D information must be inferred from 2D projections. A simpler and more direct approach for obtaining shape information of 3D objects consists of utilizing range images. A range image is a two-dimensional array of pixels. Each pixel does not represent a light-intensity level This work has been partially supported by the Government of Spain under the CICYT project TAP96-0868. The second author has been supported by the Spanish Agency for International Cooperation and the National University of La Pampa (Argentina).

but the distance from a point that lies on the surface of a 3D object to a virtual plane referred to the range sensor utilized to acquire the image. The ability to directly obtain 3D shapes and the availability of increasingly inexpensive and fast sensors explain the popularity that range images are gaining in the computer vision and robotics communities. As in many other fields, efficiency is a major concern in computer vision. The processing associated with range images can be significantly reduced by working with data representations able to keep the same shapes defined by the range images but with fewer data points. Triangular meshes are a popular data representation. They are advantageous since can efficiently adapt to intricate shapes. Thus, large planar areas, which in a range image may occupy tens or hundreds of pixels, can be represented as a few triangles. In fact, a triangular mesh approximating a range image can be interpreted as a first level of abstraction of that image, since planar areas are identified and interrelated. Then, further processing algorithms (e.g., segmentation, integration, recognition) can take advantage of such pre-processing to perform more efficiently. For instance, [1] presents a fast technique for segmenting range images approximated by triangular meshes. Besides the speed-up of further processing algorithms, triangular meshes are a convenient representation in order to integrate the surfaces described by the range image in a world model [2] or to include them in CAD packages. Different techniques have been proposed for the approximation of dense range images with triangular meshes (e.g., [5][6]). However they are based on costly iterative optimization algorithms that take into account all pixels of the original range image. This may make their application to systems with real-time constraints difficult. Trying to overcome that efficiency problem, [3] presents a fast algorithm for generating triangular meshes from range images avoiding optimization techniques. The basic idea consists of using an estimation of the curvature

associated with each pixel as the probability of selecting it for the final triangulation. Then, each pixel is selected or discarded based on the outcome of a pseudo-random number generator that follows a uniform probability distribution function. Thus, points tend to group in high curvature areas and to disperse in low-variation regions, adapting to the underlying shape described in the range image. A 21/2D Delaunay triangulation is finally applied to mesh the selected points. However, the randomized nature of the previous technique produces two effects that may be inconvenient for some applications. First, the number of selected points and triangles cannot be specified a priori. Although it is possible to control the final density through a sampling rate parameter, the number of points varies randomly and is strongly influenced by the shape of the surfaces contained in the range image. Secondly, although the density of points agrees with the underlying surface curvature, nothing prevents from obtaining large and small triangles coexisting in either low or high variation regions. Thus, the obtained meshes tend to be quite irregular and it is also frequent to find degenerated triangles. This paper presents a non-randomized technique to obtain triangular meshes from range images with no optimization. Since a deterministic algorithm is applied, the number of points and triangles can be specified a priori. Moreover, triangle shapes tend to vary more gently by construction. Obviously, these new requirements lead to a certain time penalty with respect to the simpler randomized technique. However, the proposed method is still very efficient since avoids iterative optimization and it is inherently parallel. The organization of the paper is as follows. The proposed technique is described in section 2. Section 3 presents experimental results with real range images. Finally, conclusions and further improvements are given in section 4.

2

Non-Randomized Adaptive Triangulation of Range Images

Adaptive triangular meshes are generated from range images in two stages. In the first stage, an adaptive quadrilateral mesh approximating the original range image is obtained. This mesh can be interpreted as the deformation of a uniformly sampled grid so that points tend to concentrate in areas of large curvature although maintaining the regularity constraint. Notwithstanding, no deformation really takes place since the mesh is obtained in a single step with no optimization. The second stage divides each previously obtained quadrilateral cell into two triangles by applying a new technique for choosing the diagonal (flip) that best agrees

with the discontinuities present in that cell. Both stages are described below.

2.1

Generation of Adaptive Quadrilateral Meshes from Range Images

This section describes a technique for obtaining quadrilateral meshes that adapt to the shape of the surfaces contained in a given range image. A complete mathematical description can be found in [4]. Let R ( r, c ) be a range image with R rows and C columns, r ∈ [ 0, R ) , c ∈ [ 0, C ), where each valid pair ( r, c ) denotes a pixel located at row r and column c. Each pixel represents the distance between a 3D surface point and a virtual reference plane orthogonal to the line of sight of the range sensor and at a certain distance opposite it. We will consider that each pixel is codified as a signed integer. In some cases the value corresponding to a certain pixel is unknown. This can happen when a surface is beyond the maximum range able to be measured by the sensor or when there are shadows of the light beam (usually laser) utilized to illuminate the scene. Those pixels are given a constant value β considered to be the background of the image. The generation of an adaptive quadrilateral mesh consists of three steps. First, an estimation of curvature is computed for every pixel of the given range image. Second, the range image is tessellated into a user-defined number of tiles that overlap along one line of pixels. Finally, an adaptive quadrilateral mesh is separately computed for each tile based on the range image and its curvature estimation. These steps are described next. 2.1.1 Curvature Estimation Let R ( r, c ) be the input range image. The objective of this step is the generation of a curvature image K ( r, c ) that gives, for every pixel, an estimation of its curvature. R C First horizontal K rc and vertical K rc curvature estimations are obtained as: C

K rc = R ( r, c – 1 ) – 2R ( r, c ) + R ( r, c + 1 ) R

K rc = R ( r – 1, c ) – 2R ( r, c ) + R ( r, c + 1 ) These estimations are restricted to the interval [0, 255] by setting them to a threshold α = 255 when they grow above α . This ensures that both curvature estimations can be represented by a single byte while keeping enough resolution. The sought curvature is finally obtained as the logical addition of both estimations, which also gives a R C value in the interval [0, 255]: K ( r, c ) = K rc ∨ K rc . Alternatively, background pixels are given a constant curvature value (e.g., 15) that avoids unnecessary concen-

Figure 1: (left) Original range image (rendered with perspective). (right) Curvature image of the given range image.

tration of points along the boundary between the background and valid regions of the image. Fig. 1 shows an example of a real range image and the curvature image obtained by applying this technique. Dark regions represent areas of high curvature. Since points in the final adaptive mesh will tend to group in high curvature areas, in order to favor a good approximation of the boundaries of crease jump edges, the curvature image is thickened by substituting the value of each pixel for the maximum value of itself and its eight neighbors. Fig. 3(left) shows the thickened curvature image obtained from the one shown in Fig. 1(right). Before computing the curvature image, an averaging process could be run on the original range image in order to reduce noise in non-background regions. After trying this procedure, we discarded it since did not lead to significative improvements in the approximation of the tested range images. 2.1.2 Range Image Tessellation In order to obtain a quadrilateral mesh adapted to the different regions of the range image taking into account their particular characteristics, and also in order to favor parallelism, both the given range image and its associated curvature image are partitioned into a user-defined number of rectangular tiles. Each tile is considered to be a small range image upon which further processing is applied. In particular, each range image is divided into H horizontal and V vertical stripes giving rise to HxV different tiles. This partition is not disjoint. A tile shares one row or column of pixels with each of its adjacent tiles. For example, given a 512x512 range image and considering a partition into 16 tiles ( H = V = 4 ), the coordinates of each tile in both directions are comprised in the following intervals: [0..128], [128..256], [256..384], [384..511]. Notice that the last interval is clipped in both directions to 511 and therefore contains 128 pixels instead of 129. Thus, each tile contains R ⁄ V + 1 rows and C ⁄ H + 1 col-

umns of pixels except for clipped tiles that contain R ⁄ V rows and/or C ⁄ H columns. Hereafter, R vh ( r, c ) will represent one tile identified by the number of both the vertical and horizontal stripe it belongs to, v ∈ [ 0, V ) , h ∈ [ 0, H ). The row and column coordinates ( r, c ) are local to the tile: r ∈ [ 0, R ⁄ V ], c ∈ [ 0, C ⁄ H ] . For the sake of simplicity we will consider that there are no clipped tiles. This is equivalent to saying that the range image is extended with a row and a column. K vh ( r, c ) represents the curvature image corresponding to R vh ( r, c ). 2.1.3 Generation of Adaptive Quadrilateral Meshes From Range Image Tiles Given a range image tile R vh ( r, c ) and its corresponding thickened curvature image K vh ( r, c ), the objective of this step is to sample the given tile at R x ζ positions covering the whole tile and adapting to the shape of the surfaces comprised in it with the condition that these positions form a quadrilateral although not necessarily uniform grid. The outcome of this step will be an array of R x ζ points, each point consisting of the row and column coordinates of one pixel contained in the tile. In order to generate this array, each row of the given tile is adaptively sampled at ζ different positions so that points tend to concentrate in high-curvature areas and to disperse in low-variation regions. This is done as follows. Let R vhr ( c ) be a row of pixels and K vhr ( c ) its corresponding curvature profile. This profile is converted to an unnormalized probability density function f vhr that denotes the probability of selecting a given pixel based on its curvature. Logically, points with high curvature will be more likely to be selected than low curvature ones. In order to avoid that areas of high curvature are oversampled, the curvature profile is smoothed by applying a logarithmic transformation function that attenuates high curvatures while keeping low ones, (1) f vhr ( c ) = Γ log ( K vhr ( c ) ) where Γ is a constant experimentally set to 500. Other underlinear transformation functions can also be applied, being also possible the definition of customized behaviors by utilizing, for instance, B-splines. Then, an unnormalized probability distribution function F vhr ( c ) is obtained by “integrating” f vhr ( c ) : c

F vhr ( c ) =

∑f

vhr

( i ) – f vhr ( 0 )

(2)

i=0

F vhr ( c ) is unnormalized since it does not range between zero and one but between zero and a maximum value M . If the image space of F vhr ( c ) is sampled at ζ uniformly distributed points, the application of the inverse distribu–1 tion function F vhr ( y ) to those points leads to a set of ζ

f vhr ( c )

c

ζ uniform samples

F vhr ( c )

c

Figure 3: (left) Thickened curvature image (right) Vertical curves after adaptive horizontal sampling, with H = V = 4 and ζ = 10.

ζ adaptive samples Figure 2: (top) An unnormalized probability density function f vhr ( c ) that represents curvature associated with every pixel c . (bottom) Uniform sampling of the image space of the corresponding unnormalized probability distribution function F vhr ( c ) gives a set of points whose density varies according to f vhr ( c ) .

points adaptively distributed according to f vhr ( c ) . This principle is illustrated in Fig. 2. In our case, since the probability distribution function corresponds to the curvature estimation, the density of points will depend on that curvature and, hence, on shape variations. In the implementation of this method, the values of F vhr ( c ) are tabulated. Then, a set of ζ uniform samples is computed covering the whole image space of the function and at fixed intervals—the smallest (zero) and largest values of F vhr ( c ) are also included. For each of these samples, the table that keeps the values of F vhr ( c ) is sequentially searched until a value larger than the uniform sample is found. The index where this value is found corresponds to the position of the tile’s point that will be selected. Notice that this table has as many entries as pixels a tile’s row contains. Therefore this search is very fast. Moreover, the search corresponding to the next uniform sample starts from the previously found index since F vhr ( c ) is monotonously growing by definition. When this procedure is applied to all rows of the given tile and, for each row, the ζ selected points are displayed in their original positions in the tile, a set of “vertical” curves is obtained (see Fig. 3). This curves determine the columns of the final mesh. Note that they tend to approach in areas of high curvature and to disperse in low variation regions. Moreover, in those areas without curvature information, such as the background, curves are uniformly distributed like in uniform sampling. It is important to realize that owing to the overlap between adjacent tiles, the same distribution of selected points is obtained at the common boundary. Hence, curves belonging to adjacent patches join smoothly. The final result is a complete range image sampled in vertical

Figure 4: (left) Horizontal and vertical sampled points with H = V = 4 and R = ζ = 10. (right) Same number of points with uniform sampling.

curves that adapt to the shape of the individual tiles that make up the whole range image. The next step samples each of those curves at R different positions for every tile. The principle is similar to the one applied before, but now the curvature profiles utilized to obtain the unnormalized probability density function f are not obtained from rows of pixels but from the pixels that make up one of the curves. Each vertical curve inside a tile is traversed and the curvature values associated with its pixels are stored in a vector utilized as a new curvature profile. Given this curvature profile, an unnormalized probability density function and its corresponding unnormalized probability distribution function are computed similarly to (1) and (2) but now considering that the input parameter is the row number instead of the column number used before. In the end, each vertical curve of each tile is adaptively sampled at R positions that adapt to the shapes contained in the tile with independence from the other tiles. Again, the overlap between adjacent tiles guarantees the continuity of rows of pixels between horizontal adjacent tiles. Fig. 4 shows the set of points obtained in this way and compares the result with a uniform sampling obtained with the same number of points. Notice how points tend to concentrate in areas of high curvature and to disperse in

the number of rows and columns in which every tile is sampled. Each node of the quadrilateral mesh contains the row and column of a pixel of the range image and its corresponding value (depth measure). By construction, these quadrilateral meshes adapt to the details of the surfaces contained in the range image and keep the constraint that all cells are quadrilateral. The objective now is to divide each of those cells into two triangles in order to obtain a triangular approximation of the given range image. Since this triangulation comes from a quadrilateral mesh, triangles will keep an acceptable aspect ratio and will be uniformly distributed over the whole surface while, at the same time, will adapt to shape details. Several approaches have been proposed in the literature to perform the only apparently trivial operation of triangulating a quadrilateral cell. The problem consists of choosing the right diagonal used to split that cell—sometimes referred to as choosing the right flip. 2.2.1 Previous Approaches

Figure 5: (top) Uniform quadrilateral mesh with 37x37 nodes. (bottom) Adaptive quadrilateral mesh with 37x37 nodes.

low variation regions. Uniform sampling is obtained in no variation regions such as the background. The final adaptive quadrilateral mesh is trivially computed by joining all those points horizontally and vertically. Each node of the mesh contains the row and column number of the selected point and its pixel value (distance with respect to the sensor’s reference plane). A more detailed mathematical description of the previous steps necessary to obtain an adaptive quadrilateral mesh can be found in [4]. Fig. 5 shows the uniform (top) and adaptive (bottom) quadrilateral meshes that approximate the given range image with 37x37 points each. Notice that the uniform mesh misses details that are captured by the adaptive mesh—take a look at the jump and crease edges marked on the figure. In order to display these images, each quadrilateral cell has been split up into two triangles by applying the technique described below.

2.2

Data-Dependent Triangulation of Quadrilateral Cells

The outcome of the previous stage is a quadrilateral mesh with ( R – 1 ) V + 1 rows and ( ζ – 1 ) H + 1 columns, H and V being the number of horizontal and vertical partitions of the range image into tiles and R and ζ

A popular method consists of choosing the diagonal that maximizes the minimum of all angles of the resulting triangles. This heuristic is known as the Lawson’s maxmin optimality criterion and is used to incrementally generate Delaunay triangulations (see [7] for a recent survey on triangulation algorithms). However the problem of this technique is that the original surface (range image in our case) is not considered for the diagonal choice. That may lead to incorrect behaviors when either surface or orientation discontinuities are present in the cell, since edges can be cut off by wrongly chosen diagonals. The solution to this problem involves the application of a data-dependent triangulation [8] that takes into account the underlying shape of the surfaces contained in the cell. Two different criteria are proposed in [8]. The first one takes into account the normals of the triangles and chooses that combination of triangles with a minimum angle between their normals. This heuristic will not preserve discontinuities though and, therefore, it is not useful in our context, since edges will be cut off. The second approach proposed in [8] interpolates a polynomial surface to the set of points of the given quadrilateral mesh and, for each quadrilateral cell, chooses the flip that minimizes the average sum of squares of the differences between the interpolating surface and the original range image. This method can be simplified by considering the difference (vertical distance) between each of the two possible triangulations and the pixels covered by those triangles (the pixels contained in the projection of each triangle upon the range image reference plane). The objective then is to choose the triangulation that produces the lowest difference and, hence, error.

C●



D



D

B ● ●

A C● B ● ●

A

Figure 6: Possible triangulation of four points and their respective approximation error volumes shown in grey.

However, this technique does not always work properly. Let us consider the following extreme case. Suppose we want to approximate a wall perpendicular to a planar surface. Only four points are considered: two points on top of the wall (C,D) and two more points on the planar surface (A,B) as shown in Fig. 6. Those points admit two possible triangulations. Following [8], we would chose the flip that produces the lowest error with respect to the original surface (the orthogonal planes). This is to say the flip that produces the lowest error volume. Error volumes are shown as dark regions in the figure. Therefore, the flip on top would be chosen as best. However, this flip is not convenient since it does not preserve the surface discontinuity. Thus, edge AB would cut off the wall while the bottom flip would preserve its shape although with the logical deformation owing to the separation between A and B. This means that in order to keep discontinuities and thus the shape of the underlying surfaces, the error criterium is not always reliable. On top of this problem, the computation of volume errors is quite costly. For every pixel of the range image it is necessary to consider the intersection between the vertical straight line that passes through it and the two possible triangles that may cover that pixel. The error volume is obtained by adding the lengths of the segments between each pixel’s value (in 3D space) and the intersection with its covering triangle. In addition, given a pixel it is also necessary to determine which triangle covers it or, alternatively, given a triangle, what pixels are covered by it. Both options are quite costly as well. That efficiency problem could be reduced by measuring the approximation error at a few pixels for every triangle instead of at all pixels covered by the triangle. We have experimented with this alternative by measuring the approximation error between each triangle and four interior points distributed over it. The results show that this

Figure 7: Triangulation of an adaptive quadrilateral mesh through an error-based diagonal selection algorithm (quadrilateral cells are shown in wireframe while triangles are shaded).

error criterium tends to produce artifacts along edges, leading to flips that do not always agree with the orientation of discontinuities (see Fig. 7 and compare it with the result obtained with the proposed technique shown in Fig. 5[bottom]). A similar problem worsened by a downfall in performance is obtained by applying techniques based on energy functions [9]. The energy of the flip chosen in Fig. 6[top] would be considered to be lower than the one corresponding to the bottom figure and, thus, the top flip would be chosen. A different approach to the diagonal selection problem proposed in [10] and based on choosing the diagonal whose 3D length is smallest will also choose the top flip given the four points we have used for this example. In this paper a different technique is proposed to triangulate a quadrilateral cell taking into account the discontinuities contained in it. This technique is general in the sense that can be applied to all kinds of quadrilateral meshes: adaptive and uniform. The proposed technique is composed of three steps. First, the 2D gradient vector associated with each pixel of the given range image is estimated. Second, for each quadrilateral cell, an estimation of the overall gradient associated with the pixels traversed by each of its two possible diagonals is computed. Finally, the diagonal whose direction is closest to the perpendicular to that gradient vector is chosen as the one which best keeps the underlying discontinuities in the cell. These steps are described next. 2.2.2 2D Gradient Estimation Let R ( r, c ) be the given range image. The objective now is the generation of a gradient image G ( r, c ) that keeps, for every pixel of the range image, a 2D vector that represents the projection onto the range image reference plane of the normal to the surface corresponding to that

pixel. The norm of this vector is proportional to the magnitude of the derivative of the underlying surface at that pixel. The gradient image is obtained as follows: G ( r, c ) = { G h ( r, c ) , G v ( r, c ) } G h ( r, c ) = R ( r, c – 1 ) – R ( r, c + 1 ) G v ( r, c ) = R ( r – 1, c ) – R ( r + 1, c ) According to this formulation, the gradient vector associated with pixels belonging to surface and orientation discontinuities (surface edges) will be perpendicular to that discontinuity and with a norm proportional to the edge sharpness. On the contrary, pixels located over low variation regions will have a quite small gradient vector. Finally, the gradient image is filtered to reduce fast changes of orientation of the gradient vectors associated with neighboring pixels. These changes of orientation can be produced by noise present in the input range image. Specifically, the 2D gradient vector at each pixel is substituted for the composition of the gradient vectors associated with that pixel and its eight neighbors. The composition of two 2D vectors, v = ( v 1, v 2 ), w = ( w 1, w 2 ) , is done as follows:  ( v 1 + w 1, v 2 + w 2 ) v ⋅ w > v ⋅ ( – w ) (3) v⊕w =  otherwise  ( v 1 – w 1, v 2 – w 2 ) where v ⋅ w is the dot product between both vectors. This procedure ensures that the composition of two vectors in the opposite direction is a vector with the same orientation and reinforced norm—with conventional vector addition, vectors in the opposite direction tend to be cancelled. 2.2.3 Resultant Gradients Associated with the Diagonals of a Quadrilateral Cell Let us consider each quadrilateral cell of the adaptive quadrilateral mesh obtained above. Each cell is composed of four points: { C i, j , C i, j + 1, C i + 1, j , C i + 1, j + 1 } , where C i, j is the top-left cell’s node and C i + 1, j + 1 the bottomright cell’s node. The components of C i, j are the row and column of a pixel and its corresponding value: C i, j = { r i, j , c i, j , R ( r i, j , c i, j ) }. The goal of this stage is to obtain, for each of the two possible diagonals that can split up that cell, a resultant gradient vector obtained by composing (3) the gradients associated with the pixels traversed by that diagonal. That resultant gradient will describe the orientation of the discontinuities crossed by the given diagonal. Thus, if a certain diagonal crosses an edge separating two low variation regions, the resultant gradient will tend to have a direction orthogonal to that edge, since gradients associated with low variation regions are small and will not significantly affect the final composition. Two diagonals are considered for each cell: + D i, j = { C i, j , C i + 1, j + 1 } and D –i, j = { C i, j + 1 , C i + 1, j }. In both cases, the set of pixels traversed by a diagonal is determined by applying Bresenham’s algorithm [11] to “draw” a straight line between the pixels corresponding to

the initial and final nodes of the cell. For example the pix+ els traversed by D i, j are the ones obtained by applying Bresenham’s algorithm between pixel ( r i, j , c i, j ) and ( r i + 1, j + 1 , c i + 1, j + 1 ) , both included. In order to take into account aliasing effects due to the discretization of that straight line, the latter is thickened by adding, for each pixel, its neighbors above and below. In summary, given a certain diagonal, a set of pixels is selected. Then, the gradient vector associated with that diagonal is obtained by composing, using (3), the 2D gradient vectors G ( r, c ) corresponding to each selected pixel from the set. Finally two resultant gradients are + obtained, G i, j and G –i, j , one for each diagonal. 2.2.4 Diagonal Selection The two resultant gradients obtained above describe the orientation of the discontinuities traversed by the two possible diagonals. From those gradients, the one with largest norm is chosen as the final representative of the orientation of the discontinuities that are potentially involved in the diagonal selection process. Let G i, j = { G [ i, j ] h, G [ i, j ] v } be that final resultant gradient associated with cell ( i, j ) . Next a tangent vector is computed as: T i, j = { T [ i, j ] h, T [ i, j ] v } = { G [ i, j ] v, – G [ i, j ] h }. Since this tangent is orthogonal to the resultant gradient vector, it agrees with the orientation of the discontinuities present in the cell. The objective now is to choose as splitting diagonal the one whose direction is the most similar to the direction of T i, j . Let β i, j be the orientation of T i, j obtained as β i, j = atan (T [ i, j ] v ⁄ T [ i, j ] h ) . The orientations of both diagonals are obtained as r i + 1, j + 1 – r i, j r i + 1, j – r i, j + 1 – + α i, j = atan  ------------------------------------  α i, j = – atan  ------------------------------------  c i + 1, j + 1 – c i, j c i + 1, j – c i, j + 1 Let us consider δ = α i, j – β i, j . The minimum angle between T i, j and diagonal D + is defined as +

+

i, j

+  δ+ δ ≤π⁄2 µ =   π – δ + otherwise – – The minimum angle µ between T i, j and D i, j is + defined analogously. Finally, diagonal D i, j is selected to + split up the given quadrilateral cell if µ ≤ µ – . Otherwise, diagonal D –i, j will be selected. +

3

Experimental Results

The proposed technique has been applied to approximating real range images containing both surface and orientation discontinuities (jump and crease edges). Since this technique is devised to improve the quality of approximation of edges and they usually cover a small percentage of the overall range image, improvements are qualitative rather than quantitative and, hence, they are better appreciated through images of the final result.

4

Figure 8: (top) Adaptive quadrilateral mesh with 37x37 nodes and error-based diagonal selection. (bottom) Same quadrilateral mesh and gradient-based diagonal selection.

This paper presents an efficient technique for generating adaptive triangular meshes from range images. Initially, the algorithm generates an adaptive quadrilateral mesh from the range image. This mesh is more accurate than a uniformly sampled one since it distributes the same number of points considering the curvature of the surfaces contained in the range image. Then, each quadrilateral cell is divided into two triangles by choosing one of the two possible diagonals. This choice is based on a selection algorithm that analyzes the orientation of the gradient at the pixels traversed by those diagonals. The proposed diagonal selection technique is general in the sense that can be applied to any kind of quadrilateral meshes (adaptive or uniform). The current technique only tries diagonal flips inside quadrilateral cells. An immediate improvement consists of trying to flip edges that originally define the quadrilateral cells. A further line of research will consist of automatically determining the number of rows and columns of the quadrilateral mesh and thus the number of points and triangles of the final triangular mesh so that the density of points may be dynamically determined. An implementation of this technique in C is available by contacting the authors.

5 [1]

The example used so far corresponds to a 197x187 (rows x columns) range image. This image has been split up into 4 by 4 tiles (H = V = 4) and 10 by 10 points have been adaptively sampled at each tile. After a 37x37 adaptive mesh is generated, its quadrilateral cells are split up using the technique proposed above. Fig. 5(bottom) shows the final result of applying the proposed technique. Quadrilateral cells are shown in wireframe while triangles are shaded. In contrast, Fig. 7 shows the same quadrilateral mesh triangulated using the error-based diagonal selection method described in section 2.2. Notice the artifacts along edges in the latter. Finally, Fig. 5(top) shows the approximation of the original range image from a uniform quadrilateral mesh with the same number of points and applying our diagonal selection algorithm. The CPU time to compute the final triangulation was 0.60 sec. on a 200 MHz R4400 SGI Indigo II. From this time, 0.25 sec. were used by the diagonal selection algorithm. Fig. 8(bottom) shows another example of the application of the proposed technique to a different range image with 188x208 pixels. Fig. 8(top) shows the same quadrilateral mesh but using the error-based diagonal selection algorithm instead of our gradient based one. The improvement along edges is noticeable. The CPU time to obtain the final triangular mesh was 0.65 sec. from which 0.30 correspond to the diagonal selection algorithm and the rest to the adaptive quadrilateral mesh generation.

Conclusions and Further Improvements

References

M. A. García and L. Basañez, Fast extraction of surface primitives from range images, 13th IAPR Int. Conf. on Pattern Recognition, Vol. III: Applications and Robotic Systems, Vienna, Austria, August 1996, 568-572. [2] M. A. García and L. Basañez, Efficient free-form surface modeling with uncertainty. IEEE Int. Conf. on Robotics and Automation, Minneapolis, USA, April 1996, 1825-1830. [3] M. A. García, Fast approximation of range images by triangular meshes generated through adaptive randomized sampling. IEEE Int. Conf. on Robotics and Automation, Nagoya, Japan, May 1995, 2043-2048. [4] M. A. García, A. D. Sappa and L. Basañez, Fast Generation of Adaptive Regular Meshes from Range Images. Technical Report, Institute of Cybernetics, October 1996. [5] M. Soucy, A. Croteau and D. Laurendeau, A multiresolution surface model for compact representation of range images, IEEE Int. Conf. on Robotics and Automation, 1992, 1701-1706. [6] L. DeFloriani, A pyramidal data structure for triangle-based surface description. IEEE Computer Graphics and Applications, pp. 67-78, March 1989. [7] S. Kumar, Surface Triangulation: A Survey. Technical Report, Department of Computer Science, University of North Carolina, January 1996. [8] L.L Schumaker, Triangulations in CAGD. IEEE Computer Graphics and Applications, pp. 47-52, January 1993. [9] Hoppe et al., Mesh Optimization. SIGGRAPH ‘93, 19-26. [10] M. Rutishauser, M. Stricker and M. Trobina, Merging Range Images of Arbitrarily Shaped Objects. IEEE Int. Conf. on Computer Vision and Pattern Recognition, 1994, 573-580. [11] T. Pavlidis, Algorithms for Graphics and Image Processing. MD Computer Science Press, 1982.