# Speckle Noise Reduction in Digital Holography Using a DMD and Multi-Hologram Resampling
## 4 Digital Holograms Resampling  
To complement the speckle reduction obtained from the multiple registered holograms, we studied a digital resampling scheme, where we generate several synthetic holograms from the original recorded ones. These new holograms are fabricated to increase the randomness of the speckle for each reconstructed image, thus allowing a larger speckle decrease in the final averaged image.  
We interpret the set of \(h\) holograms recorded as a 3D array, where a 2D slice corresponds to a single original hologram. The synthetic holograms are of identical size to the originals \(N\times N\) and are generated from a random sampling of the full 3D volume. This sampling is done by multiplication with different random binary masks \(M_{i}\) and the accumulation of the results as it is illustrated in Figure 4. The resulting synthetic hologram is composed of a series of patches that were contributed by the original holograms. The size of the patches \(G\) and the matching of masks and holograms controls the level of randomness introduced on the synthetic hologram. With a smaller patch size, the binary masks become more complex, and the synthetic hologram less resembles any of the original. The number of masks required to generate a synthetic hologram is \(b=(N/G)^{2}\). We compute the masks to maximize the number of recorded holograms that contribute. If \(b=h\) then all holograms will always equally contribute to the generation of a synthetic one, what changes from one to the other is the location of the patches in the mask. Additionally for this case, every mask will only contain one patch. If \(b<h\) then only a subset of the holograms will contribute to a new resampled one. To ensure maximum randomness, we use a selection without replacement from the set of \(h\) holograms, so that no original is repeated. Again, each mask contains also a single patch. An example of this case is illustrated in Figure 4 where \(N=2048\), \(G=512\) producing \(b=16\). The synthetic hologram receives contributions of a subset of 16 holograms from the full set of \(h=20\). To generate a new different synthetic, we randomize the location of the patches and select a new subset of holograms. If \(b>h\) then the binary masks will contain multiple patches in them, as each synthetic hologram will have repeated contributions from the originals. Each mask \(M_{i}\) is computed to have approximately the same number of patches, to ensure that no single original hologram is being preferred. This ensures a high level of randomness in the resampled holograms.  
The patch size has to be designed to provide enough randomness and to utilize the full amount of recorded holograms \(h\). However there are issues of loss of resolution for smaller values of \(G\), which are discussed in a further section. In equation form, the synthetic hologram is obtained as  
\[\tilde{H}=\sum_{i}^{b}M_{i}H_{i}, \tag{9}\]  
where the masks fulfill the sampling condition \(\sum M_{i}=\mathbf{1}_{N\times N}\). Repeating the process and computing a new random distribution of masks generates more synthetic holograms, even surpassing the number of recorded holograms.