# Fundus Image Registration Technique Based on Local Feature of Retinal Vessels
## 3 Methodology
### Stage 2: Feature Extraction
#### 3.2.1 Feature Detection Module  
The feature detection module examines local patches in the images of the hierarchical Gaussian scale space to detect extrema within the curvature shape of various sizes. This module involves three main steps, as explained below. 1. STEP 1: Building a hierarchical Gaussian scale space  
The initial step of the feature detection module is to build a hierarchical Gaussian scale space. The hierarchical Gaussian scale space enables the detection of the candidate feature points on various sizes of retinal vessels at the lower octave as the images are larger and finer with detailed information. At the higher octave, the candidate feature points are detected on thicker retinal vessels as the images are smaller and coarser with prominent information. Building the hierarchical Gaussian scale space \((G)\) involves generating three octaves \((P=3\mid p=0,\dots,P-1)\) and six levels \((Q=6\mid q=-1,\ \cdots,Q-2)\) per octave, as in [15; 31]. Figure 2: Overview of CURVE feature extraction in Stage 2. CURVE is composed of a feature detection module and feature selection module. The initial Gaussian image \(G_{p,q}\) at \(p=0\) and \(q=-1\) is created through convolution of input image \(I\) with width of relative Gaussian kernel \(\tilde{\sigma}_{p,q}\) at \(p=0\) and \(q=-1\) as follows:  
\[G_{0,-1}=I*\tilde{\sigma}_{0,-1} \tag{2}\]  
with, \(\tilde{\sigma}_{0,-1}\) is denoted by:  
\[\tilde{\sigma}_{0,-1}=\sqrt{\sigma_{0,-1}^{2}-\sigma_{s}^{2}} \tag{3}\]  
The width of the relative Gaussian kernel \(\tilde{\sigma}_{p,q}\) assumes the input image \(I\) is pre-filtered with a sampling Gaussian kernel \(\sigma_{s}\geq 0.5\)[15]. Thus, \(\sigma_{0,-1}\) can be expressed as in [15; 31]:  
\[\sigma_{0,-1}=\sigma_{0}.2^{-1/Q-3} \tag{4}\]  
where, \(\sigma_{0}=1.6\) is the base width of the Gaussian kernel. \[\tilde{\sigma}_{0,-1}=\sqrt{\sigma_{0,-1}^{2}-\sigma_{s}^{2}} \tag{5}\]  
To obtain \(G_{p,-1}\) at higher octave \(p\in[1,\dots,P-1]\), \(G_{p-1,2}\) is downsampled by half. The subsequent \(G_{p,q}\) at \(p\in[0,\dots,P-1]\) and \(q\in[0,\dots,Q-2]\) can be obtained from the convolution between \(G_{p,-1}\) in the respective octave with the relative Gaussian kernel of width \(\tilde{\sigma}_{q}\) given by:  
\[\tilde{\sigma}_{q}=\sigma_{0}.\sqrt{2^{2q/Q-3}-1} \tag{6}\]  
(b) STEP 2: Detecting local extrema  
The feature detection module continues with the detection of extrema within the local patches of 3 \(\times\) 3 pixels. An extremum represents the maximum or minimum intensity value of the center pixel compared to the eight immediate neighbors in the local patch. The local patches across the image are overlapped by 1/3 of its size. The extrema found near the border of the field of view (FOV) are excluded from further processing using a mask image. (c) STEP 3: Test extrema if within curvature structure  
The retinal vessels generally exhibit curvature shape in 3-dimensions. Therefore, the extrema are tested if they are within the curvature structure by performing two tests as reported in [32]. These tests are the inner ring test and outer ring test. * STEP 3(a): Inner ring test  
The inner ring test considers eight pixels surrounding an extremum \((a_{j}\mid j\in[1,\dots,\ 8])\), as depicted in Figure 3a. Four out of eight pixels are tested at a time for patterns \(\times\) and \(+\), as shown in Figure 3b-e. These patterns are formed when the intensities of two opposing pixels are brighter (dark green dot) than the other two opposing pixels in orthogonal (pink dot). The extrema can pass this test with one or two patterns. Then, the central intensity value \(\beta\) is estimated by taking the median value of four pixels if the extremum passes with one pattern, and eight pixels if it passes with two patterns. The extrema that failed the inner ring test are eliminated. Figure 3: Inner ring test. (**a**) Eight pixels denoted by \(a_{j},\ j\in[1,\dots,\ 8]\) surrounding an extremum, \(e\). (**b**,**c**) Patterns in the shape of \(\times\). (**d**,**e**) Patterns in the shape of \(+\).