## 3 Spiking Neural Network  
### Membrane Potential and Spikes  
We use the analytical solution of the Hodgkin-Huxley (HH) model obtained with the assumptions of \(G_{Na}=0\) and \(G_{K}=0\) to solve the membrane potential defined by Equation (9) at each time step \(t\). According to [PERSON] [21] and [PERSON] [22], this analytical solution is given by the following equation for the membrane potential:  
\[v_{1}=(\frac{1}{gl})\{(-exp(\frac{glt}{C_{m}}))(I_{z}+70g_{l}+g_{l}E_{l})+I_{z }+g_{l}E_{l}\}. \tag{10}\]  
[PERSON] [21] and [PERSON] [22] showed that the membrane potential obtained by solving the HH model with numerical methods such as Runge-Kutta and the calculation using the analytical solution are nearly the same, therefore the above assumptions are reasonable. We find that this approach is successful in generating edge images, with an added advantage in processing low-exposure images. At each time step \(t\) and for each neuron, the membrane potential \(v_{1}\) is compared with the threshold voltage. If  
\[v_{1}>V_{Th}, \tag{11}\]  
the neuron will have a spike that is, \(S_{1}=1\) is assigned and \(v_{1}\) is reset to \(v_{reset}\), else the neuron will not spike, that is, \(S_{1}=0\) is assigned. We used six Gabor type filters, each filter representing a receptor field with a radius R = 5 pixels, with two filters each for vertical, horizontal and diagonal directions, respectively. The non-zero elements in the synaptic weight matrices of these Gabor type filters are derived using the scale factors:  
\[W_{ex}(r,f)=W_{ex}^{max}exp[-\frac{(r-x_{c})^{2}}{\delta_{r}^{2}}-\frac{(f-y_{ c})^{2}}{\delta_{f}^{2}}], \tag{12}\]  
\[W_{in}(r,f)=W_{in}^{max}exp[-\frac{(r-x_{c})^{2}}{\delta_{r}^{2}}-\frac{(f-y_{ c})^{2}}{\delta_{f}^{2}}], \tag{13}\]where \((x_{c},y_{c})\) is the center of the receptor field, \(\delta_{r}\), \(\delta_{f}\) are constants, and \(W_{ex}^{max}\), \(W_{in}^{max}\) are the maximum weights for the excitatory synapses and inhibitory synapses, respectively. The magnitude and the ratio of \(W_{ex}^{max}\) and \(W_{in}^{max}\) are adjusted such that the neuron does not fire in response to a uniform image within its receptive field. The size of the receptor field can be set in the range of 2 \(\times\) 2 to 6 \(\times\) 6. \(\delta_{r}\) and \(\delta_{f}\) control the sensitiveness to edges. Larger receptor field and larger \(\delta_{r}\), \(\delta_{f}\) values make the detector less sensitive to the noise, but edges become vague, so there is a trade-off between these values. The values of \(W_{ex}^{max}\), \(W_{in}^{max}\), \(\delta_{r}\) and \(\delta_{f}\) are chosen heuristically. Below, we list the weight matrices of the six filters used for feature generation along with the parameters and the condition that are used to generate these matrices. Matrices for Filter A: \(W_{ex}^{max}=0.7093\), \(W_{in}^{max}=0.3455\), \(\delta_{r}=2\), \(\delta_{f}=6\), \(W_{ex}(r,f)=0\) for \((r-x_{c})\leq 0\) and \(W_{in}(r,f)=0\) for \((r-x_{c})>0\). \(W_{ex}^{A}=\)  
\[ \begin{bmatrix}0&0&0&0&0\\ 0&0&0&0&0\\ 0&0&0&0&0\\ 0.49&0.54&0.55&0.54&0.49\\ 0.23&0.25&0.26&0.25&0.23\end{bmatrix} \]  
\(W_{in}^{A}=\)  
\[ \begin{bmatrix}0.11&0.12&0.13&0.12&0.11\\ 0.24&0.26&0.27&0.26&0.24\\ 0.31&0.34&0.35&0.34&0.31\\ 0&0&0&0&0\\ 0&0&0&0&0\end{bmatrix} \]  
Matrices for Filter B: \(W_{ex}^{max}=0.7093\), \(W_{in}^{max}=0.3455\), \(\delta_{r}=2\), \(\delta_{f}=6\), \(W_{ex}(r,f)=0\) for \((r-x_{c})\geq 0\) and \(W_{in}(r,f)=0\) for \((r-x_{c})<0\). \(W_{ex}^{B}=\)  
\[ \begin{bmatrix}0.23&0.25&0.26&0.25&0.23\\ 0.49&0.54&0.55&0.54&0.49\\ 0&0&0&0&0\\ 0&0&0&0&0\\ 0&0&0&0&0\end{bmatrix} \]  
\(W_{in}^{B}=\)  
\[ \begin{bmatrix}0&0&0&0&0\\ 0&0&0&0&0\\ 0.31&0.34&0.35&0.34&0.31\\ 0.24&0.26&0.27&0.26&0.24\\ 0.11&0.12&0.13&0.12&0.11\end{bmatrix} \]  
Matrices for Filter C: If \((f-y_{c})=\pm 1\), then \(W_{ex}^{max}=W_{in}^{max}=0.4455\), else \(W_{ex}=W_{in}=0.3455\). \(\delta_{r}=6\), \(\delta_{f}=2\), \(W_{ex}(r,f)=0\) for \((f-y_{c})\leq 0\) and \(W_{in}(r,f)=0\) for \((f-y_{c})\geq 0\). \(W_{ex}^{C}=\)  
\[