# Noise Suppressed Image Reconstruction for Quanta Image Sensors Based on Transformer Neural Networks
## 2 Background  
In this section, the noise composition of the QIS is analyzed and the mathematical model for imaging is provided. The formulation of the QIS imaging model is fundamental to QIS image reconstruction. Based on the QIS imaging principle, a QIS imaging model is established, as shown in Figure 2.  
Consider a light wave with intensity \(I(x,y,t)\) incident on a sensor with duty cycle \(T\) and integration time \(\Delta\). The mean number of photons, denoted as \(\theta\), received by a 'jot' with an area \(A\) during the integration time is expressed as follows:  
\[\theta=\iint\limits_{(x,y)\in A}\int_{T}^{T+\Delta}I(x,y,t)dxdydt, \tag{1}\]  
The probability of photon number \(Y\) the 'jot' which has a small size and a short time interval get satisfy the Poisson distribution:  
Figure 2: The imaging model of the QIS.  
\[P(Y=y)=\frac{e^{-\theta y}}{y!}, \tag{2}\]  
Dark current, generated by pixels in the absence of light, leads to the production of dark electrons, affecting the accuracy of photon counting. These electrons also follow a Poisson distribution.  
When considering spatio-temporal oversampling, the image information containing \(N\) light intensity \(c_{i}\) is reconstructed from M oversampled 'jots' \(\theta_{i}\). The spatio-temporal oversampling rate is represented as \(K=M/N\).  
If we use matrix-vector notation, the Poisson distribution of photons is represented as:  
\[\mathbf{\Theta_{photon}}=\mathbf{Gc}, \tag{3}\]  
where \(\mathbf{c}=[c_{0},\ldots,c_{N-1}]^{T}\) denotes the reconstructed light intensity, \(\mathbf{\Theta_{photon}}=[\theta_{0},\ldots,\theta_{M-1}]^{T}\) denotes the light intensity sampled at the \(M\) jots, and the matrix \(\mathbf{G}\in R^{M\times N}\) is a matrix representing the upsampling and the lowpass filter \(g_{k}\). The lowpass filter \(g_{k}\) can be assumed as a box-car. Now, total photons can be described as:  
\[\mathbf{\Theta_{tot}}=\mathbf{\Theta_{photon}}+\mathbf{\Theta_{dark}}, \tag{4}\]  
\[P([\mathbf{Y}]_{l}=y)=\frac{[\gamma\cdot\mathbf{\Theta_{tot}}]^{y}_{l}e^{-[\gamma \cdot\mathbf{\Theta_{tot}}]_{l}}}{y!}, \tag{5}\]  
where \(l=1,\ldots,N\), \(\gamma\) is the sensor gain, \(\mathbf{\Theta_{tot}}\in R^{N}\) is the mean number of electrons physically and \(\mathbf{Y}\) is the electrons really sensed by pixels.  
Once the electrons are sensed by the pixels, they undergo readout, which the analog circuit generates additive Gaussian noise, denoted as, \(\eta_{read}\sim N(0,\sigma_{read}^{2})\). Thus, the real number of electrons \(\mathbf{Z}\in R^{N}\) follows a Gaussian-Poisson distribution:  
\[P([\mathbf{Z}]_{l}=z)=\sum_{y=0}^{\infty}\bigg{(}\frac{[\gamma\cdot\mathbf{\Theta_ {tot}}]^{y}_{l}e^{-[\gamma\cdot\mathbf{\Theta_{tot}}]_{l}}}{y!}\cdot\frac{1}{ \sqrt{2\pi\sigma_{read}^{2}}}e^{-\frac{(z-y)^{2}}{2\sigma_{read}^{2}}}\bigg{)}, \tag{6}\]  
After readout, electrons are converted into digital codes by the ADC. Due to the BER [12] caused by mismatched ADC transition points, there exists difference between 'jots' [24]. In conclusion, the quantization process is modeled as:  
\[\mathbf{Q}=\bigg{\{}ADC\bigg{(}Gauss-Poiss(\gamma\cdot\mathbf{\Theta_{tot}}; \sigma_{read})+\mathbf{O}\bigg{)}\bigg{\}}, \tag{7}\]  
where \(\mathbf{O}\in R^{N\times N}\) represents ADC transition points mismatch.