Implementation of a fluorescent image background removal algorithm adopted from optical spectrum baseline retrieval with iterative average


Alex Y. Chen

Urbana High School, Ijamsville, MD 21754, USA

Peer Reviewer: Maren Sophie Sautter

Professional Reviewer: Emma Regentova

     Abstract: Fluorescent microscopy imaging is a powerful tool used to visualize intracellular spatial distribution. A fluorescent image inevitably carries fluorescent background which comes from multiple sources, so an effective background removing method is desirable before image analysis is performed. I propose to adopt an optical spectral baseline retrieval method called iterative average (IA) for fluorescent background removal in fluorescent images. The proposed algorithm was implemented with MATLAB programming, which could effectively remove most of the fluorescent background with high efficiency, which will have wide applications in molecular cell biology and other related fields.

Keywords: optical microscopy, fluorescent image, background, spectrum, baseline, IA


Fluorescent microscopy imaging is a powerful tool used to visualize intracellular spatial distribution and processes of single cells in high magnification. Currently, optical microscopy of biological cells and tissues is the predominant method to reveal the intracellular spatial relations among cell organelles, protein-protein interactions, dynamical cell cycles and signaling inside cells. In fluorescent biological imaging, typically confocal, or wide field fluorescent cell imaging, selected cell organelles are labeled with a fluorescent tag which is excited with a laser of certain wavelength; the fluorescence from the tag in a targeting molecule is collected by a focusing microscope objective, and focused onto the surface of a 2D camera (wide field) or a point photo detector (confocal); eventually, a fluorescent image is acquired. For every image obtained from any image modalities, it will inevitably carry fluorescent background which comes from multiple sources. One major source of background is the out of focus fluorescence which penetrates the optical system getting into the camera or detector. In most of the cases, a post-acquisition background removal procedure is needed to extract targeting biological information from the cellular images. Therefore, an effective background removal method is desirable before image analysis can be performed. In this communication, it is intended to develop a method to effectively and efficiently remove the background of a fluorescent image. Different methods to reduce background in fluorescent images have been reported. S. A. Haider et al, proposed a fluorescent microscopy image noise reduction method in which they used a stochastically-connected random field model to estimate the noise field, and eventually reconstruct an image with the noise removed (S. A. Haider et al, 2016)Lin Yang et al developed a fast background removal method in microscopy images (L. Yang et al, 2015). In their method, they applied unsupervised one-class learning to a percentile based filtering process. They also used the local based noise estimation approach to finally detect the global noise distribution, subtract the noise from the original images and thus fulfill the background removal task. In another report, Grant J. Steyer et al used a method to remove fluorescent background based on the estimation of fluorescence at the out-of-plane location that are from the specimen and are absorbed and scattered inside cell or tissue, which can be subtracted from the image of the in-focus plane (Grant J. Steyer, et al, 2009). So far, for most of the background removal methods reported, global fluorescence in the image is modeled, the background is removed through an inverse process to iteratively converge into a clearer final image. The various image background removal methods all have the tendency to be complex in implementation, and thus a simple and effective algorithm is needed. 

Catering to this trend, this study proposed to adopt an optical spectrum baseline retrieval method, called iterative average (IA)(X. Shen et al, 2018) for the purpose of background removal from a fluorescent microscopy image. The major contribution of the proposed method is that it attested that an optical spectrum baseline retrieval method can be used to do background removal of a fluorescent image, which has never been done before. The key of this proposed method is to process the intensity profile of a row of pixels from a fluorescent image as an optical spectrum. In an optical spectrum, the fluorescent background is its baseline, so the problem of removing background of a fluorescent image is transformed to finding the baseline of a spectrum, which is 1D; hence, the 2D image background removal task becomes simpler and can be processed more efficiently if the image is viewed as composition of 1D optical spectra. The most frequently used method to find a spectrum baseline is to fit the spectrum to a polynomial (Schulze G et al, 2011), which is simple, but usually not satisfactorily accurate. A lot of efforts have been made to find the accurate spectrum baseline (Haibing Hu et al, 2018, Shuxia Guo et al, 2016, Xin Wang et al, 2015, Juntao Liu et al, 2015) for background removal for better spectral analysis. Most of the new algorithms developed for this purpose have applied sophisticated models or mathematical tools, and have successfully corrected the optical spectra which greatly helped optical spectroscopy analysis of samples. In comparison with the above mentioned spectrum baseline retrieval methods, we find that the IA algorithm, which is based on a moving average method (S. W. Smith, 2003), is characterized by its simplicity, fast convergence and easy implementation. With the adoption of the IA algorithm, the 2D image processing was reduced to a 1D spectrum baseline retrieval task. The fluorescent background reduction was implemented with MATLAB (Math works, Nautica, MA, USA) programming, which supports array data structure, making the processing of an N×M 2D image as processing N spectra, which runs fast. With the proposed method, an efficient fluorescent image background reduction method was demonstrated, which will have wide applications in molecular cell biology and other related research fields. 


The major task here is to find the baseline of a spectrum, then subtract the retrieved baseline of a row of pixels of a fluorescent image line by line over the whole image surface to finally get an image with much reduced background. Figure 1 gives an example of a Raman spectrum (X. Shen et al, 2018). The upper panel shows a typical Raman spectrum with its baseline in red which is to be retrieved with the IA algorithm stated below, while the lower panel is the same spectrum after the baseline subtraction. In this study, the basic task is to remove the background of a fluorescent image with the IA algorithm that was only applicable to optical spectra. The key to the method for the 2D fluorescent image background removal is to process the image line by line, where the intensity profile of each line is processed as a spectrum for which the IA baseline retrieval algorithm is executed and subtracted. After this is done to all rows of the image under processing, the fluorescent background of the 2D image is greatly reduced. With this approach, a 2D 

Figure 1. example of Raman spectrum with baseline in red (upper panel); and the same spectrum with background subtracted (lower panel).
Figure 1. example of Raman
spectrum with baseline in red (upper panel); and the same spectrum with background subtracted (lower panel).

background field problem is reduced to a 1D baseline retrieval task which is much simpler and faster in execution. The IA algorithm is given by(X. Shen et al, 2018):

Where is the series of intensity values of a spectrum with i = 1, 2, 3,…..N, and define

where N is the length of the spectrum.  is a threshold number for stopping, with  being the estimated baseline. The baseline retrieval process follows the flow chart in Figure 2. The whole fluorescent image background removal algorithm was implemented with MATLAB programming, with the following pseudocodes: 

              Figure 3. Pseudocodes for the implementation of the IA algorithm. 


The IA algorithm was implemented with MATLAB programming to remove the background of a fluorescent image. To demonstrate the effectiveness of the proposed background removal method, I first chose a typical fluorescent microscopy image with unevenly distributed fluorescent background (Fig. 4a) to work with. As shown in Fig. 4a, the orange line represents the 100throw of pixels from the top of the image. Along this row of pixels, the fluorescent intensity profile is shown in Fig. 4b; the upper curve in light blue has an obvious strong background, especially at the left side, while the red line underneath is the baseline retrieved from the intensity profile with the IA algorithm. The dark blue curve in Fig. 4b in the lower part is the same fluorescent intensity profile after baseline subtraction which becomes flat without any obvious background, or the background is removed. From this example, it is successfully verified that the IA method is quite effective and efficient in retrieving a spectrum baseline. Then, in the next step, the baseline retrieval algorithm was applied to all rows of pixels in the raw image and the baseline subtraction was performed afterwards line by line until the whole image surface is scanned over. The result is 

Figure 4. a,the raw fluorescent image (256×256) with high background, the orange line is the 100throw of pixels in the image; b, the intensity profile along the orange line is shown in light blue, the red line underneath is the retrieved baseline of the line intensity profile, while the dark blue curve below is the same line of intensity profile after baseline subtraction. 

shown in Figure 5. 5a shows the raw fluorescent image with strong background (same as Fig. 4a without the orange line), especially in the left side of the image; while Fig. 5b is the same fluorescent image after the background removal with the proposed IA algorithm applied. It is 

           Figure 5.a, the same raw image as in fig. 4a; b, the same image after background removal 

obvious that the removal of the background greatly enhanced the quality of the original fluorescent image (compare Fig. 5a and b), which is a part of the necessary preprocessing of a real image before it can be analyzed. In order to test the robustness of the proposed background removal method, another typical fluorescent image with strong background which is much more evenly distributed in the image surface is selected as shown in Fig. 6a.  But after running the same program of the background removal algorithm, the same image after background subtraction becomes very clear (Fig. 6b), the line structures in the processed image can be well identified, the fluorescent image is greatly enhanced and becomes very good for the post processing analysis. From the two selected examples of typical fluorescent images, it is demonstrated that the method suggested is effective and efficient in preprocessing a raw fluorescent image with arbitrary background

Figure 6.a, a fluorescent image with evenly distributed background; b, the same image after   
          background Removal with IA algorithm.

distribution. The key advantage of this fluorescent image background removal method is that it processes a 2D image with a 1D operation, which makes this approach simpler, fast to execute and easier to implement. processes a 2D image with a 1D operation, which makes this approach simpler, fast to execute and easier to implement.


In this study, I succeeded in introducing a new method to remove the background of a fluorescent image. Originally, the proposed method is the adoption of a spectrum baseline retrieval algorithm, called Iterative Average (IA), which was developed to process optical spectra for the analysis of samples. This spectrum baseline retrieval algorithm was innovatively adopted to do fluorescent image background removal. The algorithm was implemented with MATLAB programming using an array data structure which processed the intensity profiles of each row of a fluorescent image line by line as a spectrum, which made the implementation rather simple and fast. The major contribution of this work is that an optical spectrum baseline retrieval algorithm is used for the task of fluorescent imaging background removal, which allows a 2D image to be processed with a 1D approach to make the task easier and fast. Ultimately, the effectiveness and efficiency of my proposed method is validated by its applications in this study. As examples, two typical fluorescent images with different fluorescent background distribution in the image surface were processed as the test. The results were striking. It is demonstrated that the developed method can remove fluorescent background effectively and efficiently. The key is that this method is simple but it effectively solves the challenge of the complex task of image background removal. To the best of my knowledge, the proposed fluorescent image background removal method with the spectrum baseline retrieval algorithm has never been reported. It will have wide applications to microscopic fluorescent image processing and analysis, and will contribute to molecular cell biology and other related scientific fields.


I thank Dr. De Chen of NCI for providing the raw images, and the instructions of the imaging technologies. 


Bonne O. Leung and Keng C. Chou, “Review of SuperResolution Fluorescence Microscopy for Biology”, Applied Spectroscopy, Vol. 65, p967-980, 2011.

Gavin E. Murphy, Keda Narayan, Bradley, C, Lowekamp, Lisa M. Hartnell, Jurgen A. W. “Correlative 3D imaging of Whole Mammalian Cells with Light and Electron Microscopy”, Journal of Structural Biology, Vol. 176, p268-278, 2011. 

Grant J. Steyer, Debashish Roy, Olivier Salvado, Meredith E. Stone, and David L. Wilson, “Removal of Out-of-Plane Fluorescence for Single Cell Visualization and Quantification in Cryo-Imaging”, Annals of. Biomedical Enginerring. Vol. 37, p1613-1628, 2009.

Haibing Hu, Jing Bai, Guo Xia, Wendy Zhang, and Yan Ma, “Improved Baseline Correction Method Based on Polynomial Fitting for Raman Spectroscopy”, Photonics Sensors, Vol. 8, p332-340, 2018. 

Juntao Liu, Jianyang Sun, Xiuzhen Huang, Guojun Li and Binqiang Liu, “Goldindec: A Novel Algorithm for Raman Spectrum Baseline Correction”, APPLIED SPECTROSCOPY, Vol. 69, p834-842, 2015.

S. A. Haider, A. Cameron, P. Siva, D. Lui, M. J. Shafiee, A. Boroomand, N. Haider & A Wong, “Fluorescence microscopy image noise reduction using a stochastically-connected redondom field model”, Scientifid Reports, 6, p20640-1-16, 2016.

Schulze, G, Foist R, Okuda F, et al. “A model-free, fully automated baseline-removal method for Raman spectra”, J. Applies Sectroscopy, 65, p75-84, 2011.

Shuxia Guo, Thomas Bocklitz and Jurgen Popp, “Optimization of Raman-spectrum baseline correction in biological application”, Analyst, Vol. 141, p2396-2404, 2016.

S. W. Smith, Digital Signal Processing (ELSEVIER, 2003), pp. 277–284.

Xin Wang, Xian-guang Fan, Ying-jie Xu, Xiu-fen Wang, Hao He, “A baseline correction algorithm for Raman spectroscopy by adaptivwe knots B-Spline”, Measurement Science and Technology. Vol. 26, p115503-115510, 2015. 

X. Shen, L. Xu, S. Ye, R. Hu, L. Jin, H. Xu, and W. Liu, “Automatic baseline correction method for the open-path Fourier transform infrared spectra by using simple iterative averaging”, Optics Express, Vol. 26, 2018, p319634.

Yang L., Zhang Y., Guldner I.H., Zhang S., Chen D.Z. (2015) Fast Background Removal in 3D Fluorescence Microscopy Images Using One-Class Learning. In: Navab N., Hornegger J., Wells W., Frangi A. (eds) Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015. MICCAI 2015. Lecture Notes in Computer Science, vol 9351. Springer, Cham


Please enter your comment!
Please enter your name here