## 2 Modified Steering Kernel and Image Matching
### Modified Steering Kernel Weight and Image Matching  
The steering kernel has a shape in which the Gaussian weights are inclined according to the gradient characteristics of the local region. As the steering kernel only includes fragmentary information of the local area, smoothing occurs in the resulting image. We used a matching window and image matching to assign large weights to regions with similar pixel distributions.  
The matching window \(M_{x,y}(k,\ l)\) is set around the pixel coordinates \(x,y\) located inside the matching area and is set to \((2s+1)\times(2s+1)\) of the same size as the center window to compare similarities between the two areas.  
The proposed algorithm performs a  
is computed by comparing the pixel values at the same positions inside the two masks, where \(t_{x,y}\) becomes smaller as the pixel value difference between the two masks decreases.  
Figure 1 illustrates an example of image matching proposed by this paper. The image used in the example is an 8-bit grey image distorted due to AWGN at \(\sigma=25\). Figure 2 shows a zoomed view of the center of Figure 1 and matching windows A, B, and C.  
If the coefficients used for calculation of weights are \(\alpha=0.1\), \(h=1.5\), \(g=10\), and \(\hat{d}=1.5\), the matching window A is a region with similar distribution of pixel values, resulting in \(t_{x,y}=0.1038\). The matching window B is a region with largely different distribution of pixel values, resulting in \(t_{x,y}=-2.3351\). The matching window C is a region with the most similar distribution of pixel values to the center window, resulting \(t_{x,y}=0.5135\), which exhibits the largest value among the three matching windows in Figure 1. Similar to the matching window B, the regions with large differences in pixel value distributions between the two windows may have negative weights, and using negative values in result calculations may result in errors. Thus, as shown in the following mathematical expression, the proposed algorithm establishes the weight as 0 when \(t_{x,y}\) is negative.  
In this case, negative values adversely affect the final value during calculation. Thus, the proposed algorithm uses the following formula to exclude negative values from Equation (6):  
Figure 1: Example of image matching on test image.  
Figure 2: Enlarged image of sampling area in test image 1 **(a)** Center window **(b)** Matching window A (\(t_{x,y}=0.1038\)) **(c)** Matching window B (\(t_{x,y}=-2.3351\)) **(d)** Matching window C (\(t_{x,y}=0.5135\)).  
\[T_{x,y}=\begin{bmatrix}max\{(t_{1,1}),\,0\}&max\{(t_{1,2}),\,0\}&&max\{\left(t_{1,y} \right),\,0\}\\ &\cdots&\\ max\{(t_{2,1}),\,0\}&max\{(t_{2,2}),\,0\}&&max\{\left(t_{2,y}\right),\,0\}\\ &\vdots&\ddots&\vdots\\ \\ max\{(t_{x,1}),\,0\}&max\{(t_{x,2}),\,0\}&&\cdots&max\{\left(t_{x,y}\right),\,0 \}\end{bmatrix}. \tag{7}\]  
To further emphasize area of higher similarity, the weights given differentially according to the threshold are applied to the local steering kernel \(\omega_{x,y}^{LSK}\). The modified steering kernel weights \(U_{x,y}\) calculated based on the two weights is as follows:  
\[U_{x,y}=\begin{bmatrix}T_{1,1}\;\omega_{1,1}^{LSK}&T_{1,2}\;\omega_{1,2}^{LSK} &&T_{1,y}\;\omega_{1,y}^{LSK}\\ T_{2,1}\;\omega_{2,1}^{LSK}&T_{2,2}\;\omega_{2,2}^{LSK}&&T_{2,y}\;\omega_{2,y}^ {LSK}\\ &\vdots&&\ddots&\vdots\\ T_{x,1}\;\omega_{x,1}^{LSK}&T_{x,2}\;\omega_{x,2}^{LSK}&\cdots&T_{x,y}\; \omega_{x,y}^{LSK}\end{bmatrix}. \tag{8}\]  
The filtering resultant image \(\hat{Z}_{i,j}\) obtained from Equation (8) is expressed as:  
\[\hat{Z}_{i,j}=\frac{1}{u}\sum_{x,y=-g}^{g}U_{x,y}I_{x,y}, \tag{9}\]  
\(x,y\) in Equation (9) are discrete variables representing the coordinates inside the matching area as integers. \(u\) denotes a normalizing parameter of the weight \(U_{x,y}\).  
Figure 3 shows the flowchart of the proposed algorithm. The flowchart shows the modified steering kernel weight setting, image matching, and filter output calculation process of the proposed algorithm.  
Figure 3: Flowchart of proposed filter algorithm.