# An Efficient Retrieval Technique for Trademarks Based on the Fuzzy Inference System
## 3 Image Representation
### Feature Extraction  
One of the key elements in a successful retrieval system is image feature description. The simple and robustness feature descriptors are employed in this paper to obtain high performance. The global geometric feature descriptor, Hu moments [32], and the five local geometric features [8] are used to describe the global image properties and the local properties of an image, respectively. An illustration of the five local geometric features is shown in Figure 4.  
The global geometric feature, a Hu moment with a \(p+q\) order, is defined as:  
\[m_{pq}=\sum_{m=1}^{M}\sum_{n=1}^{N}x^{p}y^{d}f(x,y) \tag{1}\]  
where \(f(x,y)\) is the image intensity at pixel (\(x,y\)) and \(M\times N\) is the image size. Figure 3: An example that illustrates the building of a tree structure. Then, the central moments are defined as:  
\[\mu_{pq}=\sum_{m=1}^{M}\sum_{n=1}^{N}\,(x-\overline{x})^{P}\cdot(y-\overline{y})^ {q}\cdot f(x,y) \tag{2}\]  
where \(\overline{x}=m_{10}/m_{00}\) and \(\overline{y}=m_{01}/m_{00}\). Invariant \(\eta_{pq}\), with respect to both translation and scale, can be constructed from central moments by dividing through a properly scaled zero-th central moment \(\mu_{00}\), which is shown as:  
\[\eta_{pq}=\mu_{pq}/(\mu_{00}\rho) \tag{3}\]  
where \(\rho=1+(p+q)/2\). Finally, the seven invariants with respect to translation, scale, and rotation are computed from the scale invariants up to order three. The formulas are described as follows:  
\[ \begin{array}{rl}I_{1}=&\eta_{20}+\eta_{02}\\ I_{2}=&(\eta_{20}-\eta_{02})^{2}+4\cdot\eta_{11}^{2}\\ I_{3}=&(\eta_{30}-3\cdot\eta_{12})^{2}+(3\cdot\eta_{21}-\eta_{03})^{2}\\ I_{4}=&(\eta_{30}+\eta_{12})^{2}+(\eta_{21}+\eta_{03})^{2}\\ I_{5}=&(\eta_{30}-3\cdot\eta_{12})\cdot(\eta_{30}+\eta_{12})\cdot\left[(\eta _{30}+\eta_{12})^{2}-3\cdot(\eta_{21}+\eta_{03})^{2}\right]+\\ &(3\cdot\eta_{21}-\eta_{03})\cdot(\eta_{21}+\eta_{03})\cdot\left[3\cdot(\eta _{30}+\eta_{12})^{2}-(\eta_{21}+\eta_{03})^{2}\right]\\ I_{6}=&(\eta_{20}-\eta_{02})\cdot\left[(\eta_{30}+\eta_{12})^{2}-(\eta_{21}+ \eta_{03})^{2}\right]+4\cdot\eta_{11}\cdot(\eta_{30}+\eta_{12})\cdot(\eta_{21 }+\eta_{03})\\ I_{7}=&(3\cdot\eta_{21}-\eta_{03})\cdot(\eta_{30}+\eta_{12})\cdot\left[(\eta _{30}+\eta_{12})^{2}-3\cdot(\eta_{21}+\eta_{03})^{2}\right]-\\ &(\eta_{30}-3\cdot\eta_{12})\cdot(\eta_{21}+\eta_{03})\cdot\left[3\cdot(\eta _{30}+\eta_{12})^{2}-(\eta_{21}+\eta_{03})^{2}\right]\end{array}  \tag{4}\]  
The seven invariant Hu moments, \(H=\{I_{1},\,I_{2},\ldots,\,I_{7}\}\), are treated as the global features. On the other hand, the local geometric descriptors are described in the following. The convexity calculates the ratio of perimeters of the convex hull \(P_{convexhull}\) and the original contour \(P\), which is defined as:  
\[F_{1}=\frac{P_{convexhull}}{P} \tag{5}\]  
Figure 4: Local geometric feature descriptors: (**a**) convexity; (**b**) eccentricity; (**c**) compactness; (**d**) circle variance; and (**e**) elliptic variance. The principal axes of an object can be uniquely defined as the two segments of lines crossing each other orthogonally in the centroid of the object and represent the directions with zero cross-correlation, which is called the eccentricity. The covariance matrix \(\mathbf{C}\) of a contour is considered before calculating the eccentricity, which is defined as:  
\[\mathbf{C}=\frac{1}{N}\sum_{i=0}^{N-1}\left( \begin{array}{c}x_{i}-gx\\ y_{i}-gy\end{array} \right)\left( \begin{array}{c}x_{i}-gx\\ y_{i}-gy\end{array} \right)^{T}=\left( \begin{array}{cc}c_{xx}&c_{xy}\\ c_{xy}&c_{yy}\end{array} \right) \tag{6}\]  
where \(\left(x_{i},\,y_{i}\right)\) is the contour point of an object and \(\left(g_{x},\,g_{y}\right)\) is the center of gravity; moreover, \(N\) is the number of contour points. The lengths of the two principal axes equal the eigenvalues \(\lambda_{1}\) and \(\lambda_{2}\) of the covariance matrix \(\mathbf{C}\), respectively. So the eigenvalues \(\lambda_{1}\) and \(\lambda_{2}\) can be calculated by:  
\[\left\{