# Coherence Enhancement Based on Recursive Anisotropic Scale-Space with Adaptive Kernels
## 3 Recursive Anisotropic Diffusion  
In this section, we propose a recursive anisotropic diffusion process based on an anisotropic Gaussian kernel that is determined using the orientation of the local features. Let \(G(x;\sigma_{1},\sigma_{2})\) be a Gaussian kernel in the spatial domain \(x=(x_{1},x_{2})\in\Omega\) with the standard deviations \(\sigma_{1}\) and \(\sigma_{2}\) as follows:  
\[G(x;\sigma_{1},\sigma_{2})=\frac{1}{2\pi\sigma_{1}\sigma_{2}}\exp\left(-\frac {x_{1}^{2}}{2\sigma_{1}^{2}}-\frac{x_{2}^{2}}{2\sigma_{2}^{2}}\right) \tag{8}\]  
where \(x=(x_{1},x_{2})\in\Omega\), and \(\sigma_{1}\) and \(\sigma_{2}\) are the standard deviations in the \(x_{1}\) and \(x_{2}\)-directions, respectively. Let \(J_{(\sigma_{1},\sigma_{2})}\) be an image blurred by an anisotropic Gaussian kernel \(G(x;\sigma_{1},\sigma_{2})\) defined by  
\[J(x;\sigma_{1},\sigma_{2})=(G(\sigma_{1},\sigma_{2})*I)(x). \tag{9}\]  
We propose an anisotropic diffusion process based on the structure tensor computed from the blurred image \(J(x;\sigma_{1},\sigma_{2})\) with an anisotropic Gaussian kernel \(G(x;\sigma_{1},\sigma_{2})\) as follows:  
\[J_{(t+1)}(x;\sigma_{1},\sigma_{2})=(G(\sigma_{1},\sigma_{2})*J_{t})(x) \tag{10}\]  
where \(t\) is a scale parameter based on the anisotropic Gaussian kernel \(G(\sigma_{1},\sigma_{2})\). The shape of the Gaussian kernel \(G(x;\sigma_{1},\sigma_{2})\) is recursively determined by the structure tensor computed from the blurred image \(J(x;\sigma_{1},\sigma_{2})\) in such a way that the local geometrical features are recursively characterized. In the analysis of local image features, the structure tensor \(S_{t}(x)\) at scale \(t\) is defined by  
\[S_{t}(x)=\
abla J_{t}(x;\sigma_{1},\sigma_{2})\otimes\
abla J_{t}(x;\sigma_{1 },\sigma_{2}) \tag{11}\]  
where \(J_{t}\) is the image diffused by the anisotropic Gaussian kernel \(G(\sigma_{1},\sigma_{2})\). Eigen-analysis is performed for extracting local image features as follows:  
\[S_{t}(x)= \begin{bmatrix}v_{1}&v_{2}\end{bmatrix}\begin{bmatrix}\lambda_{1}&0 \\ 0&\lambda_{2}\end{bmatrix}\begin{bmatrix}v_{1}^{T}\\ v_{2}^{T}\end{bmatrix}  \tag{12}\]  
where \(v_{1}\) and \(v_{2}\) are the eigenvectors, and \(\lambda_{1}\) and \(\lambda_{2}\) are their corresponding eigenvalues. Then, the anisotropic smoothing kernel \(G(\sigma_{1},\sigma_{2})\) is determined based on the eigenvalues \(\lambda_{1}\) and \(\lambda_{2}\) as follows:  
\[\sigma_{1}=\frac{\lambda_{1}}{\sqrt{\lambda_{1}^{2}+\lambda_{2}^{2}}},\quad \sigma_{2}=\frac{\lambda_{2}}{\sqrt{\lambda_{1}^{2}+\lambda_{2}^{2}}}. \tag{13}\]  
A local geometric feature obtained from the image is characterized by the eigenvalues \(\lambda_{1}\) and \(\lambda_{2}\) computed from the structure tensor \(S_{t}\) at scale \(feature such as an edge. The diffusion process is performed along the direction of a larger eigenvector in proportion to the corresponding eigenvalue as follows:  
\[\frac{\partial u}{\partial t}=\operatorname{div}\left(S_{t}\
abla J_{t}\right). \tag{14}\]  
The structure tensor \(S_{t}\) at scale \(t\) is computed based on the blurred image \(J_{t}\) with an anisotropic kernel \(G(\sigma_{1},\sigma_{2})\). The shape of the kernel is recursively determined based on the local features characterized by the eigenvalues of the structure tensor. Thus, the proposed algorithm is designed to improve the characterization power with regard to analyzing the local geometries of image features while being robust against insignificant intensity perturbations. This recursive anisotropic scale-space with improved geometrical features can be useful in further higher-level recognition tasks such as segmentation and recognition. The algorithm of the proposed recursive anisotropic diffusion process is presented as Algorithm 1.