## 2 Coded Aperture Compressive Temporal Imaging (CACTI)
### Forward Model for CACTI  
The forward model for CACTI is shown in Figure 2b. The space-time data cube of the scene is herein supposed to be \(x^{\prime}f_{0}(x^{\prime},y^{\prime},t)\) at the coded aperture. The data cube after the coded aperture is:  
\[f_{1}\big{(}x^{\prime},y^{\prime},t\big{)}=T\big{(}x^{\prime},y^{\prime},t \big{)}f_{0}\big{(}x^{\prime},y^{\prime},t\big{)} \tag{1}\]  
where \(T(x^{\prime},y^{\prime},t)\) is the transmission function that represents the coded aperture shifting in time. The coding element and the detector pixel are of the same size \(\Delta\). Hence:  
\[T\big{(}x^{\prime},y^{\prime},t\big{)}=\sum_{i,j,t}t_{i,j,t}\text{rect}\Big{(} \frac{x}{\Delta}-i,\ \frac{y}{\Delta}-j\Big{)} \tag{2}\]  
In the equation, \(\mathbf{t}_{i,j,t}\) stands for the binary value at element \((i,j)\) of the coded aperture at time \(t\). After further propagation through the relay lens, the data cube at the detector plane is:  
\[ \begin{array}{ll}f_{2}(x,y,t)&=\iint f_{1}(x^{\prime},y^{\prime},t)h(x^{ \prime}-x,y^{\prime}-y)dx^{\prime}dy^{\prime}\\ &=\iint T(x^{\prime},y^{\prime},t)f_{0}(x^{\prime},y^{\prime},t)h(x^{\prime}- x,y^{\prime}-y)dx^{\prime}dy^{\prime}\end{array}  \tag{3}\]  
where \(h(x^{\prime}-x,y^{\prime}-y)\) represents the shift-invariant optical impulse response of the relay lens. The detector conducts integration of the changing scenes within the exposure time. The pixels of the detector array may induce the spatial discrete function as:  
\[p(m,n;x,y)=\text{rect}\Big{(}\frac{x}{\Delta}-m,\ \frac{y}{\Delta}-n\Big{)} \tag{4}\]  
As a result, the measurement at the pixel \((m,n)\) of detector array is:  
\[g_{m,n}=\int\iint f_{2}\big{(}x^{\prime},y^{\prime},t\big{)}p(m,n;x,y)dx^{ \prime}dy^{\prime}dt\approx\sum_{i,j,k}t_{i,j,k}f_{i,j,k}\Omega_{i,j,m,n} \tag{5}\]  
In the result, the function \(\Omega_{i,j,m,n}\) represents the spatial position of light, and does not vary with the time; \(t_{i,j,k}\) is the corresponding code model for the sub-image frame \(k\), and \(f_{i,j,k}\) is the corresponding scene. The maximal value of \(k\) should be the largest frame amount in the compression for one time period of observation. This relates to the compressive ratio of the system. In consideration of noises, the linear matrix can be written as:  
\[\mathbf{y}=\mathbf{\Phi}\mathbf{x}+\mathbf{n} \tag{6}\]  
where \(\mathbf{n}\) stands for the imaging noises of the system, and \(\mathbf{\Phi}\) is the time-variant transfer function as:  
\[\mathbf{\Phi}=\Big{[}\ \ \mathbf{\Phi}_{1}\ \ \ \mathbf{\Phi}_{2}\ \ \ \cdots\ \ \ \mathbf{\Phi}_{N_{f}}\ \Big{]} \tag{7}\]  
\[\mathbf{\Phi}_{k}=diag\Big{[}\ \ T_{1,1,k}\ \ \ T_{2,1,k}\ \ \ \cdots\ \ \ T_{\sqrt{N},\sqrt{N},k}\ \Big{]},k=1,\cdots,N_{f} \tag{8}\]  
where \(N_{f}\) is the number of video frames reconstructed from one low-speed coded snapshot and \(N_{f}\) also represents the compressive ratio in the temporal domain. In the forward model of CACTI, matrix \(\mathbf{\Phi}\) serves as the observation matrix in compressive sensing. The choice of the observation matrix is important to the reconstructed image quality irrespective of the selected reconstruction algorithm. To ensure the pseudo-randomness of the aperture code on all the moments of moving, the 50% random binary matrix was adopted to maintain the resolution of the coded aperture mask as the same as that of the sensor [1; 16]. [PERSON] et al. [17; 18] suggested the Gaussian mask with threshold, because the observation was most alike to the dense Gaussian matrix at that moment. [PERSON] et al. [19] proposed the normalized Gaussian matrix to equalize the luminous flux for each pixel. This method could spare the decoding for the static area in the scene, but not meet the conditions for random coding. [PERSON] et al. [8] provided the Shifted-Normalized coding method, which combined the advantages of [PERSON]'s and [PERSON]'s methods [16].