Zernike moment features
Zernike moments of order n with repetition m for an image function \(f(x,y)\) defined on a square somain \(N \times N\) are defined as
Consider a set of orthogonal functions with simple rotation properties which forms a complete orthogonal set over the interior of the unit circle. The form of these polynomials is
where \(V^*_{nm}\) is the complex conjugate of the complex polynomials \(V_{nm}(x,y)\)
where \(r=\sqrt{x^2+y^2}\), \(0 \leqslant r \leqslant 1\), \(\sqrt{-1}\), \(n \geqslant 0\), \(|m| \leqslant n\), \(n-m=even\), and \(\theta = \text{arctg} \frac{y}{x}\).
Zernike real valued radial polynomials \(R_{nm}(r)\) are given by
where
Approximating the double integration for the discrete image function on the domain of size \(N \times N\), we get
where \(\delta A = dxdy\) is an elemental area of the normalized square image in discrete form when a square image of any size is mapped on the unit disk. If the image is square-shaped and \(R = \frac {N}{\sqrt{2}}\) is the enclosing circle radius, then \(\delta A = \frac{1}{R^2}\).
Features
A set of features with prefix ZERNIKE2D is calculated. In the source code, the order is controlled with class ZernikeFeature’s member constant ZernikeFeature::ZERNIKE2D_ORDER (default value: 9), and the number of repetitions \(m\) is controlled via constant ZernikeFeature::NUM_FEATURE_VALS:
ZernikeFeature::NUM_FEATURE_VALS \(=\) ZernikeFeature::ZERNIKE2D_ORDER \(\times m\).
References
A. Tahmasbi, F. Saki, S.B. Shokouhi. Classification of benign and malignant masses based on Zernike moments. Comput Biol Med. 2011 Aug;41(8): 726-35. doi: 10.1016/j.compbiomed.2011.06.009. Epub 2011 Jul 1. PMID: 21722886.
C. Singh, E. Walia. Algorithms for fast computation of Zernike moments and their numerical stability. Image and Vision Computing, Volume 29, Issue 4, 2011: 251-259, ISSN 0262-8856, https://doi.org/10.1016/j.imavis.2010.10.003.