# Analysis of Blur Measure Operators for Single Image Blur Segmentation
## 3 Material and Method
### Methodology
#### 3.2.2 Blur Classification  
The mentioned blur measure operators have been applied on the images of the data set in order to obtain their respective blur maps. After acquiring the initial blur map, pixels need to be declared sharp or blurred, and they need to be separated into blurred and sharp regions respectively. This blur classification phenomenon has been carried out in two steps. In the first step, the initial normalized blur map has been divided into three classes by applying a double threshold \(T_{1}\) and \(T_{2}\), as given by,  
\[\alpha(x,y)=\begin{cases}0,&\text{if }\hat{M}(x,y)<T_{1}\\ 1,&\text{if }\hat{M}(x,y)>T_{2}\\ I_{b}(x,y),&\text{otherwise}.\end{cases} \tag{3}\]  
where \(\alpha(x,y)\) is the initial alpha map. Authors of [14] have used some fixed precomputed thresholds. However, since different blur measure operators give different blur measures for the same pixels, the classifying thresholds cannot be held fixed to some aprior. In fact, to acknowledge the diversity of each image and each blur measure operator, these thresholds are to be computed adaptively, for each image--operator pair so as to provide uniform and comparable results for the final blur maps. Therefore, we propose to apply thresholds by computing them adaptively. For this, interquartile range (IQR) of the initial normalized blur map of the image has been considered. IQR is a measure of statistical dispersion and variability, and it divides the data into four equal parts. Here, \(Q_{1}\) and \(Q_{2}\) are taken respectively as the first and third quartiles of the pixel intensity distribution of the image under consideration. By applying this IQR thresholding, pixels in the alpha matting step have been classified initially into three categories: (1) 1 s (2) 0 s and (3) yet to be decided, as expressed in Equation (3). The improved alpha map initialization through IQR can be seen in Figure 3 for the second image of Figure 1.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Sr. No.** & **Blur Operator** & **Abbr.** & **Sr. No.** & **Blur Operator** & **Abbr.** \\ \hline
1 & Gradient Histogram Span & DER01 & 17 & Gray-level local variance & STA06 \\
2 & Kurtosis & DER02 & 18 & Normalized Gray-level variance & STA07 \\
3 & Gaussian derivative & DER03 & 19 & Histogram entropy & STA08 \\
4 & Gradient energy & DER04 & 20 & DCT energy ratio & STA09 \\
5 & Squared gradient & DER05 & 21 & DCT reduced energy ratio & STA10 \\
6 & Tenengrad & DER06 & 22 & Power spectrum & TRA01 \\
7 & Tenengrad variance & DER07 & 23 & High-frequency multiscale Fusion and & TRA02 \\
8 & Energy of Laplacian & DER08 & 24 & Sum of wavelet coefficients & TRA03 \\
9 & Modified Laplacian & DER09 & 25 & Variance of wavelet coefficients & TRA04 \\
10 & Diagonal modified Laplacian & DER10 & 26 & Ratio of wavelet coefficients & TRA05 \\
11 & Variance of Laplacian & DER11 & 27 & Brenner’s measure & MIS01 \\
12 & Singular value decomposition & STA01 & 28 & Image contrast & MIS02 \\
13 & Sparsity of dark channel & STA02 & 29 & Image curvature measure & MIS03 \\
14 & Total variation & STA03 & 30 & Steerable filters-based & MIS04 \\
15 & Local binary pattern & STA04 & 31 & Spatial frequency & MIS05 \\
16 & Gray-level variance & STA05 & 32 & Vollath’s autocorrelation & MIS06 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Serial numbers and abbreviations to refer the blur measure operators.  
The pixels which could not have been classified as either 1 or 0 are refined through the optimization in the second step. This refinement of the pixels is achieved through the minimization of the cost function as proposed by [42]  
\[E(\hat{\alpha})=\hat{\alpha}^{T}\mathbf{L}\hat{\alpha}+\lambda(\hat{\alpha}- \alpha)^{T}(\hat{\alpha}-\alpha), \tag{4}\]  
where \(\mathbf{L}\) is the matting Laplacian matrix, \(\hat{\alpha}\) is the vectorized alpha map for the pixels in the IQR and \(\alpha\) is the vectorized alpha map as computed in Equation (3).