# A Feature-Based Structural Measure: An Image Similarity Measure for Face Recognition
## 3 Similarity Measures
### The Proposed Measure (FSM)  
As discussed above, there are certain shortcomings in the performance of the feature similarity and structural similarity measures, particularly since they produce confusing results in some cases. Both FSIM and SSIM may detect a non-trivial amount of similarity when two images are dissimilar and can give low recognition confidence. Both measures fail to detect similarity under conditions of significant noise.  
A new similarity index is proposed here to resolve the shortcomings of SSIM and FSM and to give a more reliable measure of similarity, especially for human face images. This new measure is called the Feature-Based Structural Measure (FSM). On the other front, a new measure for confidence in face recognition is proposed.  
FSM combines the best features of the well-known SSIM and FSIM approaches, striking a balance between their performances for similar and dissimilar images. The inclusion of edge detection in FSM presents a distinctive structural feature, in which two binary edge images, \(g_{x}\) and \(g_{y}\), are obtained after edge detection of the original images \(x\) and \(y\) using [PERSON]'s method [20]. The FSM is given by a rational function, as follows:  
\[\mathcal{F}(x,y)=\frac{(a+c)\cdot R\left(g_{x},\ g_{y}\right)\cdot\Phi\left(g_ {x},\ g_{y}\right)+b\cdot R\left(g_{x},\ g_{y}\right)+e}{(a+b)\cdot p\left(g_ {x},\ g_{y}\right)+c\cdot R\left(g_{x},\ g_{y}\right)\cdot\Phi\left(g_{x},\ g_{y} \right)+e}, \tag{9}\]  
where, \(\mathcal{F}(x,y)\) represents the proposed similarity between two images \(x\) and \(y\); usually, \(x\) represents the reference image and \(y\) represents a corrupted version of \(x\); \(\Phi\) represents the feature similarity measure (FSIM); and \(\rho\) represents the structural similarity measure (SSIM). The constants are chosen as \(a=5\), \(b=3\) and \(c=7\), while \(e=0.01\) is added to balance the quotient and avoid division by zero. The function \(R(x,\ y)\) refers to the global 2D correlation between the images, as follows:  
\[R(x,y)=\frac{\sum_{i}\sum_{j}\left(x_{ij}-x_{0}\right)\left(y_{ij}-y_{\mathrm{ o}}\right)}{\sqrt{\left[\sum_{i}\sum_{j}\left(x_{ij}-x_{0}\right)^{2} \right]\left[\sum_{i}\sum_{j}\left(y_{ij}-y_{\mathrm{o}}\right)^{2}\right]}}, \tag{10}\]  
where \(x_{0}\) and \(y_{0}\) are the image global means. This function is applied here as \(R\left(g_{x},\ g_{y}\right)\) on the new images obtained from the application of edge detection to the original images \(x\) and \(y\). The simulation results show that the proposed FSM technique gives better performance than SSIM and FSIM for facial recognition, even under conditions of noise. This excellent performance is due to the rational combination of different approaches (hence different features) with proper weights in Equation (9). The proper weights can control the good/bad features provided by the combined measures.  
The only limitation for the proposed measure is the complexity of Equation (9) as compared with the complexity of Equations (1) and (2), where it requires more time. This issue can be alleviated by high-performance computing. However, this is a cheap price for correct recognition, especially in security applications.