Efficient Spherical Harmonics Representation of 3D Objects
ABSTRACT In this paper, we present a new and efficient spherical harmonics decomposition for spherical functions defining 3D triangulated objects. Such spherical functions are intrinsically associated to star-shaped objects. However, our results can be extended to any triangular object after segmentation into star-shaped surface patches and recomposition of the results in the implicit framework. There is thus no restriction about the genus number of the object. We demonstrate that the evaluation of the spherical harmonics coefficients can be performed by a Monte Carlo integration over the edges, which makes the computation more accurate and faster than previous techniques, and provides a better control over the precision error in contrast to the voxel-based methods. We present several applications of our research, including fast spectral surface reconstruction from point clouds, local surface smoothing and interactive geometric texture transfer.
-
Citations (0)
-
Cited In (0)
Page 1
Efficient Spherical Harmonics Representation of 3D Objects
M. MOUSA
LIRIS, Claude Bernard University Lyon1 - France
{mmousa, rchaine, sakkouch, egalin}@liris.cnrs.fr
R. CHAINE S. AKKOUCHEE. GALIN
Abstract
In this paper, we present a new and efficient spherical
harmonics decomposition for spherical functions defining
3D triangulated objects. Such spherical functions are in-
trinsically associated to star-shaped objects. However, our
results can be extended to any triangular object or oriented
point set surface after segmentation into star-shaped sur-
face patches and recomposition of the results in the implicit
framework. There is thus no restriction about the genus
number of the object. We demonstrate that the evaluation
of the spherical harmonics coefficients can be performed by
a Monte Carlo integration over the edges, which makes the
computation more accurate and faster than previous tech-
niques, and provides a better control over the precision
error in contrast to the voxel-based methods. We present
several applications of our research, including fast surface
reconstruction from point clouds, local surface smoothing
and interactive geometric texture transfer.
1. Introduction
In computer graphics community, the spherical harmon-
ics have gained much of interest due to their contribution in
many fields such as global illumination [5], shape descrip-
tors [11, 12], shape reconstruction of star-shaped point set
[22], frequency-based representations and filtering [25, 16].
The spherical harmonics decomposition is naturally applied
to spherical domains (star-shaped objects) and may be ex-
tended to non spherical domains using a prior spherical pa-
rameterization. This can be used in particular to zero genus
3D objects described by triangular meshes [25].
Current methods for computing the spherical harmonics
transform often sample these spherical functions over a reg-
ular grid on the sphere or a 3D grid surrounding the ob-
ject (voxelization) and apply a discrete spherical harmonics
transform algorithm [6, 14, 20] to this regular grid to com-
pute the harmonics coefficients. Spatial grid-based methods
[4, 11, 19] are prone to numerical errors associated with the
size of the cells. It is very difficult to predict the size of the
Figure 1. The model of Thai statue at different
levels of details represented by our spheri-
cal harmonics representation using a band-
width of 24, 64 and 480. The initial data set
of the model is given as an oriented set of
3000k points without any information about
the connectivity.
voxel which satisfies a given error tolerance. In addition,
the complexity of the method increases tremendously as the
voxel size decreases.
In this paper, we present a new and efficient algorithm
for computing the spherical harmonics decomposition of
spherical functions measuring the radial extent of the points
of 3D objects represented as meshes or oriented point sets.
The main contribution of our approach is as follows:
Efficient spherical harmonics
spherical harmonics coefficients is distributed over the
edges thanks to the Curl theorem that permits to reduce a
The evaluation of the
Page 2
first formulation over the triangles.
Error Control
ics coefficients is made through a Monte Carlo method that
generatesauniformlydistributedsetofrandompointsalong
the edges. The precision of each coefficient is also directly
binded on the number of points on each edge. Moreover,
when the spherical harmonics transform is used for filtering
purpose we add more control on the global geometric ap-
proximation error since the spherical harmonics coefficients
are computed progressively until the appropriate bandwidth
is reached.
The evaluation of the spherical harmon-
Processing general objects
shaped, we segment it into star-shaped surface patches and
recompose the local results on each patch. This process can
also be extended to handle point clouds directly without a
prior global mesh reconstruction step, and there is no re-
striction about the genus number of the objects.
If the object is not star-
Local spherical harmonics
formed directly and locally on the surface description of the
object without neither voxelization nor spherical parameter-
ization.
Our computation mainly depends on the geometry and
the normal direction over the surface. If the input object
is described as mesh, the normal information is implicitly
embedded in the description. In the case of point cloud,
we assume that each point is supplied with the correspond-
ing normal. This is a quite usual assumption when working
with point-based objects, otherwise, the normal direction
can be estimated using least square fitting and a consistent
normal orientation can be propagated via a minimum span-
ning tree for the point set [7].
The remainder of the paper is organized as follows. Sec-
tion 2 presents an overview of related work. Section 3
presents fundamental concepts and notations. Section 4
presents our method for accelerating the computation of
the spherical harmonics transform by distributing the com-
putation over the edges of star-shaped meshes. Section 5
presents an extension of our algorithm for computing the
spherical harmonics transform for non star-shaped meshes
and surface point clouds. Section 6 presents some applica-
tions of our approach to demonstrate its efficiency.
The computations are per-
2. Related work
The extension of the spectral concepts to the geometry
of 3D models have gained much of interest during the last
decade. Conceptually, thisgeneralizationisachievedthanks
to the Laplace-Beltrami operator. Taubin [21] has proposed
a spectral method to fair triangular meshes by coding the
cartesian coordinates into differential coordinates at each
vertex using the discrete Laplacian. This method has been
improved by Desbrun et al. [2] by introducing the curvature
flow on the surface to remove noise. Although, these meth-
ods are based on the methodology of signal processing and
they do not compute a real frequency-based representation
of the surface of the objects. Therefore the corresponding
filters should be applied in the spatial domain.
A real frequency-based representation can be obtained
by considering the eigenfunctions of the Laplace-Beltrami
operator as a set of basis functions. Karni et al. [8] have
used this decomposition to compress triangular meshes.
One of the drawback of their approach is that the basis
eigenvectors must be computed separately for each mesh,
as pointed in [9]. For more detail about Laplace-Beltrami
eigenfunctions as a basis for surface based function spectral
decomposition, we recommend the reader to refer to [13].
TheeigenfunctionsoftheLaplacianofthemeshcanbeused
also for surface quadrangulation [3].
The planar and spherical domains provide us with a
well known set of eigenfunctions: Fourier exponentials and
the spherical harmonics, respectively. The frequency-based
representations, using Fourier transforms and spherical har-
monics, are used for retrieval, surface reconstruction, com-
pression, progressive transmission and filtering purposes.
Fourier transform
Fourier transforms to a function induced from the 3D vox-
elized mesh to obtain shape descriptor for retrieval pur-
poses. Kazhdan [10] has used 3D Fourier transform of the
indicator function of an oriented set of points to reconstruct
a surface that approximates these points. An interesting
point of his approach is that he has converted the volumetric
integrations of the Fourier transform of the indicator func-
tion into surface integrations. These surface integrations
can be computed directly on the set of points. However,
he has used a posterior voxelization to convert the set of the
obtained frequencies into an implicit representation of the
object in the spatial domain.
In general, it is more difficult to control the numerical
errors from voxelized-based computations. For a given er-
ror tolerance, it is very difficult to predict the optimal size
of the voxel. Pauly et al. [18] have used Fourier anal-
ysis to achieve common surface processing operations as
noise removal, enhancement, restoration and subsampling.
They have interpolated the data onto a regular grid, in order
to make a discrete Fourier transform applicable. However,
sampling the data over a regular grid on the sphere ignores
some important regions and oversamples others.
Vranic et al. [23] have applied 3D
Spherical harmonics transform
ics transform of spherical functions [4, 19] induced from the
mesh can be calculated using a voxelization of the mesh as
The spherical harmon-
Page 3
a preprocessing step to obtain a shape descriptor. In [25],
Zhou et al. have applied the spherical harmonics transform
to three independent spherical functions representing the
spherical parametrization of the local coordinates x, y and
z over the original mesh. However, using three independent
functions ignores the correlation between these coordinates
on the surface.
An interesting idea on efficient computations of geomet-
rical properties of triangulated meshes has been presented
by Zhang et al. [24]. They have shown that the computa-
tion of the volumetric moments of a triangulated mesh can
be decomposed into a signed sum of the volumetric mo-
ments computed over the geometric primitives composing
the mesh. The geometric primitives are triangles or tetrahe-
dra for meshes embedded in 2D or 3D respectively. Mousa
et al. [15] have extended this idea to calculate the spher-
ical harmonics transform of the indicator function repre-
senting the intersection of the volume enclosed by a trian-
gulated mesh and a given sphere. The computation con-
sists of a signed sum of 2D Monte-Carlo integrations on a
set of spherical triangles. A similar technique was used in
[16] to obtain a frequency-based representation of triangu-
lar meshes using the spherical harmonics.
3. Notations
The spherical harmonics {Ym
special functions defined on the unit sphere S2as :
l(θ,ϕ) : |m| ≤ l ∈ N} are
Ym
l(θ,ϕ) = kl,mPm
l(cosθ)eimϕ
(1)
where θ ∈ [0 π], ϕ ∈ [0 2π[, kl,mis a constant, and Pm
is the associated Legendre polynomial. The spherical har-
monics are orthonormal functions such that1:
?2π
where δu,vis the Kronecker delta function defined as the
following :
?
Therefore, a spherical function g : S2−→ R can be ex-
panded as a linear combination of spherical harmonics :
l
0
?π
0
Ym
l(θ,ϕ)Ym?
l? (θ,ϕ)sin(θ)dθdϕ = δl,l?δm,m? (2)
δu,v=
1
0
if u = v
otherwise
(3)
g(θ,ϕ) =
∞
?
l=0
l?
m=−l
cl,mYm
l(θ,ϕ)
(4)
where the coefficients cl,mare uniquely determined by :
?2π
1The bar over the variable means the complex conjugate of this vari-
able.
cl,m=
0
?π
0
g(θ,ϕ)Ym
l(θ,ϕ)sin(θ)dθdϕ
(5)
4. Spherical harmonics computations
Given a star-shaped triangular mesh, we present in this
section a new algorithm to compute the spherical harmonics
decomposition of the spherical function that measures the
distance from the surfaceto a center c. Firstly, weshow how
such spherical function can be expanded as a sum of spher-
ical functions defined over the local triangles. Secondly, we
show how to evaluate spherical harmonics coefficients by a
sole integration along the edges of these triangles.
4.1. Spherical harmonics decomposition
Consider the spherical function f that measures the ra-
dial extent of the points of a given star-shaped triangulated
object M. We will show now how to expand this spherical
function over the triangles of M.
Assuming that fi(θ,ϕ) is the restriction of f to the tri-
angle Ti, i.e. fihas the same value than f for the points be-
longing to the triangle Tiand has the value zero otherwise.
The global spherical function f(θ,ϕ) can be decomposed
in terms of fi(θ,ϕ) as follows :
?
where T is the set of triangles of M. The spherical harmon-
ics decomposition of each fiis given by :
f(θ,ϕ) =
Ti∈T
fi(θ,ϕ)
(6)
fi(θ,ϕ) =
∞
?
l=0
l?
m=−l
ci
l,mYm
l(θ,ϕ)
(7)
Therefore, theexpansionoff(θ,ϕ)intermsofthespherical
harmonics can be rewritten as follows :
?∞
l=0m=−l
f(θ,ϕ) =
?
Ti∈T
?
l?
ci
l,mYm
l(θ,ϕ)
?
(8)
Let T?
tered at c. Each ci
tion:
idenote the projection of Tion the unit sphere cen-
l,mis computed using the following equa-
ci
l,m=
? ?
T?
i
fi(θ,ϕ)Ym
l(θ,ϕ)sin(θ)dθdϕ
(9)
The above equation evaluates the coefficients ci
face integration over the spherical triangle T?
evaluation of cl,mis reduced to the evaluation of the corre-
sponding ci
the main computation of the spherical harmonics decompo-
sition of the function f is simplified to computation of the
spherical harmonics decomposition of the functions fi.
l,mas a sur-
i. Then, the
l,mover the primitive forms of the mesh. Hence,
Page 4
4.2. SHT over the triangle edges
In this subsection, we show how to reduce the evaluation
of ci
spherical triangle T?
that permits to reduce some 2D integrations to 1D integra-
tions.
l,mas a linear integration over the boundaries of the
i. For that, we rely on the Curl theorem
4.2.1The Curl theorem
TheCurloperatorisavectoroperatorthatmeasuresavector
field’s rate of rotation: the direction of the axis of rotation
and the magnitude of the rotation. Let V denote a volume
element delimited by a closed surface element S. The Curl
of a vector field F denoted as Curl(F) = ∇ × F is defined
as :
Curl(F) = lim
V →0
where n is the normal of S.
The Curl theorem is an extension of the fundamental the-
orem of calculus which provides a method for expressing
the integral of some function over the interior of a region
S as an integral over its boundary ∂S. Given a 3D vector
field function F and a surface S with boundaries, the Curl
theorem states :
?
In the spherical coordinates system, the Curl of a vector
function F ≡ (Fr,Fθ,Fϕ) is defined as :
where r, θ, ϕ are spherical coordinates and? r,?θ, ? ϕ the local
unit vectors basis. Moreover, the area and the line elements
are given by :
1
V
?
S
n × FdS
S
(? × F) · da =
?
∂S
F · ds
(10)
? × F =
?
? r
?θ
? ϕ
?
1
r sinθ
?∂(sinθFϕ)
1
sinθ
?
∂θ
−∂Fθ
∂ϕ
?
1
r
?
∂Fr
∂ϕ−∂(rFϕ)
∂(rFθ)
∂r
−∂Fr
∂r
?
1
r∂θ
?
(11)
da
ds
=
=
r2sinθdθdϕ? r
dr? r + rdθ?θ + rsinθdϕ? ϕ
(12)
(13)
Usingequations11, 12and13, thelefthandsideofequation
10 is rewritten as follows :
?∂(sinθFϕ)
Therefore, in the spherical coordinates system, we can re-
formulate the Curl theorem as the following :
?
(? × F) · da = r
∂θ
−∂Fθ
∂ϕ
?
dθdϕ
(14)
S
r
?∂(sinθFϕ)
∂θ
−∂Fθ
∂ϕ
?
dθdϕ=
?
∂S
[Frdr + rFθdθ + rsinθFϕdϕ]
(15)
4.2.2 SHT computation
To calculate the spherical harmonics coefficients ci
linear integration along the edges of the spherical triangle
T?
that the following equality is satisfied :
l,mas a
i, we need a vector field function Fi= (Fi
r,Fi
θ,Fi
ϕ) such
(? × Fi) · da = fi(θ,ϕ)Ym
Any vector field Fisatisfying equation 16 gives the same
evaluation of the coefficients ci
possible to find a vector field function of the form Fi=
(0,Fi
along the?θ direction. This allows a simplified expression of
the Curl operator. Therefore, on the unit sphere S2(r = 1),
the above equation reduces to :
l(θ,ϕ)sin(θ)dθdϕ
(16)
l,m. We will show that it is
θ,0), i.e. such that the field lines of Fiare geodesics
Curl(Fi)·da = −∂Fi
θ
∂ϕdθdϕ = fi(θ,ϕ)Ym
l(θ,ϕ)sin(θ)dθdϕ
(17)
And hence,
−∂Fi
θ
∂ϕ=
fi(θ,ϕ)Ym
?
l(θ,ϕ)sin(θ)
(18)
Fi
θ= −
fi(θ,ϕ)kl,mPm
l(cosθ)sin(θ)e−imϕdϕ(19)
Using the integration by parts (see appendix A), we get :
Fi
−kl,mPm
θ(r,θ,ϕ) =fi(θ,ϕ)kl,mPm
l(cosθ)sin(θ)
im
l(cosθ)sin(θ)e−imϕ
im
e−imϕ∂fi(θ,ϕ)
∂ϕ
?
dϕ
(20)
Using this expression of Fi
termination of ci
θand the Curl theorem, the de-
l,mamounts to :
?
ci
l,m=
T?
i
(? × Fi) · da
(21)
Therefore,
ci
l,m=
?
∂T?
i
Fi
θds
(22)
where ∂T?
Thus, we can calculate the spherical harmonics coefficient
ci
tion Fi. The computation of ci
gration of Fialong the edges of the triangle T?
ever, the right most integration of equation 20 is not easy
to calculate and need to be simplified. Consider the quan-
tity g1(p) =
ppi·
is the projection of p on the plane supporting Ti.
iis the boundary of the spherical triangle T?
i.
l,mby applying the Curl theorem to the vector field func-
l,mreduces to a 1D inte-
i. How-
−→−→
ni where
−→
ni is the normal of Tiand pi
?g1=
−→
ni
(23)
Page 5
Figure 2.
Similarly, let g2(p) = r − fi(θ,ϕ) where r,θ and ϕ are the
spherical coordinates of p. From Figure 2, g2(p)cosγ =
g1(p), therefore
?g2× cosγ + g2× ?cosγ = ?g1
For all points p lying on Ti, g2(p) = 0. Then
(24)
?g2(p) × cosγ = ?g1(p)
(25)
Moreover,? r ·? ni= cosγ.
?(r − fi) × (? r ·? ni) = ? ni
∂r? r −1
r∂θ
(26)
?
? r −∂fi
∂fi
?θ −
1
rsin(θ)
∂fi
∂ϕ? ϕ
?
× (? r ·? ni) = ? ni
(27)
Multiplying by ? ϕ
−
1
rsinθ
∂fi
∂ϕ? r ·? ni= ? ni· ? ϕ
(28)
Taking κ = −rsinθ
? r ·? ni
we get
∂fi
∂ϕ= κ? ni· ? ϕ
(29)
The right most term of equation 20 simplifies to :
?
The normal ? niis constant for all points on the triangle Ti.
Moreover, ? ϕ is the unit vector in the direction of ϕ and is
equal to (−sin(ϕ),cos(ϕ),0). Therefore, we have :
?
To evaluate the integration presented in equation 31, the fol-
lowing sub-integrations should be evaluated :
?
I2
=cos(ϕ)e−imϕdϕ
e−imϕ∂fi
∂ϕdϕ
=
κ
?
(? ni· ? ϕ)e−imϕdϕ
(30)
e−imϕ∂fi
∂ϕdϕ
=
κ? ni·
?
? ϕe−imϕdϕ
(31)
I1
=
−sin(ϕ)e−imϕdϕ
(32)
?
(33)
Using the integration by parts (see Appendix B), we get :
given point, we can evaluate Fi
and ϕ using equations 20, 31, 34 and 35, and hence ci
I1=
e−imϕ
1 − m2[cosϕ + imsinϕ]
1
4cos2ϕ +im
m ?= ±1
m = ±1
2[ϕ −1
2sin2ϕ]
(34)
I2=
e−imϕ
1 − m2[sinϕ − imcosϕ]
im
4
Therefore, given the values of the surface normal at any
m ?= ±1
m = ±1cos2ϕ +1
2[ϕ +1
2sin2ϕ]
(35)
θfor any value of l, m, θ
l,m.
5. Algorithm
The spherical harmonics computations are naturally
adapted to spherical domains. Non spherical objects should
be preprocessed such that they are decomposed into spheri-
cal subparts. In this section, we give an algorithm that gen-
eralizes our approach to any mesh of point set surface. Our
method operates in five steps as illustrated in Figure 3 :
(a)(b) (c) (d)
Figure 3. The main steps of the application
of our approach to a non spherical object.
(a) The kd-tree decomposition. (b) The best
fitting spheres for the cells of the kd-tree.
(c) The triangulation of the local spherical
patches. (d) The corresponding object after
the spherical harmonics computations.
1. Partition the object using a kd-tree and an unfolding
split condition.
2. For each cell of the kd-tree find the best fitting sphere
on which we apply the spherical harmonics computa-
tions.
3. If the object is already meshed, ignore this step. Oth-
erwise, triangulate each local patch of the object.