Segmentation of Discrete Vector Fields - Semantic Scholar

Report 5 Downloads 162 Views
IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS,

VOL. 12,

NO. 3,

MAY/JUNE 2006

1

Segmentation of Discrete Vector Fields Hongyu Li, Wenbin Chen, and I-Fan Shen Abstract—In this paper, we propose an approach for 2D discrete vector field segmentation based on the Green function and normalized cut. The method is inspired by discrete Hodge Decomposition such that a discrete vector field can be broken down into three simpler components, namely, curl-free, divergence-free, and harmonic components. We show that the Green Function Method (GFM) can be used to approximate the curl-free and the divergence-free components to achieve our goal of the vector field segmentation. The final segmentation curves that represent the boundaries of the influence region of singularities are obtained from the optimal vector field segmentations. These curves are composed of piecewise smooth contours or streamlines. Our method is applicable to both linear and nonlinear discrete vector fields. Experiments show that the segmentations obtained using our approach essentially agree with human perceptual judgement. Index Terms—Hodge decomposition, Green Function Method, normalized cut, vector field segmentation, streamline, contour, approximation.

æ 1

INTRODUCTION

S

INCE it is difficult to observe and understand the complex structure of vector fields, the problem of partitioning a vector field has, therefore, become a significant concern for the exploratory study in visualizing vector data. Furthermore, with the increase in the precision of computational simulation and Computational Fluid Dynamics (CFD), very large vector data sets become readily available. As a result, more efficient and feasible methods to cluster and segment vector fields from these large vector data set become imperative. Telea and Wijk [1] have developed a bottom-up approach for clustering vector data. Initially, each vector data is considered as a separate cluster. Similar clusters are merged according to the difference in position and orientation of vectors that represent those clusters. The merging process continues until no similar clusters can be found. The cluster shapes are constrained indirectly by adapting to the weights of the various terms in the error measure. However, this method is sometimes easily affected by the weight tuning. Heckel et al. [2], [3] considered a top-down approach. All points are initially sorted in a single cluster. Then, this cluster is recursively split. At each step, the discrepancy between streamlines generated by the original field and its approximation is calculated. The cluster with the strongest discrepancy is bisected with a plane, using principal component analysis. The final clusters are guaranteed to be convex as a result of this bisection approach. An accurate representation of the complete fields with convex clusters, however, may require a large cluster count.

. H. Li and I.-F. Shen are with the Department of Computer Science and Engineering, Fudan University, Shanghai 200433, China. E-mail: {hongyuli, yfshen}@fudan.edu.cn. . W. Chen is with the Department of Mathematics, Fudan University, Shanghai 200433, China. E-mail: [email protected]. Manuscript received 23 Jan. 2005; revised 17 Sept. 2005; accepted 21 Sept. 2005; published online 10 Mar. 2006. For information on obtaining reprints of this article, please send e-mail to: [email protected], and reference IEEECS Log Number TVCG-0007-0105. 1077-2626/06/$20.00 ß 2006 IEEE

Garcke et al. [4], [5] proposed a continuous clustering method for vector field based on diffusion. A well-known physical clustering model, the Cahn Hillard model which describes phase separation, is modified to reflect the properties of the data. Clusters are defined implicitly as connected components of positivity set of a density function. An evolution equation for this function is obtained as a suitable gradient flow of an underlying anisotropic energy functional. Here, time serves as the scale parameter. The evolution is characterized by a successive coarsening of patterns and the underlying simulation data specifies preferable pattern boundaries. However, appropriate interfacial energies are needed for different applications and the skeleton shapes are required to be classified in detail. Many important related works on topological simplification and clustering have been presented in [6], [7], [8], [9], [10], and [11]. Tricoche et al. [10], [11] proposed a method that simplifies the topology of a vector field defined on a 2D structured grid. They considered singularities as the key elements and combined close simple singularities into a higher order singularity. Our method has a lot in common with topological simplification techniques. We also consider singularities as the key elements in the segmentation process. However, our research is different from these techniques. In particular, our work is based on the Hodge decomposition [12], [13] such that the feature information about singularities is faithfully transferred from vector fields to scalar fields. Moreover, the feature of singularities is studied at a scalar field, not directly at a vector field. Recently, a modified normalized cut algorithm [14] was extended successfully for hierarchical vector field segmentation. The basic idea is to model a vector field as an undirected, weighted graph. The connection weight between each pair of nodes in the graph is computed from a similarity measure that takes into consideration both Euclidean distance between point pairs and the difference in vector values. Then, the segmentation method based on normalized cut is applied to linear vector fields. The segmentations capture the qualitative and topological Published by the IEEE Computer Society

2

IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS,

nature of linear vector fields. The method, however, works poorly for nonlinear vector fields. The objective of partitioning vector fields is to group together similar vectors that are associated with the same singularities according to the dominant topological structure of vector fields. In this paper, we propose a novel approach based on GFM and normalized cut for segmenting discrete vector fields. The method is inspired by discrete Hodge decomposition such that a discrete vector field can be decomposed into three simpler components. At the same time, a refinement method with streamlines or contours is developed to make our segmentation better approximate to human perceptual judgement. Consequently, the segmentation curves attained are composed of piecewise smooth contours or streamlines. The results generated from our experiments are consistent with human perceptual judgement. Moreover, our method is not limited to linear discrete vector fields, but it is equally applicable to nonlinear vector fields. The paper is organized as follows: Section 2 shows how to compute scalar potential and stream functions with the Green function and how to define a decision criterion to select an appropriate scalar function. The original normalized cut algorithm and the refinement procedure are briefly described in Section 3. Results of our experiments are shown in Section 4. Section 5 concludes the paper and discusses possible future direction in this field.

2

DECOMPOSITION OF VECTOR FIELDS AND GREEN FUNCTION METHOD

2.1 Discrete Hodge Decomposition The Hodge decomposition is a well-known method to decompose a smooth vector field vf in a region into three intuitive and useful components: vf ¼ r þ r þ h;

ð1Þ

where r is the gradient operator, r  is the curl operator,  is a scalar potential function such that r  ðrÞ ¼ 0, is a scalar stream function such that r  ðr Þ ¼ 0, where r  is the divergence operator, and h is the harmonic vector field that satisfies rh ¼ 0 and rh ¼ 0. In general, the harmonic field is far smaller than the other two components on simply connected domains. For the convenience of computation, we assume that vector fields considered in this paper occur on simply connected domains and ignore the harmonic component. Due to the special property of the potential function, r  ðrÞ ¼ 0, r is called the curl-free component, while r is called the divergence-free component for r  ðr Þ ¼ 0. Hodge decomposition is particularly helpful for exploring topological structures of vector fields by analyzing and studying the scalar functions,  and , instead of the vector field vf . Nevertheless, the original Hodge decomposition is only well defined for differential vector fields. One has to extend this smooth definition to the discrete setting for computational purposes. It is not a trivial matter as even the divergence or curl operation for discrete data needs to be

VOL. 12,

NO. 3,

MAY/JUNE 2006

properly defined. Discrete Hodge decomposition on regular grids has already been adopted in graphics (see [15], [16] for instance) and is relatively straightforward to implement with a finite-difference approach. Recently, Polthier and Preuss [12], [13] have successfully derived a technique for 2D discrete vector fields. Tong et al. [17] have extended previous works [12], [13], [16] to discrete vector fields on 3D meshes. From these, we know that the discrete version of the smooth operators, divergence and curl, have intuitive physical meaning that matches their smooth counterparts. The discrete Hodge decomposition of vector fields can therefore be formulated as follows: For a discrete vector field v f in a certain region, one could uniquely find a scalar potential function , a scalar stream function , and a harmonic vector field h satisfying with the property: vf ¼ r þ r þ h: To calculate the scalar functions,  and Function Method will be used.

, the Green

2.2 Scalar Potential Function Using the smooth Hodge decomposition as a guide, we wish to find a scalar potential function  such that its spatial gradient r best captures the curl-free part of the original vector field vf . In the smooth case, this component corresponds to the projection of vf onto the space of curl-free fields. Thus, a natural, globally-optimal function  can be defined by minimizing the following quadratic functional: Z JðÞ ¼ ðr  vf Þ2 dr: ð2Þ 

Theorem 1. For a discrete vector field vf in a close domain , there exists a scalar potential function  whose gradient can best approximate the original vector field vf in the least squares sense while minimizing the expression JðÞ. The above theorem can be easily proved and the details of the derivation are not provided here due to space limitation. Polthier and Preuss [12] have used the conjugate gradient method to solve the above potential function . Here, we propose a simpler method to compute . Our method is based on the convolution operation where the Green function acts as the convolution kernel. The particular description of the convolution operation is as follows: Z ðrÞ ¼ rGðr  r0 Þ  vf ðr0 Þdr0 ; ð3Þ 

where r is a coordinate vector: r ¼ ðx; yÞ; vf ðr0 Þ represents the velocity vector at the position r0 : vf ðr0 Þ ¼ ðvf ðxÞ; vf ðyÞÞ and Gðr  r0 Þ is the Green function. Note that the Green function G is only required to satisfy the P DE equation in the domain , i.e.,  4Gðr  r0 Þ ¼ ðr  r0 Þ;

r; r0 2 :

The boundary condition of the Green function needs not be satisfied. So, strictly speaking, we cannot consider the

LI ET AL.: SEGMENTATION OF DISCRETE VECTOR FIELDS

3

function G as a Green function, but as basis solution. Without a boundary condition, the function G will be a Green function. The above method for calculating the scalar function ( or ) using the convolution operation of the Green function is called Green Function Method (GFM). Theorem 2. The scalar potential function  corresponding to a discrete vector field vf in a close domain  can be computed by GFM. That is, (3) can be used to find the potential  whose gradient provides best approximation to vf in the least squares sense. Proof. We ignore the harmonic component and replace vf with the scalar potential and stream functions. The convolution operation of the Green function in the region  can be modified as follows: Z rGðr  r0 Þ  vf ðr0 Þdr0  Z ¼ rðr0 Þ  rGðr  r0 Þdr0 þ ð4Þ  Z r  ðr0 Þ  rGðr  r0 Þdr0 : 

In the right side of (4), the two parts will be considered separately. According to the Green formula, R the first part  rðr0 Þ  rGðr  r0 Þdr0 can be divided into two parts again. Z rðr0 Þ  rGðr  r0 Þdr0  Z @ Gðr  r0 Þdr0  ¼ ðr0 Þ ð5Þ @n @ Z ðr0 Þ 4 Gðr  r0 Þdr0 ;

Z

r  ðr0 Þ  rGðr  r0 Þdr0



¼

Z Z

ðr  ðr0 Þ  nÞGðr  r0 Þdr0 



r  ðr  ðr0 ÞÞ  Gðr  r0 Þdr0 :



Note that r  ðr  Þ ¼ 0, r   n represents the tangent derivative of the stream function and is equal to zero, it is easy to see that Z r  ðr0 Þ  rGðr  r0 Þdr0  Z @ ð9Þ Gðr  r0 Þdr0 þ 0 ¼ @ @ ¼ 0: Combining (8) and (9), the following formula can be obtained, Z rGðr  r0 Þ  vf ðr0 Þdr0 ¼ ðrÞ: 

In other words, the optimal potential function  can be computed by the convolution operation of the Green function. u t Remark. We generalize the definition of the Green function to reflect the near-field effect. In general, the Green function can be defined in the following three ways: Gðri  rj Þ ¼ e Gðri  rj Þ ¼ 

Because of  4 Gðr  r0 Þ ¼ ðr  r0 Þ and the definition of the convolution, we know that Z  ðr0 Þ 4 Gðr  r0 Þdr0 Z  ð7Þ ¼ ðr0 Þðr  r0 Þdr0 

¼ ðrÞ: By substituting (6) and (7) into (5), we get Z rðr0 Þ  rGðr  r0 Þdr0 ¼ ðrÞ: 

ð8Þ

R The expression  rðr0 Þ  rGðr  r0 Þdr0 essentially amounts to the potential : Meanwhile, we also know that the second part of the right-hand side of (4) is

;

ð10Þ

1 ln kri  rj k; 2

ð11Þ

1 : kri  rj k

ð12Þ



where n represents the normal direction at the position r0 . Since, for vector field segmentation, there are no vectors near the boundary, we do not consider the boundary effect and assume  ¼ 0 on the boundary @. Hence, Z @ ðr0 Þ Gðr  r0 Þdr0 ¼ 0: ð6Þ @n @

kri rj k 

Gðri  rj Þ ¼ 

In effect, all these three functions work equally well in our experiments. Here, we use function (10) where  is the scaling factor to modulate the function value. The discrete version of (3) can be written as: X ðri Þ ¼ rGðri  rj Þ  vf ðrj Þ:

ð13Þ

j

The definitions of parameters in (13) are identical with those of their continuous counterparts.

2.3 Scalar Stream Function Keeping the smooth Hodge decomposition in mind, we wish to find a scalar stream function whose curl captures the divergence-free part of the vector field vf . Like the potential function, we can prove that if the stream function is the minimizer of the following quadratic functional: Z Jð Þ ¼ ðr   vf Þ2 dr; ð14Þ 

its curl r  can essentially give the best fit to vf in the least squares sense.

4

IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS,

Moreover, the stream function can be solved by the following formula: Z r  Gðr  r0 Þ  vf ðr0 Þdr0 ðrÞ ¼  X ð15Þ ¼ r  Gðri  rj Þ  vf ðrj Þ j

The definitions of parameters are similar to those shown in the last section. We do not provide the detailed explanation here.

2.4

Decision Criterion for Selecting a Scalar Function As mentioned above, generally, the harmonic component can be ignored during computation since it only accounts for little in the whole vector field. The scalar potential  also plays different roles from the scalar stream in the process of the Hodge decomposition. Here, we wish to find an optimal scalar function h which is either a potential  or a stream function and we use it to obtain the best approximation of the vector field vf . For the purpose of determining h, we define e as the difference between the vector field vf and the approximate field r in the sense of Frobenius norm and e as the difference between vf and r  in the same sense: e ¼ kvf  rkF e ¼ kvf  r  kF : Frobenius norm [18] is used to represent the approximation error of vector field. These two definitions are similar with those of functionals (2) and (14). Their difference is that functionals (2) and (14) are represented by L2 norm in the Sobolev function space. For the convenience of computation, we use Frobenius norm in practice rather than L2 norm, since the calculus function is not clearly defined. The decision criterion  for finding the optimal scalar function h can be defined as the ratio between e and e ,  ¼ e =e : If   1, it means that the vector field r  is closer to vf . Therefore, one selects the scalar stream function instead of vf to complete the task of segmentation. On the other hand, if  < 1, the scalar potential function  is chosen to replace vf because its gradient r is a better approximation for vf , i.e.,    < 1; h ¼   1: When  is far from 1, an optimal scalar function h to be partitioned can be easily found by our method. However, if  is close to 1, neither potential nor stream functions can work well separately. This problem could be due to the fact that some information is lost while using our alternative decision method. A new strategy is needed to take both potential and stream functions into account. Simple linear combination can reduce the information lost, but the empirical result is still not desirable.

VOL. 12,

NO. 3,

MAY/JUNE 2006

2.5 Examples In Figs. 1 and 2, two examples are provided to illustrate the generation of the optimal scalar function h with GFM. Fig. 1a is an original vector field vf with two singularities, a source and a sink, where the divergence-free component can be ignored for it is trivial. Here,  ¼ 0:1656 < 1; therefore, take h ¼ . Fig. 1b presents the optimal scalar function h where each box represents a discrete data point and the color of the box stands for the function value of h with  ¼ 2. In Fig. 1c, the vector field is the gradient of h with the least approximation error to vf , 1.8723, in the sense of Frobenius norm. Fig. 2a is another vector field composed of two symmetrically placed circular singularities, where the curl-free component is relatively unimportant. Here,  ¼ 1:4278 > 1; therefore, take h ¼ . Fig. 2b is the optimal scalar function h where the parameter  ¼ 1:8. Fig. 2c is the curl of h with the least approximation error, e ¼ 7:8711. If the singularities are with the shape of focus shown in Fig. 3a,  ¼ 1:1811 is close to 1. According to our decision criterion, h should be equal to the stream function (Fig. 3c). Although can continue to work in this case, the effect is not desirable: In the lower part of Fig. 3c, the boundary between two focus regions is still clear; but in the upper part, the irregular variation of elements leads that the boundary becomes blurry. Potential function  (Fig. 3b) faithfully preserves the symmetry of the original vector field, but it cannot work well alone. 2.6 Analysis of Parameter  of (10) is the scaling factor to modulate the Green function value and it is generally larger than 1. It is obvious that the Green function value is directly proportional to . The larger the  is, the larger the function value will be. Furthermore, the Green function value will immediately influence the value of the scalar function h. Therefore  indirectly determines h. An appropriate  can provide us with an optimal h, satisfying that either its gradient or its curl gives the best fit to the vector field vf . Our experiments show that when the parameter  is close to 2, the computed h will be optimal, which can also prove correct theoretically. Fig. 4 shows the relation between the approximation error and the parameter , where the horizontal axis represents the value of  and the vertical direction corresponds to the error between vf and the approximate vector field, either r or r  . Fig. 4a represents the variation of the approximation error e obtained from Fig. 1 with . In fact, when  ¼ 2, e ¼ 1:8723 is the smallest error. Fig. 4b shows the variation in the approximation error e with  of the example shown in Fig. 2. e become smallest at 7.8711, when  is equal to 1.8.

3

DISCRETE VECTOR FIELD SEGMENTATION

Directly splitting discrete vector fields is relatively difficult because there exists much more feature information in vector fields and their topological structures are relatively complex in comparison with scalar fields. Inspired by the discrete Hodge decomposition, we manage to convert the problem of discrete vector field segmentation into partitioning a scalar data set h by GFM since the dominant feature

LI ET AL.: SEGMENTATION OF DISCRETE VECTOR FIELDS

5

Fig. 1. The generation of the scalar function h with GFM. (a) The vector field vf with two singularities, a source and a sink, where the divergence-free component is trivial. (b) The optimal scalar function h ¼  since  ¼ 0:1656, where  ¼ 2. (c) This vector field is the gradient of h with the least approximation error to vf , e ¼ 1:8723. (a) The original vector field vf . (b) The scalar potential . (c) The approximate vector field r.

Fig. 2. The generation of the scalar function h with GFM. (a) The vector field vf with two circular singularities symmetrically placed, where the curlfree component is relatively unimportant. (b) The optimal scalar function h ¼ since  ¼ 1:4278, where  ¼ 1:8. (c) This vector field is the curl of h with the least approximation error to vf , e ¼ 7:8711.

information of vector fields such as direction, magnitude, and symmetry can be transferred to h faithfully in the process of GFM. In the scalar data clustering community, there are many works on using methods such as the minimal spanning tree, dominant set of vertices, and the minimum cut. The normalized cut method is a variation of the minimum cut. During segmentation, it considers both low-level (local, e.g., magnitude or coherence) and high-level (global, e.g.,

symmetry) feature information. Either global or local features can be saliently emphasized by modifying related parameters. However, other clustering methods based solely on low-level cues can hardly produce a complete final correct result. The optimal vector field segmentation should be consistent with perceptual knowledge; that is, vector data around a singularity should be grouped together. Therefore, final segmentation curves are composed of piecewise smooth contours or streamlines. The segmentation result

6

IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS,

VOL. 12,

NO. 3,

MAY/JUNE 2006

Fig. 3. Generating  and psi with GFM. The original vector field is composed of two foci where neither potential nor stream functions can work well alone. (a) The original vector field vf . (b) The scalar potential . (c) The scalar stream .

Fig. 4. The relation between the approximation error and the parameter . The horizontal axis represents the parameter  and the vertical axis corresponds to the error between the original and the approximate vector fields. (a) The approximation error e of the vector field (Fig. 1a), which varies with  and becomes the smallest at 1.8723, when  ¼ 2. (b) The approximation error e of the vector field (Fig. 2a), which varies with  and becomes the smallest at 7.8711, when  ¼ 1:8.

obtained with the normalized cut method provides coarse region boundaries of vector fields. To search for perceptually finer region boundaries, we propose a refinement procedure to adjust segmentation curves with smooth contours or streamlines of vector fields.

In Section 2, we have introduced a method of converting vector fields into scalar data sets using GFM. In this section, the normalized cut method proposed by Shi and Malik [19] will be implemented to partition scalar data sets. Also, we will discuss our refinement method with smooth contours or streamlines in detail.

LI ET AL.: SEGMENTATION OF DISCRETE VECTOR FIELDS

7

Fig. 5. The segmentation of a vector field (Fig. 1a) with two singularities, a sink and a source. (a) The final segmentation of the vector field. The red line represents the boundary between the influence regions of these two singularities. (b) The primary contours of the vector field.

3.1 Normalized Cut The normalized cut method first models a given scalar data set as a weighted, undirected graph T ¼ ðV ; E; W Þ, where V is a set of nodes, E a set of edges, and W a weight matrix. The positive weight wði; jÞ on an edge connecting two nodes i and j denotes the similarity between i and j. As a rule, wði; jÞ is defined as the product of feature similarity and spatial proximity: wði; jÞ ¼ e

kF ðiÞF ðjÞk i

e

kQðiÞQðjÞk x

;

ð16Þ

where QðiÞ is the spatial coordinate of node i and F ðiÞ is its feature value based on the scalar function h defined in Section 2. Let A and B be a partition of the graph: A [ B ¼ V and A \ B ¼ ;. In graph theoretic language, the similarity between these two groups is called cut: X wðu; vÞ: cutðA; BÞ ¼ u2A;v2B Shi and Malik proposed a normalized similarity criterion to evaluate a partition. They call this criterion normalized cut: cutðA; BÞ cutðB; AÞ þ ; ð17Þ assocðA; V Þ assocðB; V Þ P where assocðA; V Þ ¼ u2A;t2V wðu; tÞ is the total connection from nodes in A to all the nodes in the graph. It is clear that the optimal partition can be achieved by minimizing Ncut. One key advantage of using normalized cut is that a good approximation to the optimal partition can be computed very efficiently. Let D represent a diagonal P matrix such that Dii ¼ j wði; jÞ, i.e., Dii is the sum of the weights of all the connections to node i. Then, the problem of minimizing Ncut can be written as the expression (18) which can be reduced to a generalized eigenvalue system (19) (see [19] for details). Ncut ¼

min Ncut ¼ min x

xT ðD  W Þx ; xT Dx

ðD  W Þx ¼ Dx;

ð18Þ ð19Þ

where x represents the eigenvectors, in the real domain, which contain the necessary segmentation information. The

eigenvector with the second smallest eigenvalue, called Fiedler vector, is often used to indicate the membership of data points in a subset. Fiedler vector provides the linearized order to search for the splitting point that can minimize the Ncut objective. One can bipartition the nodes in the graph based on the Fiedler order and this can thus lead to a coarse segmentation curve. To subdivide the two subsets after the first partition, the above minimization procedure can be repeated on each individual group. When the final boundaries among different data subsets computed from the normalized cut method are mapped to the vector fields, the coarse vector field segmentation can be generated. For instance, we can partition vector fields, Fig. 1a and Fig. 2a, to two halves as shown, respectively, in Fig. 5a and Fig. 6a.

3.2 Refinement of Boundaries Although the linear search order provided by Fiedler vector is good for finding segmentation curves, it may not necessarily be perfect and optimal. Here, we explore this particular aspect and find an effective refinement method to improve the quality of segmentation. In terms of human perceptual judgement, vector data around the same singularity should be grouped together and the size of a group finally obtained essentially represents the influence region of a singularity. Moreover, we think that a desirable segmentation curve between different groups is supposed to be piecewise-smooth perceptually. From the point of view of vector fields, their smooth contours or streamlines implicitly contain some boundary information to distinguish the influence regions of different singularities. So, it is natural to expect that the final segmentation curves are composed of piecewisesmooth contours or streamlines of vector fields. Then, after completing the coarse segmentation of vector fields, it is necessary to modulate the coarse segmentation curves to approximate contours or streamlines of vector fields piecewise. We utilize contours to refine the coarse segmentation curves if a potential function is chosen (see Section 2), i.e., h ¼ ; otherwise, streamlines are applied to the refinement procedure. In the next section, we will discuss in detail the refinement method with contours and streamlines, respectively.

8

IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS,

VOL. 12,

NO. 3,

MAY/JUNE 2006

Fig. 6. The segmentation of a vector field (Fig. 2a) with two circular singularities. (a) The final segmentation of the vector field. The red line represents the boundary between the influence regions of these two singularities. (b) The primary streamlines of the vector field.

Fig. 7. Real vector field segmentation. (a) The real velocity field vf with an implicit and two explicit (represented by green digits 1 and 2) singularities. Red curves represent primary streamlines of vf . (b) The scalar function h generated using GFM, which will be partitioned with the normalized cut method. (c) Green stars represent the coarse segmentation and red curves are the result after refinement with streamlines.

3.2.1 Contours for Potential Function If taking h ¼ , we assume that boundaries between influence regions of singularities in a vector field are based on contours of the vector field. First, smooth contours can

be numerically computed, they are actually the streamlines of the original vector field after rotating each vector for 90 degrees. Then, the coarse segmentation curves can be refined to become piecewise-smooth by searching for appropriate contours around those coarse curves.

LI ET AL.: SEGMENTATION OF DISCRETE VECTOR FIELDS

9

Fig. 8. Real vector field segmentation. (a) The real velocity field vf with two implicit and two explicit (represented by green digits 1 and 2) singularities. Red curves represent primary streamlines of vf . (b) The scalar function h generated using GFM, which will be partitioned with the normalized cut method. (c) Green stars represent the coarse segmentation and red curves are the result after refinement with streamlines.

The search can be implemented in three steps: Determine the data points surrounding the coarse segmentation curve and contours passing through those points. 2. Compute the difference between each contour determined in the previous step to the coarse segmentation curve. The difference can be measured using the average of the distance from all points the contour passes through to the segmentation curve. 3. Select the contour with the smallest distance as the final segmentation curve. As an example, the vector field shown in Fig. 5a is partitioned into two parts along the vertical direction. Since h is equal to , contours of the vector field are chosen to refine the coarse curve. Clearly, the coarse segmentation curve (the red line of Fig. 5a) coincides with one of contours shown in Fig. 5b. The segmentation curve should remain unchanged. The red line of Fig. 5a is the optimal boundary splitting the vector field into two symmetrical regions, each region contains a singularity. Our perceptual knowledge tells us that the vector field should be halved since the influence of the two singularities is equal. The final segmentation agrees with our perceptual knowledge. 1.

3.2.2 Streamlines for Stream Function It is known that fluids will never flow through streamlines so, in some cases, smooth streamlines should be desirable boundaries. If h ¼ , optimal segmentation curves of vector fields should be based on streamlines numerically computed. So, the coarse segmentation curves of vector fields can be refined to become piecewise-smooth by searching for appropriate streamlines around those coarse curves. There are a lot of methods to determine streamlines of vector

fields (for example, [20]). Here, we use the method provided by MATLAB function library to compute streamlines. The process of searching for appropriate streamlines is similar to that of searching for contours. In Fig. 6a, the coarse segmentation curve of the vector field with two symmetrical circular singularities is shown. Since h is equal to , streamlines of the vector field are used to modulate the coarse segmentation curve. In fact, the coarse segmentation curve (the red line of Fig. 6a) coincides with one of streamlines of the vector field shown in Fig. 6b, so the segmentation curve should remain unchanged. The red line of Fig. 6a is the optimal boundary splitting the vector field into two symmetrical regions. In either region, there exists a circular singularity. Our perceptual knowledge also indicates that the vector field should be halved since the influence of the two circular singularities is equal. The final segmentation, again, agrees with our perception knowledge.

3.3 The Complete Segmentation Algorithm Given a vector field vf with 2D vectors, the complete segmentation algorithm consists of the following steps: 1.

2. 3.

4

Compute the scalar potential function  and the scalar stream function of vf with GFM and determine the scalar function h according to decision criterion . Utilize the normalized cut method to partition the scalar data set h into different segments. Map each segment back to the vector field vf and get a coarse segmentation result. Finally, refine coarse segmentation curves with contours or streamlines of vf .

EXPERIMENTAL RESULTS

In this section, we apply the above approach to different types of vector fields. Our method is applicable to both

10

IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS,

VOL. 12,

NO. 3,

MAY/JUNE 2006

Fig. 9. The segmentation of the gradient vector field of mountains. (a) A gradient vector field vf of mountains with six singularities marked by numbers: three sinks 1, 4, 5 and three sources 2, 3, 6. Red curves represent primary streamlines of vf . (b) The scalar function h generated using GFM, which will be partitioned with the normalized cut method. (c) Scattered green stars represent the coarse segmentation and red curves are the final boundaries after refinement with contours.

linear and nonlinear vector fields. In addition to segmenting singularities contained in vector fields, it tells us the approximate influence region of each singularity. Experiments show that the regions are well-segmented and the final segmentations agree with our perceptual judgement. The following two real data sets (Fig. 7 and Fig. 8) are available from Internet.1 There exist an implicit and two explicit singularities in the vector field (Fig. 7a), where red curves represent primary streamlines of this vector field. It is obvious that the optimal segmentation should partition these three singularities into three different regions. Fig. 7b shows the scalar data set generated with GFM, which 1. http://ltcf.tam.uiuc.edu/Downloads/Data/BL/.

preserves the property of this vector field. In Fig. 7c, green stars represent the coarse segmentation and red curves are the result after refinement with streamlines. Vector field (Fig. 8a) includes two implicit and two explicit singularities. Clearly, this field should be divided into four parts; each of which includes a singularity. Fig. 8b shows the scalar data set generated with GFM. Red curves of Fig. 8c represent the final segmentation after refinement with streamlines. Clearly, the segmentation agrees with our perceptual judgement. Another two examples for the vector field segmentation are given in Fig. 9 and Fig. 10. Both vector data sets are obtained from the Matlab data library. The first one is a gradient vector field of mountains with six singularities

LI ET AL.: SEGMENTATION OF DISCRETE VECTOR FIELDS

marked by numbers in Fig. 9a: three sinks 1, 4, 5 and three sources 2, 3, 6. Red curves represent primary streamlines of the vector field. Obviously, each singularity should be wellseparated along the curves where the variation of gradients of vector field has the biggest locally. Fig. 9b shows the corresponding scalar data set h generated with GFM. After partitioning h with the normalized cut method, the coarse segmentation obtained is represented by green stars in Fig. 9c. Since h ¼ , we use the contours of the vector field to refine the coarse segmentation. The final boundaries are denoted by red curves in figure Fig. 9c. They are piecewise-smooth, where the variation of gradients is close to the biggest locally. Clearly, this agrees with our perceptual estimation. In Fig. 10, the other example is shown. This vector field is the velocity field of flowing wind at a given time, where there exist five singularities (Fig. 10a). They are marked by 1 to 5. Perceptual knowledge tells us that the vector field should be partitioned as follows: Vectors around singularities 1 and 2 can be included in a segment; those around singularities 3 and 4 should be grouped into two different sets; singularity 5 cannot be seen clearly in this region, but its influence and magnitude lead those vectors around it to be separated from the other vectors. The normalized cut method is used to partition the corresponding scalar data set computed with GFM in Fig. 10b into four groups. Green stars of Fig. 10c represent the initial segmentation and red curves are obtained after refining the initial segmentation with streamlines. Apparently, the final results agree with our perceptual judgement.

5

CONCLUSION

AND

FUTURE WORK

In this paper, a novel approach has been introduced to partition 2D discrete vector fields. The basic idea is simple to understand: First, a vector field is transformed into a scalar field that preserves feature information of the vector field as faithfully as possible. Then, the coarse segmentation is obtained by partitioning the scalar field with the normalized cut method. Finally, the vector field segmentation is implemented after refining the coarse segmentation curves with smooth contours or streamlines. We have shown the feasibility and correctness of the Green Function Method to transform a vector field to a scalar field, defined a decision criterion for selecting an appropriate scalar function and proposed a method to refine the coarse segmentation curves with either contours or streamlines. The final boundaries obtained with our approach are piecewise-smooth contours or streamlines, which essentially agrees with human perceptual judgement. Moreover, our approach is advantageous since it is applicable to not only linear (Fig. 2), but also nonlinear (Figs. 9 and 10) vector fields. However, our decision criterion seems too simple when dealing with vector fields with  close to 1. Exclusively choosing either potential or stream functions is, hence, a deficiency of our decision criterion. A new strategy is required to take into account both potential and stream functions. Simple linear combination can be helpful, but this method is not desirable. A better solution to handle this deficiency of our decision criterion will be discussed in our later work.

Fig. 10. The segmentation of the velocity vector field of flowing wind. (a) A velocity vector field vf of flowing wind at a given time with at least five singularities located, respectively, at positions 1 2 . . . 5. Red curves represent primary streamlines of vf . (b) The scalar function h generated using GFM, which will be partitioned with the normalized cut method. (c) Scattered green stars represent the coarse segmentation and red curves are the final boundaries after refinement with streamlines.

12

IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS,

Two-dimensional vector field segmentation is merely the first step of our whole research plan. Our future work will focus on time-dependent vector field sequences and three dimensional vector fields. The related research will be reported soon.

ACKNOWLEDGMENTS The authors thank Professor Zhaojun Bai for his useful discussions and Shen-Shyang Ho for his timely proofreading. We also thank the anonymous reviewers for introducing us to the topological simplification techniques, pointing out the deficiency of our decision criterion when  is close to 1 and providing their valuable suggestions to improve the quality of this paper. This work was supported by NSFC under contract 60473104 and the Special Funds for Major State Basic Research Projects under contract 2005CB321700 and 90307017.

REFERENCES [1] [2] [3] [4] [5]

[6] [7] [8] [9] [10]

[11] [12] [13] [14] [15] [16] [17]

A.C. Telea and J.J.V. Wijk, “Simplified Representation of Vector Fields,” Proc. IEEE Visualization Conf. 1999, pp. 35-42, 1999. B. Heckel, G. Weber, B. Hamann, and K.I. Joy, “Construction of Vector Field Hierarchies,” Proc. IEEE Visualization Conf. 1999, pp. 19-25, 1999. B. Heckel, A.E. Uva, and B. Hamann, “Clustering-Based Generation of Hierarchical Surface Models,” Proc. IEEE Visualization Conf. 1998 (Hot Topics), pp. 50-55, Oct. 1998. H. Garcke, T. Preusser, M. Rumpf, A. Telea, U. Weikard, and J.J.V. Wijk, “A Continuous Clustering Method for Vector Fields,” Proc. IEEE Visualization Conf. 2000, pp. 351-358, 2000. H. Garcke, T. Preusser, M. Rumpf, A. Telea, U. Weikard, and J.J.V. Wijk, “A Phase Field Model for Continuous Clustering on Vector Fields,” IEEE Trans. Visualization and Computer Graphics, vol. 7, pp. 230-241, 2001. J. Helman and L. Hesselink, “Representation and Display of Vector Field Topology in Fluid Flow Data Sets,” Computer, vol. 22, no. 8, pp. 27-36, Aug. 1989. J. Helman and L. Hesselink, “Visualizing Vector Field Topology in Fluid Flows,” IEEE Computer Graphics and Applications, vol. 11, no. 3, pp. 36-46, 1991. W. de Leeuw and R. van Liere, “Collapsing Flow Topology Using Area Metrics,” Proc. IEEE Visualization Conf. 1999, pp. 349-354, 1999. W. de Leeuw and R. van Liere, “Visualization of Global Flow Structures Using Multiple Levels of Topology,” Proc. Data Visualization Conf., pp. 45-52, 1999. X. Tricoche, G. Scheuermann, and H. Hagen, “A Topology Simplification Method for 2D Vector Fields,” Proc. IEEE Visualization 2000, T. Ertl, B. Hamann, and A. Varshney, eds., pp. 359-366, 2000. X. Tricoche, G. Scheuermann, and H. Hagen, “Continuous Topology Simplification of Planar Vector Fields,” Proc. IEEE Visualization 2001, pp. 159-166, 2001. K. Polthier and E. Preuss, “Variational Approach to Vector Field Decomposition,” Proc. Eurographics Workshop Scientific Visualization, 2000. K. Polthier and E. Preuss, “Identifying Vector Fields Singularities Using A Discrete Hodge Decomposition,” Visualization and Math., Springer Verlag, 2002. J.-L. Chen, Z. Bai, B. Hamann, and T.J. Ligocki, “A NormalizedCut Algorithm for Hierachical Vector Field Data Segmentation,” Proc. Visualization and Data Analysis Conf., 2003. R. Fedkiw, J. Stam, and H.W. Jensen, “Visual Simulation of Smoke,” Proc. ACM SIGGRAPH 2001, pp. 23-30, 2001. J. Stam, “Stable Fluids,” Proc. ACM SIGGRAPH 1999, pp. 121-128, 1999. Y. Tong, S. Lombeyda, A.N. Hirani, and M. Desbrun, “Discrete Multiscale Vector Field Decomposition,” ACM Trans. Graphics, vol. 22, no. 3, pp. 445-452, July 2003.

VOL. 12,

NO. 3,

MAY/JUNE 2006

[18] M.T. Heath, Scientific Computing, An Introduction Survey. McGrawHall, 2001. [19] J. Shi and J. Malik, “Normalized Cuts and Image Segmentation,” IEEE Trans. Pattern Analysis and Machine Intellegience, pp. 888-905, 2000. [20] B. Jobard and W. Lefer, “Creating Evenly-Spaced Streamlines of Arbitrary Density,” Proc. Eighth Eurographics Workshop Visualization in Scientific Computing, pp. 43-56, 1997. Hongyu Li received the BE degree from Tongji University, China. He is a PhD student in the Computer Science and Engineering Department at Fudan University, China. His research interests include scientific computing visualization and image analysis.

Wenbin Chen received the PhD degree in the Department of Mathematics from Fudan University, China. Currently, he is an associate professor in the Department of Mathematics at Fudan University. Among his primary research interests are fast algorithms and parallel computing.

I-Fan Shen received the PhD degree from the University of Edinburgh, UK. Currently, he is a professor in the Department of Computer Science and Engineering at Fudan University. His research deals with computer graphics and scientific computing visualization.

. For more information on this or any other computing topic, please visit our Digital Library at www.computer.org/publications/dlib.