# Stable Evaluation of 3D Zernike Moments for Surface Meshes
###### Abstract
The formalism for characterizing shapes using Zernike polynomials and Zernike moments is also being used for understanding the spatial organization of nonpolar and polar residues within protein structures [36], protein docking [37; 38], for the analyses of protein interfaces [39; 40; 41; 42], as well as for the identification and prediction of protein binding sites [43]. It is noteworthy that 3D Zernike moments can capture the geometry of a shape with minimal loss. They has been used in this context to encode single-cell phase-contrast tomograms [44]. In this paper, we are concerned with the computation of these 3D Zernike moments. Many algorithms have been proposed for computing the 3D Zernike moments of a shape. Most of these methods, especially those used for image analysis, rely on a representation of the shape as a volumetric grid. These algorithms usually proceed in two steps, namely computing the geometric moments of the shape first, and then expressing the Zernike moments as linear combinations of those moments (see Refs. [22; 45], and background section below). They do suffer from three major drawbacks. First, the computation of each moment has a cubic computational complexity (\(N_{V}^{3}\), where \(N_{V}\) is the number of voxels in each dimension of the grid). Second, the volume integral in Equation (1) is approximated by a discrete sum over the voxels, where each voxel contributes as a point-like object, usually located at its center. It is easy to see that this discretization error increases as the order of the moment increases. Finally, the relationships between geometric moments and Zernike moments lead to numerical instabilities, limiting the order \(N\) of the moments that can be computed accurately, usually with \(N<50\) (see [22; 46]). Given a volumetric grid representation of a shape, it is possible to extract a discrete version of the surface of this shape by triangulation of an isosurface embedded in the grid (for a survey on this process, see for example Ref. [47]). Popular methods for generating such isosurface include the marching cube algorithm [48], the marching tetrahedra algorithm [49] and its regularized version [50]. Representing a shape using a discrete approximation of its surface, usually a polygonal mesh, and assuming that this shape is homogeneous (where homogeneity refers to the fact that the function \(f(x,y,z)\) in Equation (1) can be considered constant) is often efficient as there are exact algorithms for computing homogeneous 3D moments over such representation. An exact formula for computing geometric moments on 3D polyhedra was originally proposed by [PERSON] and [PERSON] [51]; it has been reformulated and extended to general dimensional polyhedra several times since then (for a complete discussion of the state of the art in this field, see [52]). [PERSON] et al. used those ideas and derived efficient recursive algorithms for computing geometric moments for shapes defined by a triangulation of their surfaces [52]; those algorithms were further refined to be optimal with respect to the order of the moments [53]. [PERSON] et al. then used those geometric moments to derive the 3D Zernike moments of such shapes. As mentioned above, however, the numerical instabilities associated with the relationships between geometric and Zernike moments limit the order with which those can be derived. Recently [PERSON] and [PERSON] proposed a new, stable algorithm to accurately compute Zernike moments for shapes represented as 3D grid [54]. Their algorithm proceeds by computing these moments directly, without using the geometric moments, using recurrence relations that provide stability and efficiency. Our work presented in this paper is a counterpart to the work of [PERSON] and [PERSON]. We propose a new exact algorithm for the computation of Zernike moments for shapes represented by surface meshes. Similar to [PERSON] and [PERSON], we do not use the conversion from geometric moments to Zernike moments to avoid numerical instabilities. The paper is organized as follows.