# A Compact Representation for 3D Animation Using Octrees and Affine Transformations

Authors: Youyou Wang; Guilherme N. DeSouza
Journal: International Journal of Digital Multimedia Broadcasting
 (2010)

---

## Abstract

This paper presents a new and compact 3D representation for nonrigid objects using the motion vectors between two consecutive frames. Our method relies on an Octree to recursively partition the object into smaller parts. Each part is then assigned a small number of motion parameters that can accurately represent that portion of the object. Finally, an adaptive thresholding, a singular value decomposition for dealing with singularities, and a quantization and arithmetic coding further enhance our proposed method by increasing the compression while maintaining very good signal-noise ratio. Compared to other methods that use tri-linear interpolation, Principle Component Analysis (PCA), or non-rigid partitioning (e.g., FAMC) our algorithm combines the best attributes in most of them. For example, it can be carried out on a frame-to-frame basis, rather than over long sequences, but it is also much easier to compute. In fact, we demonstrate a computation complexity ofΘ(n2) for our method, while some of these methods can reach complexities of O(n3) and
worse. Finally, as the result section demonstrates, the proposed improvements do not sacrifice performance since our method has a better or at least very similar performance in terms of compression ratio and PSNR.


---

## Body

## 1. Introduction

As the technology for graphics processing advances, so does the details in the 3D models used for animation. So, despite these advances, when storing, transmitting, or rendering such models, the need for fast and compact representations is the same as it was a few years ago. In that sense, two categories of systems can be found in the literature: the time-independent methods and the time-dependent methods.The first and most traditional category is the time-independent, and it was first introduced in [1]. In that case, a 3D object is represented using its geometric properties at that moment. That is, 3D points [2, 3], triangular meshes, surface normals, edge orientations [4–7], wavelet coefficients [8, 9], and other features of the object are analyzed within a single time instant, or frame. These methods have advantages in terms of the quality of the model, but they are of course not very compact. On the other hand, time-dependent methods exploit the temporal relationship of these same types of features in order to increase compression. In one of the first systems to be reported [10], but also in more recent ones [11–15], the basic idea is to encode the motion of the 3D object. That is, the difference between consecutive frames, rather than the properties of the object in the frames. In order to do that efficiently, the system must identify the parts of the object that are stationary from the parts that are moving, and describe only the latter.This type of approach raises two major problems: (1) how to partition the two portions of the object—that is, moving and stationary portions; (2) how to describe the moving portions so they represent as perfectly as possible the non-rigid motion. Although much research has been done in this area [11–13, 16, 17], these approaches still suffer from the following: (1) inaccurate motion transformations [17], (2) the need for extra space to store the partitioning [12], (3) the need for prior information on the entire sequence [13–15], and so forth.In this paper, we address the above problems by proposing a rigid partitioning of the 3D space combined with an affine transformation for motion capture. Some of the major advantages of our method are its computational efficiency, the compactness of the motion, and the space representation.In Section2, we will talk about some of the related work in compression of animated sequences. Here, we distinguish animation from real 3D data in particular for the fact that animation can rely on feature correspondence between frames. Section 3 contains the details of our approach and in Section 4, we compare our method against other celebrated methods in the literature. We show the advantages of using our representation for compression, but we also point out where it can be improved.


## 2. Related Work

One of the first methods proposed for time-dependent 3D data compression can be found in [10]. From this paper, a new paradigm in time-dependent compression was established: represent successive frames by a small number of motion parameters and select a coding scheme to efficiently store the data. Even though many systems today offer completely different approaches to capture and parametrize this motion—from affine transformations [14, 15, 18], to principal components [13, 19, 20], and to wavelets that analyze the parametric coherence in the sequence [21, 22]—most time-dependent methods generally perform two basic steps: (1) partitioning of complex objects into smaller and simpler components; (2) description of the motion of these same components.With regard to the partitioning method, we find systems using regular or rigid spatial partitioning, where vertices are divided according to their spatial location. One such example is the Octree [11, 16, 17, 23]. In this case, the space is recursively divided into 8 equal portions until some termination criteria stop the process.On the other side of the coin, we find systems employing irregular partitioning. In [12], for example, the system employed the Iterative Closest Points algorithm (ICP) and assumed that the underlying motion between two consecutive frames followed a rigid transformation. The rigid transformation returned from the ICP was used to reconstruct the frame, while small and irregular portions of the object with small reconstruction error were clustered together to form a single rigid component. In [24], the clustering of the vertices was based on a method similar to a k-means, while the distance between clusters was defined as the Euclidean distance on the subspace defined by a principal component analysis (PCA). That means that the entire sequence had to be known beforehand in order to calculate the subspaces. The same can be said about other PCA-based methods [13, 19]—whether using irregular partitioning or not. Finally, in [20], several local coordinate frames were assigned to the object at the center of each cluster, and the vertices were assigned to clusters depending on their movements between consecutive frames. If the type of objects is restricted to, for example, the human body, the body parts can be clustered using their trajectories, as it was done in [25]. Actually, there is a third kind of systems where a spatial partitioning is not at all explicit. That is, in [26, 27], for example, vertices are grouped despite their spatial location, but rather based on their motion vectors.After a partitioning is obtained, the next step is to find an efficient encoding for the motion. In that sense, some partitioning methods impose constraints on how the motion can be described. In other cases, however, the partitioning is generic enough that different motion descriptors can be used. In [11, 16, 17], all versions of the system employed a tri-linear interpolation, a regular partitioning (octree), and eight motion vectors attached to the corners of the cell. In other cases [12], the authors proposed an irregular partitioning with an affine transformation between clusters as the motion descriptor. Finally, as we mentioned earlier, PCA-based methods can achieve a good compression by storing only the principal components of the motion vectors, that is, a smaller dimension than the original one. That can be done both globally [13, 19] or locally [20, 24], but in either case, the entire sequence must be available for the calculation of the principal components. More recent approaches include the Principal Geodesic Analysis, a variant of the PCA method [28]; methods relying on prediction of the motion vectors, [26]; the replica predictor [27].Another method relying on irregular partitioning is the recent Frame-Animated Mesh Compression (FAMC) [14, 15, 18], which was standardized within the MPEG as part of MPEG-4 AFX Amendment 2 [29]. In this case, the partitioning is irregular, but fixed. That is, the partitioning does not follow a rigid structure as in an octree, but it must be decided at the very first frame based on all frames in the sequence. While this allows for a more compact representation, it still requires prior knowledge of the entire sequence.


## 3. Proposed Approach

In many applications involving virtual reality and computer graphics, such as for human-robot interaction, real-time processing is a requirement that cannot be undermined. With that application in mind, we devised a fast and compact representation for 3D animation using rigid partitioning of the space and an affine transformation. As we will show in Section4, our claim is that such combination can produce results comparable to or better than other methods in terms of compression, while still preserving a good signal-to-noise ratio.


### 3.1. Octree Structure

Our approach starts with the use of octrees for the partitioning of 3D objects. Octrees have been used in computer vision and computer graphics for many years [30]. This data structure has also been widely used in both time-independent methods, such as [2, 3], as well as time-dependent methods, such as in [11] and later improved in [16, 17, 23].In our case, the partitioning using octree is similar to that in other time-dependent methods, however, the decision as to when partition and the termination criteria are different, making our method unique. That is, with octrees, the 3D space containing the object vertices is recursively divided into 8 subspaces, also known as the octants, cells, or cubes. In this paper, we will use the terms cube, cell, node, and octant interchangeably.The partitioning starts with the application of an affine transformation and the calculation of an error measurement based on the motion vectors. If this error is too high, the cell is subdivided and the process repeats for each subcell. As for the termination criteria, we propose an adaptive thresholding of the reconstruction error followed by a singular value decomposition and quantization using arithmetic coding to further increase the compactness of the representation. All this process is simplified by rescaling (normalizing) all vertices to a size between [0, 1]—that is, the size of the root cube is always regarded as 1 unit.


### 3.2. Algorithm

Our algorithm consists of an encoding of the motion vector of the current frame with respect to the previous one. That is, the algorithm perform the following steps.(1)
First, it applies a tightly bounded cube around all vertices in the previous frame.(2)
Next, it calculates the affine transformation matrix between all vertices in the bounding cube and the corresponding vertices from the current frame.(3)
It checks for singularities of the affine and then it quantizes and dequantize the resulting affine matrix. This step is required in order to produce the reconstructed current frame and to calculate the error between the reconstructed and actual current frames.(4)
If the error in the previous step is too large, the algorithm partitions the bounding cube into eight smaller subcubes and the steps (5) and (7) above are repeated for each of the subcubes.(5)
Otherwise, it stores the quantized affine transformation as the motion vector for that cube.The steps above are highlighted by the blue box in Figure1(a).Flowchart of the algorithm: (a) Encoder, and (b) Decoder.
(a)(b)Once a representation for the current frame is completed, the algorithm proceeds to the next frame. That is, it now uses the reconstructed current frame as the “previous” frame and the next frame as the “current” frame and steps are repeated until the last frame in the sequence is encoded. The idea is that only the positions of the vertices for the first frame are recorded and transmitted to the other side—in the case of 3D video streaming, for example, when frames are generated on one machine and rendered on another machine. After the first frame is transmitted, only motion vectors related to each cube of the octree are transmitted to the receiving end. In practice, in order to achieve better signal-to-noise ratios, intra frames could be inserted after an arbitrary number of frames toresetthe error. However, in this paper we are interested in maximum compression only, and therefore, we will not offer any further discussion on how or when to insert intra frames.The “dual” of theencoding algorithm described above is the decoding algorithm, and it is presented in Figure 1(b). Since this algorithm consists of the same (dual) parts of the steps of the encoder, we will leave to the reader to explore the details of the decoder.


### 3.3. Computation of the Affine Transformation

One of the main steps in our approach is the calculation of a single motion vector that will describe the movement of all the vertices in the cube with respect to two consecutive frames. Since the correspondence between vertices from two different frames is known, this motion vector can be approximated using an affine transformationA whose reconstruction error can be expressed as(1)E=∑Ni=1∥A*pi⃗-qi⃗∥2,
where N is the total number of vertices in the cube, and pi⃗ is a 4 by 1 homogeneous vector with the coordinate of vertex i in the previous frame. Similarly, qi⃗ is the homogeneous coordinates of the corresponding vertex in the current frame. In other words, the affine transformation A is the actual motion vector between the vertices of a cube in the previous frame, and the corresponding vertices of the current frame.Considering the entire structure of the octree, the total reconstruction error is the sum of all the errors at the leaf nodes of the tree. That is(2)E=E1+E2+⋯+EM=∑Mj=1(∑Nji=1∥Aj*pdji⃗-qdji⃗∥2),
where M is the number of leaf nodes, Nj is the number of vertices in the jth leaf node, and dji is the index of the ith vertex in that same leaf node.In vector form, the homogeneous coordinates of the points in the leaf nodej, at the previous frame f-1, are given by(3)Fj(f-1)=[p1dj1p1dj2⋯p1djNjp2dj1p2dj2⋯p2djNjp3dj1p3dj2⋯p3djNj11⋯1],
and the corresponding coordinates at the current frame f are given by(4)Fjf=[q1dj1q1dj2⋯q1djNjq2dj1q2dj2⋯q2djNjq3dj1q3dj2⋯q3djNj11⋯1].The affineAj that minimizes the error Ej, that is, minimizes A*Fj(f-1)=Fjf in the least square sense is given by a right pseudoinverse. That is(5)AjFj(f-1)=Fjf,(6)AjFj(f-1)Fj(f-1)T=FjfFj(f-1)T,Aj=FjfFj(f-1)T·(Fj(f-1)Fj(f-1)T)-1.The matrixAj is a 4 by 4 matrix with [0001] as the last row. Since each pair of corresponding points provides three constraints, to solve for the unknowns in the system of equations above N must be ⩾4. Also, since the transformation between Fj(f-1) and Fjf is not a perfect transformation, the calculated Aj leads to a reconstruction error |AjFj1-Fj2|>0. If N is smaller than 4, no affine is calculated and the position of the vertices in that cube is transmitted instead.


### 3.4. Quantization and Singular Nodes

Each element of the affine transformation matrix is stored using integers, which affects the precision, but increases the compactness of the representation. To compensate for this loss of precision, a framef is encoded with respect to the reconstructed frame, rather than the actual frame f-1. By doing so, the quantization error in the latter frame is corrected by the motion estimation for the current one. Therefore, quantization errors only affect the frame, but do not propagate throughout the whole sequence.The quantized affine transformation matrixA′ derived from the original affine transformation matrix A by(7)A′=⌊2k(A-aminamax-amin)⌋,
where k is the quantization step. Also, in order to be able to compare our method with the method developed in [11], we set the same linear quantization method with a step of 16 bits. Ideally, amin and amax would be the minimum and maximum elements among all affine matrices. However, that would require the prior calculation of the motion vectors for the entire sequence. Instead, we use a predefined value for both amin and amax. This arbitrary choice is possible because, as we explained earlier, we normalize the dimensions of the root cube to i=1⋯Nj. That guarantees that the elements of A will only be large in the case of a singularity, for example, points are too close to each other. In that case, two things happen: (1) we apply a singular value decomposition (SVD) to solve for A in (5); (2) we fix the reconstruction error to 5%. That is, when approximating the pseudoinverse by its SVD, we use only the eigenvalues corresponding to the first 95% of the principal components.


### 3.5. Termination Criteria

In Section3.2, we explained how the algorithm stops at step (4). However, there are actually two criteria for such termination.The first criterion to stop the partitioning of the octree comes from the reconstruction error. That is, the maximum reconstruction error allowed for any single vertex is defined by(8)ME<maxi=1⋯Nj(|q̂dji⃗-qdji⃗|),
where q̂dji⃗ and qdji⃗ are the original and reconstructed vertices of the jth node.In other words, if the reconstruction error of any single vertices exceeds ME, the node is partitioned into eight subcubes. Otherwise, the algorithm stops. In Section4 we explain the choices of this threshold.The second criterion to stop the partitioning is the number of vertices inside a cell. As we explained in Section3.3, if that number is 4 or less, we store the coordinates of the vertices directly instead of the motion vectors (affine).


### 3.6. Algorithm Complexity

The complexity of our algorithm derives mainly from the pseudo inverse used during the calculation of the affine transformation. That is, for an×4 matrix Fj(f-1), the complexity of calculation the pseudo inverse is O(4×n2). Here, we will use O(f(·)) as the asymptotic upper bound of f(·); Θ(f(·)) the asymptotic tight bound of f(·); Ω(f(·)) as the asymptotic lower bound of f(·).Hence, when we consider each step of the proposed algorithm in Algorithm1, we arrive the following recursive equation:Algorithm 1:Complexity of the proposed algorithm.
Algorithm(node)Affine(node)=4×n2Quantization(Affine)=constReconstruction Error(node)=16×nMaxError(vertices):=3×nIf Max Error less then Treshold=constStopsElsePartition(node):=8*Algorithm(node/8)EndEnd(9)T(n)=c1,forn=4,T(n)=4n2+c2+19n+n+8*T(n8),forn>4,
which can be further simplified as in:(10)T(n)=Θ(1),forn=4T(n)=8*T(n8)+f(n),forn>4,
where f(n)=4n2+20n+c2. This equation can be solved using the third case of the Master Theorem [31], where f(n)=Ω(n1+ϵ),ϵ=1. That is, f(n) is polynomially larger than n2. Therefore, the solution for the recursion is T(n)=Θ(n2).


### 3.7. Internal Representation of the Data

The final data consists of the following items. The first frame of the sequence with allN uncompressed 3D coordinates of the vertices using single float-point precision: N×3×4 bytes. The mf quantized affine transformation matrices corresponding to the mf leaf nodes found in the octree for each frame f in the sequence of F frames: ∑f=1Fmf×3×4×2. If a leaf node contains less than four vertices, the coordinates of these vertices are used instead. Finally, one byte for level of each leaf node in the octree. To further increase the compression ratio, we apply an arithmetic encoding to this data.


## 3.1. Octree Structure

Our approach starts with the use of octrees for the partitioning of 3D objects. Octrees have been used in computer vision and computer graphics for many years [30]. This data structure has also been widely used in both time-independent methods, such as [2, 3], as well as time-dependent methods, such as in [11] and later improved in [16, 17, 23].In our case, the partitioning using octree is similar to that in other time-dependent methods, however, the decision as to when partition and the termination criteria are different, making our method unique. That is, with octrees, the 3D space containing the object vertices is recursively divided into 8 subspaces, also known as the octants, cells, or cubes. In this paper, we will use the terms cube, cell, node, and octant interchangeably.The partitioning starts with the application of an affine transformation and the calculation of an error measurement based on the motion vectors. If this error is too high, the cell is subdivided and the process repeats for each subcell. As for the termination criteria, we propose an adaptive thresholding of the reconstruction error followed by a singular value decomposition and quantization using arithmetic coding to further increase the compactness of the representation. All this process is simplified by rescaling (normalizing) all vertices to a size between [0, 1]—that is, the size of the root cube is always regarded as 1 unit.


## 3.2. Algorithm

Our algorithm consists of an encoding of the motion vector of the current frame with respect to the previous one. That is, the algorithm perform the following steps.(1)
First, it applies a tightly bounded cube around all vertices in the previous frame.(2)
Next, it calculates the affine transformation matrix between all vertices in the bounding cube and the corresponding vertices from the current frame.(3)
It checks for singularities of the affine and then it quantizes and dequantize the resulting affine matrix. This step is required in order to produce the reconstructed current frame and to calculate the error between the reconstructed and actual current frames.(4)
If the error in the previous step is too large, the algorithm partitions the bounding cube into eight smaller subcubes and the steps (5) and (7) above are repeated for each of the subcubes.(5)
Otherwise, it stores the quantized affine transformation as the motion vector for that cube.The steps above are highlighted by the blue box in Figure1(a).Flowchart of the algorithm: (a) Encoder, and (b) Decoder.
(a)(b)Once a representation for the current frame is completed, the algorithm proceeds to the next frame. That is, it now uses the reconstructed current frame as the “previous” frame and the next frame as the “current” frame and steps are repeated until the last frame in the sequence is encoded. The idea is that only the positions of the vertices for the first frame are recorded and transmitted to the other side—in the case of 3D video streaming, for example, when frames are generated on one machine and rendered on another machine. After the first frame is transmitted, only motion vectors related to each cube of the octree are transmitted to the receiving end. In practice, in order to achieve better signal-to-noise ratios, intra frames could be inserted after an arbitrary number of frames toresetthe error. However, in this paper we are interested in maximum compression only, and therefore, we will not offer any further discussion on how or when to insert intra frames.The “dual” of theencoding algorithm described above is the decoding algorithm, and it is presented in Figure 1(b). Since this algorithm consists of the same (dual) parts of the steps of the encoder, we will leave to the reader to explore the details of the decoder.


## 3.3. Computation of the Affine Transformation

One of the main steps in our approach is the calculation of a single motion vector that will describe the movement of all the vertices in the cube with respect to two consecutive frames. Since the correspondence between vertices from two different frames is known, this motion vector can be approximated using an affine transformationA whose reconstruction error can be expressed as(1)E=∑Ni=1∥A*pi⃗-qi⃗∥2,
where N is the total number of vertices in the cube, and pi⃗ is a 4 by 1 homogeneous vector with the coordinate of vertex i in the previous frame. Similarly, qi⃗ is the homogeneous coordinates of the corresponding vertex in the current frame. In other words, the affine transformation A is the actual motion vector between the vertices of a cube in the previous frame, and the corresponding vertices of the current frame.Considering the entire structure of the octree, the total reconstruction error is the sum of all the errors at the leaf nodes of the tree. That is(2)E=E1+E2+⋯+EM=∑Mj=1(∑Nji=1∥Aj*pdji⃗-qdji⃗∥2),
where M is the number of leaf nodes, Nj is the number of vertices in the jth leaf node, and dji is the index of the ith vertex in that same leaf node.In vector form, the homogeneous coordinates of the points in the leaf nodej, at the previous frame f-1, are given by(3)Fj(f-1)=[p1dj1p1dj2⋯p1djNjp2dj1p2dj2⋯p2djNjp3dj1p3dj2⋯p3djNj11⋯1],
and the corresponding coordinates at the current frame f are given by(4)Fjf=[q1dj1q1dj2⋯q1djNjq2dj1q2dj2⋯q2djNjq3dj1q3dj2⋯q3djNj11⋯1].The affineAj that minimizes the error Ej, that is, minimizes A*Fj(f-1)=Fjf in the least square sense is given by a right pseudoinverse. That is(5)AjFj(f-1)=Fjf,(6)AjFj(f-1)Fj(f-1)T=FjfFj(f-1)T,Aj=FjfFj(f-1)T·(Fj(f-1)Fj(f-1)T)-1.The matrixAj is a 4 by 4 matrix with [0001] as the last row. Since each pair of corresponding points provides three constraints, to solve for the unknowns in the system of equations above N must be ⩾4. Also, since the transformation between Fj(f-1) and Fjf is not a perfect transformation, the calculated Aj leads to a reconstruction error |AjFj1-Fj2|>0. If N is smaller than 4, no affine is calculated and the position of the vertices in that cube is transmitted instead.


## 3.4. Quantization and Singular Nodes

Each element of the affine transformation matrix is stored using integers, which affects the precision, but increases the compactness of the representation. To compensate for this loss of precision, a framef is encoded with respect to the reconstructed frame, rather than the actual frame f-1. By doing so, the quantization error in the latter frame is corrected by the motion estimation for the current one. Therefore, quantization errors only affect the frame, but do not propagate throughout the whole sequence.The quantized affine transformation matrixA′ derived from the original affine transformation matrix A by(7)A′=⌊2k(A-aminamax-amin)⌋,
where k is the quantization step. Also, in order to be able to compare our method with the method developed in [11], we set the same linear quantization method with a step of 16 bits. Ideally, amin and amax would be the minimum and maximum elements among all affine matrices. However, that would require the prior calculation of the motion vectors for the entire sequence. Instead, we use a predefined value for both amin and amax. This arbitrary choice is possible because, as we explained earlier, we normalize the dimensions of the root cube to i=1⋯Nj. That guarantees that the elements of A will only be large in the case of a singularity, for example, points are too close to each other. In that case, two things happen: (1) we apply a singular value decomposition (SVD) to solve for A in (5); (2) we fix the reconstruction error to 5%. That is, when approximating the pseudoinverse by its SVD, we use only the eigenvalues corresponding to the first 95% of the principal components.


## 3.5. Termination Criteria

In Section3.2, we explained how the algorithm stops at step (4). However, there are actually two criteria for such termination.The first criterion to stop the partitioning of the octree comes from the reconstruction error. That is, the maximum reconstruction error allowed for any single vertex is defined by(8)ME<maxi=1⋯Nj(|q̂dji⃗-qdji⃗|),
where q̂dji⃗ and qdji⃗ are the original and reconstructed vertices of the jth node.In other words, if the reconstruction error of any single vertices exceeds ME, the node is partitioned into eight subcubes. Otherwise, the algorithm stops. In Section4 we explain the choices of this threshold.The second criterion to stop the partitioning is the number of vertices inside a cell. As we explained in Section3.3, if that number is 4 or less, we store the coordinates of the vertices directly instead of the motion vectors (affine).


## 3.6. Algorithm Complexity

The complexity of our algorithm derives mainly from the pseudo inverse used during the calculation of the affine transformation. That is, for an×4 matrix Fj(f-1), the complexity of calculation the pseudo inverse is O(4×n2). Here, we will use O(f(·)) as the asymptotic upper bound of f(·); Θ(f(·)) the asymptotic tight bound of f(·); Ω(f(·)) as the asymptotic lower bound of f(·).Hence, when we consider each step of the proposed algorithm in Algorithm1, we arrive the following recursive equation:Algorithm 1:Complexity of the proposed algorithm.
Algorithm(node)Affine(node)=4×n2Quantization(Affine)=constReconstruction Error(node)=16×nMaxError(vertices):=3×nIf Max Error less then Treshold=constStopsElsePartition(node):=8*Algorithm(node/8)EndEnd(9)T(n)=c1,forn=4,T(n)=4n2+c2+19n+n+8*T(n8),forn>4,
which can be further simplified as in:(10)T(n)=Θ(1),forn=4T(n)=8*T(n8)+f(n),forn>4,
where f(n)=4n2+20n+c2. This equation can be solved using the third case of the Master Theorem [31], where f(n)=Ω(n1+ϵ),ϵ=1. That is, f(n) is polynomially larger than n2. Therefore, the solution for the recursion is T(n)=Θ(n2).


## 3.7. Internal Representation of the Data

The final data consists of the following items. The first frame of the sequence with allN uncompressed 3D coordinates of the vertices using single float-point precision: N×3×4 bytes. The mf quantized affine transformation matrices corresponding to the mf leaf nodes found in the octree for each frame f in the sequence of F frames: ∑f=1Fmf×3×4×2. If a leaf node contains less than four vertices, the coordinates of these vertices are used instead. Finally, one byte for level of each leaf node in the octree. To further increase the compression ratio, we apply an arithmetic encoding to this data.


## 4. Results

We compared our algorithm against three other methods in the literature. We will refer to these as the ZhangOwen's algorithm [11, 17]; the AmjStarb's algorithm [20]; the FAMC + DCT algorithm [14, 15]. As we already explained in Section 2, the first method uses an octree with a tri-linear interpolation, while the second one uses a PCA-based approach, and the third uses an irregular partitioning also followed by an affine transformation.


### 4.1. Quantitative Measurement

In order to compare our method against these other approaches, we calculated thePeak Signal-Noise Ratio, or PSNR, as defined in [11](11)PSNR=10log10dmaxAVGMSE,AVGMSE=1M∑i=1MMSEi,
where dmax is the size of the largest bounding box among the different frames. Also, MSE is the mean-square error of the distance between reconstructed and actual vertices, that is, MSEi=|q̂i⃗-qi⃗|2.


### 4.2. Benchmark Dataset

We applied the four algorithms—ZhangOwen's algorithm, AmjStarb's, FAMC+ DCT, and our method—to a total of five different benchmark sequences. Each of these sequences contains objects with different rigidity and number of vertices. Table 1 summarizes the properties of these sequences.Table 1
Properties of the benchmark sequences used for testing.
VerticesTrianglesFramesSize (bytes)Dance70611411819016099080Chicken3030566440014544000Cow290458041936725664Snake91791835413414759832Ball5552111001006662400


### 4.3. Quantitative Results

First, we compared our approach against ZhangOwen's and AmjStarb's algorithms in terms of Compression Ratio versus PSNR. Figure2 shows the relationship between these two performance measures for three of the benchmark sequences. For detailed numerical data, the reader should refer to Tables 2, 3, 4, and 5. The points of the curves in Figure 2 for our method correspond to the different percentages in parenthesis in the tables, and they were obtained by controlling the choices of ME in (8). As for ZhangOwen's and AmjStarb's algorithms, the controlling parameters were, respectively, a similar maximum error threshold and the number of principal components (i.e., the number of bases)—as we explain later in this section.Table 2
Results of the Comparison for the “Chicken” sequence.
OursMatricesSizeRatioPSNRChicken (1%)5269470913920.51:139.43Chicken (5%)1512024262559.94:132Chicken (10%)6822119231121.98:129Chicken (15%)418479548182.83:127.74Chicken (25%)202544023330.37:126Paper[11]Paper [17]SizeRatioPSNRSizeRatioChicken (5%)648100022.5:12849022729:1Chicken (10%)31800045.7:125.734498558:1Chicken (15%)17500083:124.620546488:1Chicken (25%)76700189:122.5N/AN/ATable 3
Results of the Comparison for the “Dance” sequence.
OursPaper [17]MatricesSizeRatioPSNRSizeRatioDance (1%)3210348964432.88:124.0887827018:1Dance (2%)2031436537837.18:121.5349022733:1Dance (3%)1521728337756.81:119.9534498547:1Dance (5%)1036016768796:118.0620546478:1Table 4
Results of the Comparison for the “Cow” Sequence.
OursPaper [17]MatricesSizeRatioPSNRSizeRatioCow (1%)4333558965611.4:126.35N/AN/ACow (5%)1587323367328.78:119.6842460316:1Cow (10%)1031016377241.07:116.6520294232:1Cow (15%)679611529658.33:115.2714099948:1Table 5
Results for the “Snake” and “Ball” sequences.
OursMatricesSizeRatioPSNRSnake (1%)4059061613623.96:129.67Snake (2%)2706641001236:126.98Snake (3%)2158832799645:125.38Snake (5%)1516723145163.77:123.34Ball (2–5%)9914346590:143.83Figure 2
Comparison between our proposed method and ZhangOwen's and AmjStarb's algorithms.As Figure2 shows, our approach consistently outperforms ZhangOwen's algorithm, both in terms of compression ratio and PSNR. For AmjStarb's algorithm, our approach performs quite similarly, however, we must point out once again that a PCA-based approach requires prior knowledge of the entire sequence in order to achieve good results, while our method can be carried out on a frame-to-frame basis.As the tables above imply, the compression ratio is highly dependent on the animation sequence. For example, for the “Ball” and “Chicken” sequences, which present a simpler motion, the compression ratio is also higher. In especial, for the “Ball” sequence, the entire set of 100 frames required only 99 matrices. That means that one single affine matrix was sufficient for each of these frames—no subnode was required under the root node of the octree.Also, the value used for ME does not completely determine the PSNR, although they are highly correlated. For example, the Chicken sequence with anME=5%, our method achieved a PSNR of 32, while for the Cow sequence an ME=1% turned out to reach a PSNR of only 26.35. We assume that this is because of the complexity of the motion, which still is the dominating factor in the final result.Since the author did not provide the calculation for PSNR in [17], the data for some of the sequences was not available. However, the author did not make any changes between [11] and [17] that could have affected the PSNR. Therefore, we can assume that the PSNR would be the same for both methods in [11, 17].Finally, for the PCA-based algorithm in [20], it is important to mention that we implemented their approach using the same parameters reported in their paper. Table 6 summarizes the results for four different numbers of principal components or bases, that is, 3, 5, 10, and 30.Table 6
Results for the PCA algorithm using different bases.
3 bases5 basesRatioPSNRRatioPSNRDance (sd= 14)67.516.940.520.5Cow (sd= 6)16312.698.114.1Chicken (sd= 16)139.328.283.631.110 bases30 basesRatioPSNRRatioPSNRDance (sd= 14)20.225.46.738.7Cow (sd= 6)49.216.6416.523.7Chicken (sd= 16)42.236.414.247.4After the tests above, we also compared our method to a state-of-the-art algorithm: the FAMC+ DCT [14, 15]. As we mentioned earlier, the FAMC is the standard method for the MPEG-4 AFX Amendment 2 [29] and it uses an irregular partitioning based on the topology of the mesh. That is, clusters of vertices are created by successively incorporating neighboring vertices that maintain the error in reconstruction from the affine transformation within a certain limit. This analysis of the error is performed over long stretches of the sequence, while a fixed partitioning, decided at the time of the first frame, is employed throughout the sequence. In Figure 3, we present a comparison between our method and the FAMC + DCT for the first four benchmark sequences in Table 1. As the figure shows, our method outperforms the FAMC + DCT for the Chicken sequence; it presents a performance similar to the FAMC + DCT for the Snake sequence; it is outperformed by the FAMC + DCT for the other two sequences (Dance and Cow). The reason for that behavior comes mainly from the rigid versus non-rigid characteristics of the partitioning in both methods. That is, while the octree can lead to unnecessary partitioning of neighboring vertices with the same motion vectors simply because of the proximity of another group of vertices with a different motion, in a non-rigid partitioning as in the FAMC, vertices are grouped independently of the existence of this second group of vertices. That difference between the two approaches usually leads to a more efficient partitioning of the vertices by the FAMC. However, that same efficiency is compromised by long sequences—as it was the case for the Chicken, which has the largest number of frames in our tests (400)—and by radical motions of the vertices—as it was the case for the Snake, whose vertices move much more freely than in the other sequences. In other words, since the size and the number of clusters in the FAMC depend on those two factors (the number of frames and the nonrigidity of the motion of the vertices), the larger they become, the more likely it is for the FAMC to require more clusters with fewer vertices in each cluster, and consequently to present a reduction in compression ratio. This claim is supported by Figure 4, where we depict the performance of the FAMC + DCT method for the Chicken sequence as a function of the number of frames used in the sequence. As the figure indicates, if we fix the PSNR, the compression ratio decreases as we add more frames to the sequence. It is important to notice however that the compression ratio used in those curves were obtained without taking into account the need to add a key frame at the end of each smaller sequence. This added reference frame is usually very large and even if a static compression is performed as suggested in [14], the cost of constantly including such key frames would lower even further the compression ratio. In order to perform the comparison in Figure 3, we chose to use all 400 frames in the Chicken sequence for the FAMC + DCT algorithm.Figure 3
Comparison between the FAMC+ DCT [14] and our proposed method.Figure 4
Decrease in compression ratio as a function of the number of frames used in the FAMC+ DCT algorithm—for any given (fixed) PSNR.


### 4.4. Qualitative Results

We also perform a qualitative analysis of our algorithm for different parameters. However, before we present these results, we would like to illustrate what means visually for two algorithms to present a difference of 2 dB in PSNR. In that regard, Figure5(a) presents one of the original frames in the Chicken sequence and the corresponding reconstructed frames achieved by our method and by the FAMC with different PSNRs. Our algorithm, in Figure 5(b), obtained a PSNR of 32 dB, while the FAMC in Figures 5(c) and 5(d) presented PSNRs of 30 dB and 34 dB, respectively. As the reader will notice, a change of 2 dB between (b) and (c) does not seem as pronounced as the same 2 dB difference between (b) and (d). This result is again to illustrate that the same 2 dB can appear quite differently to humans, and that some times the absolute number alone is not enough to determine which reconstructed frame looks “better.”Illustration of the visual perception for differences of 2 dB in frame reconstruction.
(a)
Original frame(b)
Our method: PSNR = 32 dB(c)
FAMC: PSNR = 34 dB(d)
FAMC: PSNR = 30 dBFinally, Figures6, 7, and 8 depict various reconstructed frames for each of the three sequences: Chicken, Dance and Cow; using different values of ME.Reconstructed frames for the “Chicken” sequence.
(a)
Original frame(b)
ME= 0.01(c)
ME= 0.1(d)
ME= 0.25Reconstructed frames for the “Dance” sequence.
(a)
Original frame(b)
ME= 0.01(c)
ME= 0.03(d)
ME= 0.05Reconstructed frames for the “Cow” sequence.
(a)
original frame(b)
ME= 0.01(c)
ME= 0.05(d)
ME= 0.15


## 4.1. Quantitative Measurement

In order to compare our method against these other approaches, we calculated thePeak Signal-Noise Ratio, or PSNR, as defined in [11](11)PSNR=10log10dmaxAVGMSE,AVGMSE=1M∑i=1MMSEi,
where dmax is the size of the largest bounding box among the different frames. Also, MSE is the mean-square error of the distance between reconstructed and actual vertices, that is, MSEi=|q̂i⃗-qi⃗|2.


## 4.2. Benchmark Dataset

We applied the four algorithms—ZhangOwen's algorithm, AmjStarb's, FAMC+ DCT, and our method—to a total of five different benchmark sequences. Each of these sequences contains objects with different rigidity and number of vertices. Table 1 summarizes the properties of these sequences.Table 1
Properties of the benchmark sequences used for testing.
VerticesTrianglesFramesSize (bytes)Dance70611411819016099080Chicken3030566440014544000Cow290458041936725664Snake91791835413414759832Ball5552111001006662400


## 4.3. Quantitative Results

First, we compared our approach against ZhangOwen's and AmjStarb's algorithms in terms of Compression Ratio versus PSNR. Figure2 shows the relationship between these two performance measures for three of the benchmark sequences. For detailed numerical data, the reader should refer to Tables 2, 3, 4, and 5. The points of the curves in Figure 2 for our method correspond to the different percentages in parenthesis in the tables, and they were obtained by controlling the choices of ME in (8). As for ZhangOwen's and AmjStarb's algorithms, the controlling parameters were, respectively, a similar maximum error threshold and the number of principal components (i.e., the number of bases)—as we explain later in this section.Table 2
Results of the Comparison for the “Chicken” sequence.
OursMatricesSizeRatioPSNRChicken (1%)5269470913920.51:139.43Chicken (5%)1512024262559.94:132Chicken (10%)6822119231121.98:129Chicken (15%)418479548182.83:127.74Chicken (25%)202544023330.37:126Paper[11]Paper [17]SizeRatioPSNRSizeRatioChicken (5%)648100022.5:12849022729:1Chicken (10%)31800045.7:125.734498558:1Chicken (15%)17500083:124.620546488:1Chicken (25%)76700189:122.5N/AN/ATable 3
Results of the Comparison for the “Dance” sequence.
OursPaper [17]MatricesSizeRatioPSNRSizeRatioDance (1%)3210348964432.88:124.0887827018:1Dance (2%)2031436537837.18:121.5349022733:1Dance (3%)1521728337756.81:119.9534498547:1Dance (5%)1036016768796:118.0620546478:1Table 4
Results of the Comparison for the “Cow” Sequence.
OursPaper [17]MatricesSizeRatioPSNRSizeRatioCow (1%)4333558965611.4:126.35N/AN/ACow (5%)1587323367328.78:119.6842460316:1Cow (10%)1031016377241.07:116.6520294232:1Cow (15%)679611529658.33:115.2714099948:1Table 5
Results for the “Snake” and “Ball” sequences.
OursMatricesSizeRatioPSNRSnake (1%)4059061613623.96:129.67Snake (2%)2706641001236:126.98Snake (3%)2158832799645:125.38Snake (5%)1516723145163.77:123.34Ball (2–5%)9914346590:143.83Figure 2
Comparison between our proposed method and ZhangOwen's and AmjStarb's algorithms.As Figure2 shows, our approach consistently outperforms ZhangOwen's algorithm, both in terms of compression ratio and PSNR. For AmjStarb's algorithm, our approach performs quite similarly, however, we must point out once again that a PCA-based approach requires prior knowledge of the entire sequence in order to achieve good results, while our method can be carried out on a frame-to-frame basis.As the tables above imply, the compression ratio is highly dependent on the animation sequence. For example, for the “Ball” and “Chicken” sequences, which present a simpler motion, the compression ratio is also higher. In especial, for the “Ball” sequence, the entire set of 100 frames required only 99 matrices. That means that one single affine matrix was sufficient for each of these frames—no subnode was required under the root node of the octree.Also, the value used for ME does not completely determine the PSNR, although they are highly correlated. For example, the Chicken sequence with anME=5%, our method achieved a PSNR of 32, while for the Cow sequence an ME=1% turned out to reach a PSNR of only 26.35. We assume that this is because of the complexity of the motion, which still is the dominating factor in the final result.Since the author did not provide the calculation for PSNR in [17], the data for some of the sequences was not available. However, the author did not make any changes between [11] and [17] that could have affected the PSNR. Therefore, we can assume that the PSNR would be the same for both methods in [11, 17].Finally, for the PCA-based algorithm in [20], it is important to mention that we implemented their approach using the same parameters reported in their paper. Table 6 summarizes the results for four different numbers of principal components or bases, that is, 3, 5, 10, and 30.Table 6
Results for the PCA algorithm using different bases.
3 bases5 basesRatioPSNRRatioPSNRDance (sd= 14)67.516.940.520.5Cow (sd= 6)16312.698.114.1Chicken (sd= 16)139.328.283.631.110 bases30 basesRatioPSNRRatioPSNRDance (sd= 14)20.225.46.738.7Cow (sd= 6)49.216.6416.523.7Chicken (sd= 16)42.236.414.247.4After the tests above, we also compared our method to a state-of-the-art algorithm: the FAMC+ DCT [14, 15]. As we mentioned earlier, the FAMC is the standard method for the MPEG-4 AFX Amendment 2 [29] and it uses an irregular partitioning based on the topology of the mesh. That is, clusters of vertices are created by successively incorporating neighboring vertices that maintain the error in reconstruction from the affine transformation within a certain limit. This analysis of the error is performed over long stretches of the sequence, while a fixed partitioning, decided at the time of the first frame, is employed throughout the sequence. In Figure 3, we present a comparison between our method and the FAMC + DCT for the first four benchmark sequences in Table 1. As the figure shows, our method outperforms the FAMC + DCT for the Chicken sequence; it presents a performance similar to the FAMC + DCT for the Snake sequence; it is outperformed by the FAMC + DCT for the other two sequences (Dance and Cow). The reason for that behavior comes mainly from the rigid versus non-rigid characteristics of the partitioning in both methods. That is, while the octree can lead to unnecessary partitioning of neighboring vertices with the same motion vectors simply because of the proximity of another group of vertices with a different motion, in a non-rigid partitioning as in the FAMC, vertices are grouped independently of the existence of this second group of vertices. That difference between the two approaches usually leads to a more efficient partitioning of the vertices by the FAMC. However, that same efficiency is compromised by long sequences—as it was the case for the Chicken, which has the largest number of frames in our tests (400)—and by radical motions of the vertices—as it was the case for the Snake, whose vertices move much more freely than in the other sequences. In other words, since the size and the number of clusters in the FAMC depend on those two factors (the number of frames and the nonrigidity of the motion of the vertices), the larger they become, the more likely it is for the FAMC to require more clusters with fewer vertices in each cluster, and consequently to present a reduction in compression ratio. This claim is supported by Figure 4, where we depict the performance of the FAMC + DCT method for the Chicken sequence as a function of the number of frames used in the sequence. As the figure indicates, if we fix the PSNR, the compression ratio decreases as we add more frames to the sequence. It is important to notice however that the compression ratio used in those curves were obtained without taking into account the need to add a key frame at the end of each smaller sequence. This added reference frame is usually very large and even if a static compression is performed as suggested in [14], the cost of constantly including such key frames would lower even further the compression ratio. In order to perform the comparison in Figure 3, we chose to use all 400 frames in the Chicken sequence for the FAMC + DCT algorithm.Figure 3
Comparison between the FAMC+ DCT [14] and our proposed method.Figure 4
Decrease in compression ratio as a function of the number of frames used in the FAMC+ DCT algorithm—for any given (fixed) PSNR.


## 4.4. Qualitative Results

We also perform a qualitative analysis of our algorithm for different parameters. However, before we present these results, we would like to illustrate what means visually for two algorithms to present a difference of 2 dB in PSNR. In that regard, Figure5(a) presents one of the original frames in the Chicken sequence and the corresponding reconstructed frames achieved by our method and by the FAMC with different PSNRs. Our algorithm, in Figure 5(b), obtained a PSNR of 32 dB, while the FAMC in Figures 5(c) and 5(d) presented PSNRs of 30 dB and 34 dB, respectively. As the reader will notice, a change of 2 dB between (b) and (c) does not seem as pronounced as the same 2 dB difference between (b) and (d). This result is again to illustrate that the same 2 dB can appear quite differently to humans, and that some times the absolute number alone is not enough to determine which reconstructed frame looks “better.”Illustration of the visual perception for differences of 2 dB in frame reconstruction.
(a)
Original frame(b)
Our method: PSNR = 32 dB(c)
FAMC: PSNR = 34 dB(d)
FAMC: PSNR = 30 dBFinally, Figures6, 7, and 8 depict various reconstructed frames for each of the three sequences: Chicken, Dance and Cow; using different values of ME.Reconstructed frames for the “Chicken” sequence.
(a)
Original frame(b)
ME= 0.01(c)
ME= 0.1(d)
ME= 0.25Reconstructed frames for the “Dance” sequence.
(a)
Original frame(b)
ME= 0.01(c)
ME= 0.03(d)
ME= 0.05Reconstructed frames for the “Cow” sequence.
(a)
original frame(b)
ME= 0.01(c)
ME= 0.05(d)
ME= 0.15


## 5. Conclusion and the Future Work

We proposed an affine-based motion representation with adaptive threshold and quantization that uses a rigid octree structure for partitioning. Our experimental results indicated that the proposed algorithm is, in terms of compression ratio, superior to other octree-based methods, while it achieved similar performance when compared to PCA-based methods or the FAMC+ DCT algorithm. However, our method has a much smaller computation complexity and it does not require prior knowledge of the sequence. Instead, it can be carried out on a frame-to-frame basis.We have demonstrated that the computation complexity of our algorithm for one frame isΘ(n2), where n is the number of vertices in the frame. Once again, this is a major advantage of our method when compared to other algorithms such as ZhangOwen's algorithm [11, 17] and the AmjStarb's algorithm [20]. Moreover, while state-of-the-art methods such as the FAMC + DCT can be improved by means of a PCA technique (as described in [18]) and outperform the compression ratio of our method in all tested sequences, the price tag to pay in that case is a complexity greater than Θ(n3).Both the PSNR and the compression ratios for our method were very high, and a choice ofME=0.01 provided an excellent compromise between these two performance measurements.One serious limitation of most time-dependent methods, including our method, is the requirement for correspondence between vertices in different frames. This prevents this method from being applied to real 3D data—cloud of points. In order to solve this problem, we propose to build a pseudocorrespondence between frames using the Iterative Closet Points algorithm [32, 33]. Another option would be the use of Robust Points Matching (RPM) [34–36] however, we anticipate that this technique would lead to a much more complex algorithm. A combination of ICP and RPM was proposed [37], which have a much better performance, but still the run time is a concern, since the RPM is O(n3) and ICP is O(n·log). In the future, we intend to attack this problem of pseudocorrespondences.



---

*Source: 924091-2010-03-10.xml*