Planned intervention: On Thursday 19/09 between 05:30-06:30 (UTC), Zenodo will be unavailable because of a scheduled upgrade in our storage cluster.

There is a newer version of the record available.

Published July 6, 2021 | Version v2
Other Open

Supplementary Code for "Imaging biological tissue with high-throughput single-pixel compressive holography"

Creators

  • 1. Sun Yat-sen University

Contributors

Project leaders:

  • 1. Sun Yat-sen University
  • 2. Jinan University
  • 3. University of California

Description

This file contains two subfolders, of which the names are 'preparation for Hadamard-like patterns', 'holographic reconstruction', and 'data acquisition'. These three subfolders include the relevant codes that perform completely different functionalities during the demonstration of single-pixel holographic imaging. 

Here, we introduce their functionalities, respectively.

-------------------------------------------------------------------
Preparation of the Hadamard-like patterns (MATLAB)
-------------------------------------------------------------------

The file 'DMD_hadamard256.m' in this file folder is used to generate Hadamard-like patterns with orders up to 256 × 256. Hadamard-like patterns with different orders can be generated as well by adjusting the parameter 'number' in this file. The execution of this file with commercialized software MATLAB generates a sequence of Hadamard-like patterns in the format of .txt binary files. To minimize phase drifting caused by environmental disturbance during the experiment, the first order of Hadamard-like patterns (DC signal) is inserted after every 16 modulation patterns as the tracking base. Therefore, 73,728 patterns are generated in a sequence and it takes about 25 minutes to finish this one-time preparation.

A DMD (Texas Instrument DLP7000&DLPC410) is employed to project Hadamard-like patterns to the sample. The software and the control board of the DMD are provided by Vialux company (model number Vialux V7001). The Hadamard-like patterns in the format of .txt binary files can be uploaded to the random-access memory (RAM) in advance. Unfortunately, we are unable to provide a series of .txt files of Hadamard-like patterns in this folder as it occupies a large memory of about 50 Gbit (less than the 64Gbit of the RAM of the DMD). After execution of this MATLAB file, the regenerated .txt binary files would be collected in the default document 'data_image256_3_3_8bitplane_russia_persuitbasis2_txt'.

-------------------------------------------------------------------
Holographic reconstruction (MATLAB)
-------------------------------------------------------------------

This folder contains two subfolders named 'stained tissue from mouse tails' and 'unstained tissue from mouse brains'. Here, the self-built codes and reconstructive results for holographically imaging the stained tissues from mouse tails and unstained tissue from mouse brains are archived in the corresponding subfolder, respectively. These two subfolders have similar contents, including the main MATLAB file of 'singlepixel_dataprocessing_complex.m' for holographic reconstruction, supporting subfunctions for reconstruction, holographic results and some corresponding stastical production. 

Here we introduce them in sequence:
*) singlepixel_dataprocessing_complex.m: This file reads the measured raw data and calls all the supporting subfunctions to reconstruct holographic images using compressive sensing with different sampling ratios. Subfunctions such as correcting system-induced phase contaminations and phase drifting during the data acquisition process are included. The total execution time of this main file takes about 45 minutes, including holographic reconstruction with and without the sample, removing phase contaminations, and the denoising process.

*) smoothfit.m: A custom-designed fitting function to correct the phase drifting during data acquisition.

*) imaging-amplitude.fig: The amplitude image reconstructed in this example.

*) imaging-phase.fig: The phase image reconstructed in this example.

*) mcolor2.mat: A custom-designed colormap of phase distribution in consideration of phase wrapping.

*) BM3D.m: A denoising algorithm that employs block-matching 3D (BM3D) filtering.

*) file folder of 'results': A folder contains output results including many intermediate variables generated during the reconstruction process. For example, it contains holographic output with and without compressive sensing, crude images before correcting phase contaminations, computed field coefficients of each pattern, and the corresponding statistical property. Note that these files in the folder 'results' will be rewritten when running 'singlepixel_dataprocessing_complex.m'.

-------------------------------------------------------------------
Data acquisition (C++ code)
-------------------------------------------------------------------

This file folder contains only one subfolder, which are named 'joint_256bitplane8'. Given the restrictions of copyrights of public software, we can just provide the main C++ code file that is implemented in Visual Studio C++ project.

*) File folder of 'joint_256bitplane8':
This folder includes some necessary files of the Visual Studio C++ project to control both the DMD and the DAC. In this project, the execution of an integrated C++ source file named 'joint_256bitplane8.cpp' enables the DMD to display the desired Hadamard-like patterns with full speed and the DAC to acquire data subsequently. After preloading all the desired Hadamard-like patterns onto the DMD, it takes about 3 seconds to finish the data acquisition once.
Please visit the website https://visualstudio.microsoft.com/zh-hans/ to download the Visual Studio 2019 community version.

Files

Supplementary Code.zip

Files (258.1 MB)

Name Size Download all
md5:9df3b08da3f66c0000d2e1882349fe97
258.1 MB Preview Download