# An Improved Method for Evaluating Image Sharpness Based on Edge Information
## 2 Principle and Design of the Sharpness Evaluation Method
### Histogram of Edge Width  
For the obtained edge widths of different edge points, the probability \(P(\omega_{i})\) that the edge width is \(\omega_{i}\) can be calculated by Equation (2).  
\[P(\omega_{i})=\frac{n_{i}}{N} \tag{2}\]  
In the above equation, \(n_{i}\) is the number of edge points with edge width \(\omega_{i}\) and \(N\) is the total number of edge points.  
Once the probabilities of different edge widths are obtained, the histogram of the edge width can be established. Take the Gaussian blurred image \"womanhat\" in the LIVE database as an example; its corresponding histogram is shown in Figure 11.  
It can be seen from Figure 11 that, as the degree of blurring deepens, two phenomena appear in the corresponding histogram. (1) The peak shifts to the right, that is, the probability of large edge widths increases. (2) The histogram spreads and the peak value decreases, which means that the probability of larger edge widths generally increases. Reference [14] states, for these phenomena, that the edge widths corresponding to the peak portion of the histogram are more likely to be generated after the step edges or approximate step edges are blurred, which can more accurately reflect blurriness. In this regard, a distance factor, as shown in Equation (3), was introduced to enhance the contribution of the edge widths of the peak portion to the sharpness evaluation. The distance factor variation relationship corresponding to Equation (3) is shown in Figure 12.  
In this paper, based on the previous study, two distance factors, as shown in Equations (4) and (5), are proposed, and their respective relationships with the edge width are shown in Figures 13 and 14, respectively. For the convenience of later description, the distance factors corresponding to Equations (3)-(5) are named as type 1 distance factor, type 2 distance factor, and type 3 distance factor, respectively.  
\[(\omega_{i})=\left\{\begin{array}{cc}\left(\frac{\omega_{i}}{\omega_{mp}} \right)^{2}&\omega_{i}<\omega_{mp}\\ 1&\omega_{i}=\omega_{mp}\\ \left(\frac{\omega_{mp}-\omega_{i}}{\omega_{mp}-\omega_{mp}}\right)^{2}&\omega _{i}>\omega_{mp}\end{array}\right. \tag{3}\]  
Figure 10: (a) “parrots” polar graph of edge information; (b) “planes” polar graph of edge information.  
In the above equation, \(\omega_{mp}\) is the edge width with the highest probability, \(\omega_{me}\) is the longest edge width, \(\omega_{i}\) is the edge width, and \(d(\omega_{i})\) is the distance factor of \(\omega_{i}\).  
\[d(\omega_{i})=\left\{\begin{array}{cc}\frac{\omega_{i}}{\omega_{mp}}&\omega_{ i}<\omega_{mp}\\ \frac{1}{\omega_{mp}-\omega_{me}}+\frac{\omega_{m}}{\omega_{mp}-\omega_{mp}}& \omega_{i}>\omega_{mp}\end{array}\right. \tag{4}\]  
Figure 11: Histogram of edge width under different blurring degrees of “womanhat”.  
Figure 12: The distance factor variation relationship in Equation (3).  
\[d(\omega_{i})=\left\{\begin{array}{cc}\dfrac{\omega_{i}(2\omega_{mp}-\omega_{i})} {\omega_{mp}{}^{2}}&\omega_{i}<\omega_{mp}\\ 1&\omega_{i}=\omega_{mp}\\ \dfrac{(\omega_{m}-\omega_{i})\left(\omega_{i}>2\omega_{mp}+\omega_{m}\right)} {\left(\omega_{mp}-\omega_{m}\right)^{2}}&\omega_{i}>\omega_{mp}\end{array}\right. \tag{5}\]