# DTFS-eHarris: A High Accuracy Asynchronous Corner Detector for Event Cameras in Complex Scenes
## 3 Materials and Methods
### Corner Detection Refinement  
In this step, the local SAE will be extracted from the global SAE \(\mathcal{S}^{*}\) and then be normalized. For corner detection tasks, local SAE is usually expected to have significant gradient information between new and old events. [PERSON] et al. (2018) and [PERSON] et al. (2018) sorted the timestamps on the local SAE, assigning the latest 25 timestamps to 1 and the rest to 0. In addition, there are other SAE constructions, such as min-max normalization ([PERSON] et al., 2018) and exponential decay ([PERSON] et al., 2018). However, those methods completely ignore the time interval among events, which can not well reflect the temporal and spatial distribution of local SAE. Therefore, we propose a new normalization method that uses the Sigmoid function to normalize the timestamp information. Firstly, the timestamps stored in global SAE are transformed from the range of (0, +\(\infty\)) to a value between [0, 1]. To obtain clearer gradient information, the timestamp of the centre pixel on \(\mathcal{S}_{L}\) (the latest event) is used as the reference time and calculates relative time with the rest of the events \(\mathcal{S}_{L}\), as shown in Equation (7). For the normalization of local SAE, we do not expect the data to be distributed evenly. The newer the event, the closer we expect the value to be 1 and for the older event, we expect it to be close to 0. That is, for the time difference stored in local SAE (as shown in Figure 4a), the closer to 0, the closer the normalized value should be to 1; however, the value is close to 0. \[\Delta t=t_{ref}-t(x,y) \tag{7}\]  
where \(\Delta t\) is the relative time, \(t_{ref}\) indicates the timestamp of the middle pixel and \(t(x,y)\) denotes the timestamp at the position \((x,y)\). Inspired by the activation function of machine learning, we improved the Sigmoid function to obtain the nonlinear distribution. The proposed normalized method is shown in Equation (8) and Figure 5, named \(Sigmoid^{*}\). \[Sigmoid^{*}=1-\frac{\alpha}{\alpha+e^{-\beta\Delta t}} \tag{8}\]  
where two hyper-parameters \(\alpha\) and \(\beta\) are introduced into the original Sigmoid function, which is fine-tuned to adjust normalized results and can be changed based on the complexity of scenes. It has lower computation and clearer spatio-temporal distribution than binary normalization ([PERSON] et al., 2018), min-max normalization ([PERSON] et al., 2018) and exponential decay ([PERSON] et al., 2018). Figure 3: We compare the timestamps of the latest event of the pixels on two circles (blue and green) around the current event (in black). The inner (blue) and outer (green) circle around the current event (black). We initialize the \(\mathcal{A}\) (yellow) from the newest element and \(E_{CW}\) and \(E_{CCW}\) from the adjacent ones. Figure 6 presents the trends of \(Sigmoid^{*}\) with multi-parameters; in a word, smaller alpha and bigger beta are preferred for time-dense events, and vice versa. For this experiment, we set \(\alpha\) = 0.005 and \(\beta\) = 300 manually. It is obvious that when the relative time is close to 0, the function value is close to 1; with the increase in relative time, the function value has a sharp decline. Figure 4b is the result of \(Sigmoid^{*}\), and it is obvious that the results of Figure 4b,d are the best and our method has lower computation. Then, the Harris [19] detector is used on \(\mathcal{S}_{L}\) which is normalized by the \(Sigmoid^{*}\), and the score is calculated by Equations (9) and (11)  
\[M=\sum_{x,y}w(x,y) \begin{bmatrix}I_{x}^{2}&I_{x}I_{y}\\ I_{x}I_{y}&I_{y}^{2}\\ \end{bmatrix} = \begin{bmatrix}a&b\\ b&c\\ \end{bmatrix}  \tag{9}\]  
where \(I_{x}\) and \(I_{y}\) are the gradients of the patch in the \(x\) and \(y\) directions, respectively, and \(w(x,y)\) is a Gaussian filter with \(\sigma=1\), shown as Equation (10). \[w(x,y)=\frac{1}{2\pi\sigma^{2}}e^{-\frac{(x^{2}+y^{2})}{2\sigma^{2}}} \tag{10}\]  
Figure 4: SAE calculated by different normalization methods. (**a**) Raw data of timestamp.