# Two Low-Level Feature Distributions Based No Reference Image Quality Assessment
## 3 TLLFD for NR IQA
### Low-Level Feature Distribution
#### 3.2.2 Gradient  
The edges often appear in the position where the content of target and background changes, and often represent the contours of target in the images. Therefore, image edge extraction plays a key role in the processing of computer vision systems.  
Gradient is usually calculated by convolving the image with a linear filter, such as the classic Prewitt [24] and Scharr [25] filters or other filters for specific tasks. The simplest Prewitt filter is used to calculate the gradient. With Prewitt gradient [24] operator, the partial derivatives \(G_{x}(x,y)\) and \(G_{y}(x,y)\) of the distorted image \(f(x,y)\) are calculated as follows:  
\[\begin{array}{c}G_{x}(x,y)=\frac{1}{3}\left[\begin{array}{ccc}1&1&1\\ 0&0&0\\ -1&-1&-1\end{array}\right]\ast f(x,y)\\ G_{y}(x,y)=\frac{1}{3}\left[\begin{array}{ccc}1&0&-1\\ 1&0&-1\\ 1&0&-1\end{array}\right]\ast f(x,y)\end{array} \tag{11}\]  
where the symbol \"*\" denotes a convolution operation and then the gradient magnitude \(G(x,y)\) of the image \(f(x,y)\) is computed as:  
\[G(x,y)=\sqrt{\left(G_{x}(x,y)\right)^{2}+\left(G_{y}(x,y)\right)^{2}} \tag{12}\]  
Statistical information is an effective and robust way to characterize local features. For example, researchers tend to use probability distributions to fit wavelet coefficients, and use the histogram techniques to capture the distribution of features of LBP output, etc. The Weibull probability density function can be written as:  
\[p(x)=\frac{\gamma}{\beta}\left(\frac{x}{\beta}\right)^{\gamma-1}\exp\left(- \left(\frac{x}{\beta}\right)^{\gamma}\right) \tag{13}\]  
where \(x\) is the image gradient magnitude, \(\gamma>0\) is the parameter of shape, and \(\beta>0\) is the parameter of ratio.  
Figure 1 shows a reference image in LIVE database and its five distorted images: JPEG2000 (JP2K) compression, JPEG, White Noise (WN), Gauss Blur (GB), and Fast Fading (FF). Figure 2 shows the gradient amplitude distribution of the six images in Figure 1. Among them, the distribution of WN is more uniform and the peak value of FF is the  
highest. This is because image quality degradation arises from distortion and the gradient distribution level is also affected by the distortion amount. The scatter plot of Figure 3 shows the Weibull parameter distribution of the six image in Figure 1. In the longitudinal observation, the separation of FF, GB, and WN is obvious. From the horizontal observation, JPEG is distinguished from the reference image clearly. They are different because image with different distortion types may have drastically different parameter. This illustrates that adopting the sensitivity of the shape and proportional parameters of the Weibull distribution to describe different distortion types is effective. It can be observed from Figure 3 that the gradient size of the distorted image follows a two-parameter Weibull distribution, and the human brain response is strongly correlated with the Weibull image for visual perception [26].  
Figure 1: A reference image and its five distortion images in LIVE. (**a**) Reference image; (**b**) JPEG 2000 image; (**c**) JPEG image; (**d**) WN image; (**e**) GB image; (**f**) FF image.  
Figure 2: Gradient amplitude distribution of different distorted image.