# Analysis of Blur Measure Operators for Single Image Blur Segmentation
## Appendix A Blur Measure Operators
### Derivative-Based Operators  
\([DER01]\)_Gradient Histogram Span_  
The gradient magnitude of sharp images tends to be heavy-tailed distribution than a Gaussian distribution [11; 17; 57], and thus it can be modeled by a Gaussian mixture model (GMM) of two components given by: \(GMM(x,y)=\sum_{(i,j)\in\Omega(x,y)}[a_{1}\exp\frac{(g(i,j)-\mu_{1})^{2}}{ \sigma_{1}}+a_{2}\exp\frac{(g(i,j)-\mu_{2})^{2}}{\sigma_{2}}]\), where \(a_{1}\) and \(a_{2}\) are the relative weights of Gaussian components, \(\mu_{1}\) and \(\mu_{2}\) are the mean with value \(\mu_{1}=\mu_{2}=0\), \(\sigma_{1}\) and \(\sigma_{2}\) are the standard deviations with \(\sigma_{1}>\sigma_{2}\), and \(g(i,j)\) is the image gradient magnitude at pixel \((i,j)\). The blur measure is:  
\[M_{GHS}(x,y)=\sigma_{1}. \tag{1}\]  
\([DER02]\)_Kurtosis_  
The blur measure by computing kurtosis [11] is given by  
\[M_{K}(x,y)=\min(ln(K(I_{x})+3),ln(K(I_{y})+3)), \tag{2}\]  
where \(K(a)=\frac{E[(a-\mu)^{4}]}{E^{2}[(a-\mu)^{4}]}-3\) is kurtosis such that \(E[. ]\) is the expectation operator for input data vector \(a\) with mean \(\mu\), and \(I_{x}\), \(I_{y}\) are the gradients of \(I\) in \(x\) and \(y\)-directions, respectively. \([DER03]\)_Gaussian Derivative_  
The first order Gaussian derivative as used in autofocusing [58] can also be used for blur calculation  
\[M_{GD}(x,y)=\sum_{(i,j)\in\Omega(x,y)}\bigg{(}(I\otimes G_{x}(i,j))^{2}+(I \otimes G_{y}(i,j))^{2}\bigg{)}, \tag{3}\]  
where \(\otimes\) is the convolution operator, and \(G_{x}\) and \(G_{y}\) are the partial derivatives of Gaussian function \(G(x,y,\sigma)\) in the \(x\) and \(y\)-directions, respectively. \([DER04]\)_Gradient Energy_  
The sum of squares of first partial derivatives in the \(x\) and \(y\)-directions has been used as focus measure [59] and can also by used for blur measurement \[M_{GEN}(x,y)=\sum_{(i,j)\in\Omega(x,y)}\bigg{(}(I_{x}(i,j)^{2}+(I_{y}(i,j)^{2}) \bigg{)}, \tag{10}\]  
where \(I_{x}(i,j)=I(i+1,j)-I(i,j)\) and \(I_{y}(i,j)=I(i,j+1)-I(i,j)\). \([DER05]\)_Squared Gradient_  
As [60] proposed it to be the image quality, the square of the image gradient in only one direction (horizontal) can also be considered as the blur measure for a pixel (\(x\),\(y\)) in a neighborhood window \(\Omega(x,y)\)  
\[M_{SCR}(x,y)=\sum_{(i,j)\in\Omega(x,y)}I_{x}(i,j)^{2}. \tag{11}\]  
\([DER06]\)_Tenengrad_  
The well-celebrated focus measure based on image gradients obtained by convolving the image with the Sobel operator [61] can be used as a blur measure  
\[M_{TEN}(x,y)=\sum_{(i,j)\in\Omega(x,y)}\bigg{(}S_{x}(i,j)^{2}+S_{y}(i,j)^{2} \bigg{)}, \tag{12}\]  
where \(S_{x}\) and \(S_{y}\) are the image gradients in \(x\) and \(y\)-directions. \([DER07]\)_Tenengrad Variance_  
The variance of the image gradient magnitudes as used in [61] can be used as blur measure  
\[M_{TVR}(x,y)=\sum_{(i,j)\in\Omega(x,y)}\bigg{(}S(i,j)-\bar{S}\bigg{)}^{2}, \tag{13}\]  
where \(S(i,j)=\)\(\sqrt{S_{x}(i,j)^{2}+S_{y}(i,j)^{2}}\) represents the gradient magnitude at pixel location \((i,j)\) such that \(S_{x}\) and \(S_{y}\) are the image gradients obtained by convolving the image with the Sobel operator in \(x\) and \(y\)-directions, respectively. \(\bar{S}\) is the mean of gradient magnitudes in the neighborhood window and it is given by \(\bar{S}=\sum_{(i,j)\in\Omega(x,y)}S(i,j)\). \([DER08]\)_Energy of Laplacian_  
The energy of the second derivatives in a local neighborhood window \(\Omega(x,y)\) of the image measures the sharpness for the central pixel \((x,y)\)[59]  
\[M_{EL}(x,y)=\sum_{(i,j)\in\Omega(x,y)}\Delta I(i,j)^{2}, \tag{14}\]  
where \(\Delta I\) is the image Laplacian obtained by convolving \(I\) with the Laplacian mask. \([DER09]\)_Modified Laplacian_  
By taking the absolute values of the second derivatives in \(x\) and \(y\) directions, the focus measure proposed by [62] can be computed as  
\[M_{ML}(x,y)=\sum_{(i,j)\in\Omega(x,y)}\Delta_{m}I(i,j), \tag{15}\]where \(\Delta_{m}I=|I\otimes L_{x}|+|I\otimes L_{y}|\) is the modified Laplacian of \(I\) and \(\otimes\) is the convolution operator.