# Sampling Based on Kalman Filter for Shape from Focus in the Presence of Noise
## 6 Results and Discussion
### Experimental Results
Tables 2-4 provide the quantitative performance of 3D shape recovery of the simulated cone using three focus measures, SML, GLV, and TEN, before and after filtering in the presence of Gaussian jitter noise. The order of the general performance of the focus measures is that SML is the best, then the GLV, and finally the TEN. In Before Filtering, it is difficult to distinguish the performance of the focus \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Focus Measure Operators** & **SML** & **GLV** & **TEN** \\ \hline Before Filtering & 20.1276 & 17.8644 & 16.0812 \\ After Particle Filtering & 20.4604 & 18.9504 & 18.7284 \\ After Bayesian Filtering & 22.3481 & 21.3897 & 21.1510 \\ After Kalman Filtering & 22.3588 & 21.5229 & 21.2859 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of focus measure operators with proposed method for simulated cone in the presence of Gaussian noise by using PSNR. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Focus Measure Operators** & **SML** & **GLV** & **TEN** \\ \hline Before Filtering & 9.2629 & 12.4038 & 15.2304 \\ After Particle Filtering & 9.1993 & 10.9459 & 11.2293 \\ After Bayesian Filtering & 7.3260 & 8.2659 & 8.4961 \\ After Kalman Filtering & 7.3169 & 8.1400 & 8.3652 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of focus measure operators with proposed method for simulated cone in the presence of Gaussian noise by using RMSE (Root Mean Square Error). SML: Sum of Modified Laplacian; GLV: Gray-Level Variance; TEN: Tenenbaum. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Focus Measure Operators** & **SML** & **GLV** & **TEN** \\ \hline Before Filtering & 0.7831 & 0.7430 & 0.7121 \\ After Particle Filtering & 0.7925 & 0.8157 & 0.7914 \\ After Bayesian Filtering & 0.9536 & 0.9427 & 0.9200 \\ After Kalman Filtering & 0.9541 & 0.9438 & 0.9206 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of focus measure operators with proposed method for simulated cone in the presence of Gaussian noise by using correlation. measures due to the jitter noise. However, in After Bayesian Filtering and After Kalman Filtering, it is shown in Tables 2-4 that the performance order of the focus measures is almost correct, as described above. The particle filter suitable for nonlinear systems does not remove jitter noise well in a linear SFF system. It is seen in Tables 2-4 that the performance order of the focus measures in After Particle Filtering is slightly different from the one presented above. Tables 5-7 provide the quantitative performance of 3D shape recovery of the simulated cone using three focus measures, SML, GLV, and TEN, before and after filtering in the presence of speckle noise. The performance order of the focus measures for each filtering technique is almost the same as that of focus measures when Gaussian jitter noise is present. However, in the presence of speckle noise, After Kalman Filtering and After Bayesian Filtering have poor performance in terms of RMSE and PSNR. This is because these two filters estimate the position of each 2D image after assuming the jitter noise to be Gaussian function. It is evident from Tables 2-7 that the best overall performance is that of the Kalman filter as the proposed method, which provides the optimal estimation results in a linear system. The Bayes filter comes second, and finally the particle filter, which estimates the optimal value in a nonlinear system. Tables 8 and 9 present the time taken to estimate the position of one image frame by using  
The computation time in Tables 8 and 9 is expressed in seconds. It is evident that the computation time of the Kalman filter was about 14 times better than the Bayes filter and about 80 times better than the particle filter. Figures 12-14 show the qualitative performance of 3D shape reconstruction of the experimented objects using three focus measures, SML, GLV, and TEN, before and after filtering in the presence of Gaussian noise.