# Adaptive Truncation Threshold Determination for Multimode Fiber Single-Pixel Imaging
## 2 Method
### Experimental Design, Implementation, and Evaluation
#### 2.3.2 Implementation of Dynamically Changing Noise Levels  
To verify the adaptation capability of ATTD, two methods were adopted to dynamically change noise levels in simulations and realistic experiments.  
First, the measurement matrix should be obtained via realistic calibration, as shown in Figure 2. Polarized and expanded 532 nm coherent light was modulated by a digital micro-mirror device (DMD). Then, it was shaped by an iris and coupled into fibers via collimator C1. After transmission, an output speckle pattern was collimated via C2. Then, 2500 pseudo-random illumination patterns were consecutively captured by a CMOS camera and, finally, shaped into \(\mathbf{A}_{(0,0)}\), where the sub-label represents the initial translation stage (TS) position. Note that the VAR and TOL parameters of ATTD were calibrated via simulations using \(\mathbf{A}_{(0,0)}\). Here, TOL was set at 0.4 (refer to Appendix A).  
Then, in simulation, the noisy simulated BD signal sequence (\(\mathbf{y}_{\text{sim}}=\mathbf{A}_{(0,0)}\mathbf{x}_{\text{TO}}+\mathbf{e}(\text {ratio})\)) was created by adding additive Gaussian noise with an adjustable ratio to the simulated BD signal (for details on the computation of the ratio, please refer to Algorithm A2 in Appendix A). Here, \(\mathbf{x}_{\text{TO}}\) depicts GI letters comprising pixelated blocks, as shown in Figure 3a.  
Figure 3: (**a**) Ground truth of \(\mathbf{x}_{\text{TO}}\) and adaptive performance comparison using simulated noises (ratio = \(-70\) dB, \(-35\) dB, \(-30\) dB, and \(-28\) dB) using (**b**) clairvoyant benchmark \(k_{c}\), (**c**) ATTD \(k_{d}\), (**d**) fixed \(k_{t}\), and (**e**) SURE with a known noise ratio. The truncation threshold and Pearson correlation with clairvoyant images are marked in each image. Above each column, the noise ratio is denoted.  
Figure 2: Experimental setup. Laser: 532 nm coherent light. P: polarizer. BE: beam expander. C1/C2: fiber collimator (Thorlabs, F220 FC-532). DMD: digital micro-mirror device (VIALUX V7001). Each loaded random pattern consists of half ones and half zeros. MMF: a 50 cm multimode fiber (Corning OM3, graded-index fiber around 2232 modes/polarization). TO: transmissive object x. CMOS camera (XiQ, MQ022 RG-CM). BD: bucket detector (the camera was also used as a BD by summing all pixels into a single value). TS: millimeter 2D translation stage. TSVD: truncated singular value decomposition. Each captured pattern was downsampled from 300 x 300 to 150 x 150 pixels for efficiency.  
Finally, in realistic imaging experiments, dynamical changes in noise levels were realized via TS movement. A transmissive mask corresponding to \(\mathbf{x}_{\text{TO}}\) was placed in front of the camera. The camera, functioning as a BD, captured transmitted light as a single-pixel sum. After the same modulations as for calibration, the BD signal was registered as a column vector (\(\mathbf{y}\)). Noise levels were manipulated by a bending MMF attached to TS, with various positions \((m,n)\) altering the noise level. Disturbed BD signals (\(\mathbf{y}_{(m,n)}\)) could be recorded by moving TS, causing speckles (\(\mathbf{A}_{(m,n)}\)) being shone on targets other than \(\mathbf{A}_{(0,0)}\) as recorded in calibration. This illumination difference is equivalent to adding noise to a BD signal if it sticks to \(\mathbf{A}_{(0,0)}\) for recovery. For endoscopy, only \(\mathbf{A}_{(0,0)}\) could be obtained because \(\mathbf{A}_{(m,n)}\) was inaccessible after MMF entered body. Therefore, the target is generally restored by the initial \(\mathbf{A}_{(0,0)}\) and disturbed \(\mathbf{y}_{(m,n)}\) (mismatch problem [21; 35]).