Real-time Quantitative Phase Imaging of Red Blood Cells with ArrayFire

John Melonakos ArrayFire, Case Studies Leave a Comment

Researchers from the College of Optical Science and Engineering of Zhejiang University and the Department of Ophthalmology of Stanford University published a scientific report using ArrayFire to perform quantitative phase imaging in real-time with example results tracking red blood cell dynamics.

Research Abstract

From the article in Nature, the following abstract summarizes the research:

Real-time quantitative phase imaging has tremendous potential in investigating live biological specimens in vitro. Here we report on a wideband sensitivity-enhanced interferometric microscopy for quantitative phase imaging in real-time by employing two quadriwave lateral shearing interferometers based on randomly encoded hybrid gratings with different lateral shears. A theoretical framework to analyze the measurement sensitivity is firstly proposed, from which the optimal lateral shear pair for sensitivity enhancement is also derived. To accelerate the phase retrieval algorithm for real-time visualization, we develop a fully vectorized path-independent differential leveling phase unwrapping algorithm ready for parallel computing, and the framerate for retrieving the phase from each pair of two 4 megapixel interferograms is able to reach 47.85 frames per second. Experiment results demonstrate that the wideband sensitivity-enhanced interferometric microscopy is capable of eliminating all the periodical error caused by spectral leaking problem and reducing the temporal standard deviation to the half level compared with phase directly retrieved by the interferogram. Due to its high adaptability, the wideband sensitivity-enhanced interferometric microscopy is promising in retrofitting existing microscopes to quantitative phase microscopes with high measurement precision and real-time visualization.

System Overview

From the paper, the system is constructed as shown below:

Example Application Tracking Red Blood Cell Dynamics

The authors present some results on the visualization of red blood cell dynamics in real-time, as shown in this figure:

Over 200x Speedups with ArrayFire

To accelerate the processing speed, open source ArrayFire library based on CUDA technology which could enable parallel computing on GPU was introduced. The time cost for the FFT of a single 2048×2048 interferogram which was 117.45ms on CPU had decreased to 1.15ms on a laptop GPU (GeForce GTX 960M, 640 CUDA cores), and could further reach 0.49ms on a high-performance desktop GPU (GeForce GTX Titan Black Edition, 2880 CUDA cores). However, the NCQUAL algorithm for phase unwrapping could hardly be implemented on GPU in parallelism, and it became a handicap for real-time visualization. As a result, a fully vectorized path-independent phase unwrapping algorithm with element-wise matrix operations named differential leveling phase unwrapping (DLPU) algorithm, which is detailed in Methods Section, was proposed and implemented on CUDA platforms. The time cost for phase unwrapping then decreased to 5.54ms on the GTX 960M and to 3.77ms on the GTX Titan Black. Moreover, lazy execution (LE) provided by ArrayFire library would automatically construct optimally-sized kernels from the algorithms to be executed. Without the contribution of LE, the total processing time was slightly over the sum of the duration of each step. But when LE was switched on, an even less total processing time could be finally achieved. The phase retrieval framerate of our WSEIM was 24.81 fps on the laptop GTX 960M and 47.85 fps on the high-end GTX Titan Black, which well met the real-time requirement over the framerate of 15 fps.

Thanks to these researchers for sharing their work!

Leave a Reply

Your email address will not be published.