Search tips
Search criteria 


Logo of nihpaAbout Author manuscriptsSubmit a manuscriptHHS Public Access; Author Manuscript; Accepted for publication in peer reviewed journal;
Appl Opt. Author manuscript; available in PMC 2010 May 10.
Published in final edited form as:
PMCID: PMC2866633

Real-time polarization-sensitive optical coherence tomography data processing with parallel computing


With the increase of the A-line speed of optical coherence tomography (OCT) systems, real-time processing of acquired data has become a bottleneck. The shared-memory parallel computing technique is used to process OCT data in real time. The real-time processing power of a quad-core personal computer (PC) is analyzed. It is shown that the quad-core PC could provide real-time OCT data processing ability of more than 80K A-lines per second. A real-time, fiber-based, swept source polarization-sensitive OCT system with 20K A-line speed is demonstrated with this technique. The real-time 2D and 3D polarization-sensitive imaging of chicken muscle and pig tendon is also demonstrated.

1. Introduction

Optical coherence tomography (OCT) is a prominent biomedical tissue imaging technique that provides noninvasive, micrometer-resolution measurements [1]. Polarization-sensitive OCT (PSOCT) [222] is a functional extension of OCT that can measure the depth-resolved birefringent characteristics of biological tissues such as collagen, cartilage, and muscle. OCT and PSOCT have evolved from the earlier time domain to the current Fourier domain system because of the high signal-to-noise ratio and high imaging speed of the Fourier domain system [23,24].

OCT systems with more than 100K A-line speeds (where K denotes 210 and A-line speed is axial scan lines per second) have been demonstrated [25,26]. With such a fast A-line speed, the data processing becomes the bottleneck of the system. Compared with standard non-polarization-sensitive OCT, the fiber-based PSOCT system needs to acquire four times the amount of data for the same size picture. In addition, a time-consuming algorithm is needed to calculate the depth-dependent birefringent information. The most common way to solve this problem is to acquire the data and save it on a hard disk, then process the acquired data afterward, or to process and display a portion of the acquired data in real time [7,8,27]. However, real-time processing for all the acquired data is preferred and necessary in clinical imaging, especially for applications such as endoscopy and ophthalmology.

Hardware-based parallel processing schemes, such as digital signal processors or field-programmablegate-array-based schemes are the most common methods to provide real-time OCT data processing [2831]. However, additional hardware inclusion in the system increases the system complexity and cost. In addition, the programming and debugging can be very tedious for the added hardware.

Multiple processing units have become popular on personal computers. Most personal computers arrive prebuilt with multiple processing units such as multicore CPUs, multicore video processors, and multicore audio processors. With these multiple processing units, high-performance parallel computing is available on personal computers without the inclusion of additional hardware. In this paper, we demonstrate real-time data processing and display of a fiber-based swept source PSOCT system with a multicore CPU computer and shared memory parallel computing technique. Using the multicore CPU and shared memory parallel computing technique, the OCT software processing speed was increased with minimum modification of the original program. With our current Quad-Core Intel Xeon X5355 2.66GHz workstation, real-time processing of standard non-polarization-sensitive OCT data as fast as 80 K A-lines per second is possible. Real-time processing of a 20K A-line swept source fiber-based PSOCT system is demonstrated.

2. Method for Data Processing and System Setup

A. Parallel Computing

The interest in parallel computing can be traced back to the 1950s. It is based on the principle that large problems can be divided into small ones, which are executed concurrently. Parallel computers can be classified into two categories [32]. The first category is the shared memory system, where a number of processors are connected to the main memory. An example is a multicore personal computer. Another category is the distributed memory system, where each processing unit has its own memory and all these processing units are connected by a network. Examples include clusters and grids. The speed-up of parallel computing can be described by Amdahl’s law [33]:


where S is the speed-up, P is the ratio of the parallel part to the whole task, and N is the number of processing units. In order to make full use of the processors, the parallel part of the whole task must be as high as possible. If the whole task can be parallelized (P = 1), the speed-up is linearly proportional to the number of processing units.

In our OCT configuration, a Dell Precision 690 workstation with a quad-core Intel Xeon X5355 at 2.66GHz was used as the data acquisition and processing computer. The operating system was Microsoft Windows XP Pro SP3, and the software developing platform was Microsoft Visual Studio 2005. The shared-memory parallel computing technique was used in our software. Parallel computing was implemented via openMP [34]. OpenMP provides a simple and flexible interface for developing the parallel application, and only a few application programming interfaces are needed to upgrade our serial processing OCT software to the parallel real-time processing software.

In order to understand the data processing capability of our computer for OCT applications, we tested the processing speed of our current configuration. The 1024-point 32 bit (single precision) and 64 bit (double precision) complex number fast Fourier transform (FFT) was used for the test, and the FFT algorithm was FFTW [35]. Time consumption for 12,000 1024-point, complex number FFTs was measured with different threads (cores) in parallel computing, and the time consumption for each single 1024-point complex number FFT was calculated accordingly.When all four cores were used in the parallel computing, it would take about 1.37 µs for one 1024-point complex number FFT(32 bit), and the speed was comparable with the result of a digital signal processor system [30]. However, the programming and debugging for our software is much easier than that for the digital-signal-processor-based system. The speed-up curves for our test are shown in Fig. 1. Figure 1 shows that introduction of the parallel computing in our quad-core system was able to provide a speed-up of as much as 3.5 times. The time consumption of a 64 bit FFT is almost two times that of a 32 bit FFT. The accuracy of the 32 bit FFT compared with the 64 bit FFT was also tested. The difference between results from the 32 bit FFT and the 64 bit FFT was found to be less than 10−5. This margin of error is acceptable for OCT applications. We will adopt the 32 bit FFT for the following OCT applications.

Fig. 1
Speed-up curve for 1024-point, complex FFT (double precision versus single precision) with different numbers of cores involved in the parallel computing.

B. Software Architecture

The software structure is shown in Fig. 2. The OCT data acquisition and processing software was written with Microsoft Visual C++. Multithreading and parallel computing techniques were used. A total of four threads were in the software: (1) the controlling thread, (2) data acquisition and fetching thread, (3) data processing thread, and (4) image display thread. The controlling thread was the main thread that controlled the whole process and all the other threads. The data acquisition and fetch thread was in charge of data acquisition and fetching the original data into the main memory. The data processing thread read the acquired data from the memory and processed the data. Data processing involved calibration, dispersion compensation, and time domain intensity calculation [30]. Once a frame was processed, the image was displayed by the display thread. Parallel computing was implemented in the data processing thread. In the software architecture, the controlling thread and the display thread did not take much of the CPU resources. The data acquisition thread and data processing thread took most of the CPU resources. Based on the quad-core PC configuration, there were a total of three cores involved in the parallel computing data processing thread.

Fig. 2
Software architecture for OCT and PSOCT systems. Three threads are shown here (the controlling thread is not shown). They are the data acquisition and fetching thread, processing thread, and displaying thread. The processing thread has three parallel ...

A 20K A-line speed fiber-based swept source system [30] was used to test the software. The software could provide real-time acquisition and processing ability for the 20K A-line system. The software was able to acquire and process 45K A-lines in real-time by using a function generator as a signal source. Because of the limitation of the data streaming speed of the PCI digitizer, a faster A-line speed using a function generator could not be tested. However, by calculating the time consumption for data of a single A-line, it was found that processing of a single A-line would take approximately 12 µs, which corresponded to an A-line speed of about 80 K.

For fiber-based PSOCT systems, the acquired data volume is two times that of standard nonpolarization-sensitive OCT system if an alternative A-line polarization modulation scheme is used [79,13], and it is four times that of standard nonpolarization-sensitive OCT system if a single A-line polarization modulation scheme is used [17,19]. In addition, the phase retardation calculation algorithm is also very time consuming. Real-time processing is more challenging than standard nonpolarization- sensitive OCT imaging. Park et al. have shown multifunction systems [7,8] that were able to process and display a portion of the acquired data in real time. In this paper, we will show a real-time processing and display 20K A-line fiber-based PSOCT system using the alternative A-line polarization modulation scheme.

C. Fiber-Based Swept Source PSOCT System

A schematic of the PSOCT system is shown in Fig. 3. The laser source is a swept source laser with a maximum scanning rate of 20K (HSL 2000, Santec Corporation, Aichi, Japan). The laser generates polarized light with a center wavelength of 1310 nm and a bandwidth of 100 nm. A polarizer was oriented 45° with respect to the amplitude modulator crystal (4104, New Focus, San Jose, California) to make a polarization modulator. An amplified square waveform with a frequency of 10 kHz was used to drive the modulator so that alternating linear and circular polarization states for consecutive A-lines were obtained [68]. A fiber polarization controller in front of the polarizer was used to control the polarization state so that the laser power after the modulator is maximum. A 1 × 2 beam splitter behind the modulator split 20% of the laser power into the reference arm and 80% of the laser power into the sample arm. In the reference arm, a polarization controller and a linear polarizer were used to ensure that the reference beam had a constant polarization state and constant amplitude. Two circulators were used in the reference arm and the sample arm to guide the sample and reference light into a 2 × 2 polarization maintenance (PM) coupler. Two fiber polarization beam splitters (PBSs) were used to separate the fast and slow axes signals and send them to two balanced detectors. A high speed digitizer (PCI 5122, National Instruments, Austin, Texas) was used to digitize the electrical signal from the two balanced detectors at 33 M samples/s.

Fig. 3
Schematic of fiber-based PSOCT system. SPC, static polarization controller; PM, polarization modulator; LP, linear polarizer; PMF, PM fiber; PBS, polarization beam splitter; BD, balanced detector.

The acquisition and processing software was introduced in the previous section, and the architecture of the software was the same as shown in Fig. 2. However, for the PSOCT version of the software, both analogy input channels of the digitizer were used in the acquisition and fetching thread. The algorithm in the processing thread was more complex. Figure 4 shows the flow for processing the PSOCT data. The data acquired by the two channels of the digitizer in alternative A-lines are marked as LH, LV, CH, and CV in the figure. They represent the detected horizontal (LH) or vertical polarization (LV) signal for linear polarization state input and the detected horizontal (CH) or vertical polarization (CV) signal for circular polarization state input. These signals are resampled to linear k space based on the linear interpolation method. The resampled signals are marked as LH′, LV′, CH′, and CV′ in Fig. 4. The FFT was used to convert the resampled data to the complex depth encoded signal (SLH, SLV, SCH, SCV in Fig. 4). The complex depth encoded signal was used to get the Stokes parameters for linear polarization input (LI, LQ, LU, LV) and circular polarization input (CI, CQ, CU, CV). Then the intensity and phase retardation images were obtained. The intensity images were obtained from the average of LI and CI. The phase retardation was calculated according to the method in [5,6].

Fig. 4
Data processing flow for the PSOCT. LH (LV) is the acquired horizontally (vertically) polarized component of the interference signal for linear polarization input. CH (CV) is the acquired horizontally (vertically) polarized component of the interference ...

In the processing thread, three parallel sections were used to process the data in real time. The three parallel sections processed the data in different A-lines. For example, if there are 1024 A-lines in one frame, the first parallel section will process the first 341 A-lines (from the 1st to the 341st A-line), the second parallel section will process the second 341 Alines (from the 342nd to the 682nd A-line) and the third section will process the last 342 A-lines. All variables for each parallel section were made private variables that were used by that section only. Because different parallel sections processes different A-lines and private variables are used in each section, false sharing is avoided. The efficiency of the parallelism can be seen from Fig. 5. The time to process one single effective A-line is around 48.7 µs. This means that our system can process up to a 40 kHz Aline PSOCT system in real time when the alternative A-line polarization modulation is used.

Fig. 5
Time consumption for processing one single A-line of PSOCT data.

3. Results

Chicken breast muscle was measured ex vivo by our fiber-based, real-time PSOCT system. Figure 6 shows the intensity (left-hand side) and phase retardation (right-hand side) images. The phase retardation image is indicated in the gray scale from black (0°) to white (180°). These images were 256 (width) ×400 (height) pixels for both intensity and phase retardation images. The images were acquired and processed in real time at 40 frames/s. The periodic band structure in the axial direction is clearly seen in the phase retardation images, which shows the strong birefringent features of the chicken breast muscle.

Fig. 6
Polarization sensitive images for chicken muscle ex vivo: (a) intensity image, (b) phase retardation image. Scale bar, 250 µm.

Figure 7 shows the 3D reconstruction images for a piece of pig tendon. 2D images were acquired, processed and displayed in real time at 20 frames/s (with 512 effective A-lines per frame). The image area is 4 mm × 2 mm with 512 × 400 pixels. Figure 7(a) shows the reconstructed 3D intensity images, and Fig. 7(b) shows the reconstructed 3D phase retardation images. The volume size is 400 × 512 × 100. Before doing 3D rendering, the tissue surface was found. The maximum intensity location along one A-line was taken as tissue surface. By sixth-order polynomial fitting of these data along the B scan, the smoothed tissue surface was obtained. Then the images were imported into a commercially available rendering software (Amira 4.1.0, Mercury Computer System, Chelmsford, Massachusetts). The images were filtered by median filter. Then the Voltex module in the Amira software was used to do the 3D rendering.

Fig. 7
3D polarization sensitive images for pig tendon ex vivo: (a) intensity image, (b) phase retardation image.

4. Conclusions

In conclusion, we have analyzed the real-time processing power of a quad-core PC and developed a real-time fiber-based PSOCT system. By using the parallel computing technique, real-time OCT data processing of an 80K A-line system is possible for our system. Real-time acquisition and processing of PSOCT data at A-line speed of 20K was demonstrated. The real-time processing ability could be easily improved by inclusion of more computing cores. With our current configuration (four-core CPU), only three cores were used for data processing. Another core was used for data acquisition and the other operations. If a PC with two quad-core CPUs is used, seven cores can be used for data processing, and the speed-up will be more than six times. The speed-up is enough for real-time data processing of most fast OCT systems. With emerging low-cost multicore parallel computing techniques, such as the GPU technique [36], a low-cost supercomputer with hundreds of cores is possible, and the processing power of a personal PC can be increased hundreds of times.


This work was supported by the National Institutes of Health (EB-00293, NCI-91717, RR-01192), the National Science Foundation (BES-86924), the United States Air Force Office of Scientific Research (FA9550-04-0101), and the Beckman Laser Institute Endowment.


OCIS codes: 170.4500, 170.3890, 230.5440.


1. Huang D, Swanson EA, Lin CP, Schuman JS, Stinson WG, Chang W, Hee MR, Flotte T, Gregory K, Puliafito CA, Fujimoto JG. Optical coherence tomography. Science. 1991;254:1178–1181. [PubMed]
2. Hee MR, Huang D, Swanson EA, Fujimoto JG. Polarization-sensitive low-coherence reflectometer for birefringence characterization and ranging. J. Opt. Soc. Am. B. 1992;9:903–908.
3. de Boer JF, Milner TE, van Gemert MJC, Nelson JS. Two-dimensional birefringence imaging in biological tissue by polarization-sensitive optical coherence tomography. Opt. Lett. 1997;22:934–936. [PubMed]
4. de Boer JF, Srinivas SM, Park BH, Pham TH, Chen Z, Milner TE, Nelson JS. Polarization effects in optical coherence tomography of various biological tissues. IEEE J. Sel. Top. Quantum Electron. 1999;5:1200–1204.
5. Saxer CE, de Boer JF, Park BH, Zhao Y, Chen Z, Nelson JS. High-speed fiber based polarization sensitive optical coherence tomography of in vivo human skin. Opt. Lett. 2000;25:1355–1357. [PubMed]
6. Park BH, Saxer C, Chen T, Srinivas SM, Nelson JS, de Boer JF. In vivo burn depth determination by high-speed fiber-based polarization sensitive optical coherence tomography. J. Biomed. Opt. 2001;6:474–479. [PubMed]
7. Park BH, Pierce MC, Cense B, de Boer JF. Real-time multi-functional optical coherence tomography. Opt. Express. 2003;11:782–793. [PubMed]
8. Park B, Pierce MC, Cense B, Yun S-H, Mujat M, Tearney G, Bouma B, de Boer J. Real-time fiberbased multifunctional spectral-domain optical coherence tomography at 1.3 µm. Opt. Express. 2005;13:3931–3944. [PubMed]
9. Park BH, Pierce MC, Cense B, de Boer JF. Jones matrix analysis for a polarization-sensitive optical coherence tomography system using fiber-optic components. Opt. Lett. 2004;29:2512–2514. [PMC free article] [PubMed]
10. Jiao S, Yu W, Stoica G, Wang LV. Optical-fiber-based Mueller optical coherence tomography. Opt. Lett. 2003;28:1206–1208. [PubMed]
11. Yao G, Wang LV. Two-dimensional depth-resolved Mueller matrix characterization of biological tissue by optical coherence tomography. Opt. Lett. 1999;24:537–539. [PubMed]
12. Yamanari M, Makita S, Madjarova VD, Yatagai T, Yasuno Y. Fiber-based polarization-sensitive Fourier domain optical coherence tomography using B-scan-oriented polarization modulation method. Opt. Express. 2006;14:6502–6515. [PubMed]
13. Zhang J, Jung W, Nelson J, Chen Z. Full range polarization-sensitive Fourier domain optical coherence tomography. Opt. Express. 2004;12:6033–6039. [PubMed]
14. Zhang J, Guo S, Jung W, Nelson JS, Chen Z. Determination of birefringence and absolute optic axis orientation using polarization-sensitive optical coherence tomography with PM fibers. Opt. Express. 2003;11:3262–3270. [PubMed]
15. Dave DP, Akkin T, Milner TE. Polarization-maintaining fiber-based optical low-coherence reflectometer for characterization and ranging of birefringence. Opt. Lett. 2003;28:1775–1777. [PubMed]
16. Al-Qaisi MK, Akkin T. Polarization-sensitive optical coherence tomography based on polarization-maintaining fibers and frequency multiplexing. Opt. Express. 2008;16:13032. [PubMed]
17. Oh WY, Yun SH, Vakoc BJ, Shishkov M, Desjardins AE, Park BH, de Boer JF, Tearney GJ, Bouma BE. High-speed polarization sensitive optical frequency domain imaging with frequency multiplexing. Opt. Express. 2008;16:1096–1103. [PMC free article] [PubMed]
18. Oh WY, Vakoc BJ, Yun SH, Tearney GJ, Bouma BE. Single-detector polarization-sensitive optical frequency domain imaging using high-speed intra A-line polarization modulation. Opt. Lett. 2008;33:1330–1332. [PMC free article] [PubMed]
19. Yamanari M, Makita S, Yasuno Y. Polarization-sensitive swept-source optical coherence tomography with continuous source polarization modulation. Opt. Express. 2008;16:5892–5906. [PubMed]
20. Yamanari M, Makita S, Madjarova VD, Yatagai T, Yasuno Y. Fiber-based polarization-sensitive Fourier domain optical coherence tomography using B-scan-oriented polarization modulation method. Opt. Express. 2006;14:6502–6515. [PubMed]
21. Baumann B, Götzinger E, Pircher M, Hitzenberger CK. Single camera based spectral domain polarization sensitive optical coherence tomography. Opt. Express. 2007;15:1054–1063. [PMC free article] [PubMed]
22. Cense B, Mujat M, Chen TC, Park BH, de Boer JF. Polarization-sensitive spectral-domain optical coherence tomography using a single line scan camera. Opt. Express. 2007;15:2421–2431. [PubMed]
23. de Boer JF, Cense B, Park BH, Pierce MC, Tearney GJ, Bouma BE. Improved signal-to-noise ratio in spectral-domain compared with time-domain optical coherence tomography. Opt. Lett. 2003;28:2067–2069. [PubMed]
24. Choma MA, Sarunic MV, Yang C, Izatt JA. Sensitivity advantage of swept source and Fourier domain optical coherence tomography. Opt. Express. 2003;11:2183–2189. [PubMed]
25. Oh WY, Yun SH, Tearney GJ, Bouma BE. 115 kHz tuning repetition rate ultrahigh-speed wavelength-swept semiconductor laser. Opt. Lett. 2005;30:3159–3161. [PMC free article] [PubMed]
26. Huber R, Adler DC, Fujimoto JG. Buffered Fourier domain mode locking: unidirectional swept laser sources for optical coherence tomography imaging at 370; 000 lines/s. Opt. Lett. 2006;31:2975–2977. [PubMed]
27. Nassif NA, Cense B, Park B, Pierce M, Yun S, Bouma B, Tearney G, Chen T, de Boer J. In vivo high-resolution video-rate spectral-domain optical coherence tomography of the human retina and optic nerve. Opt. Express. 2004;12:367–376. [PubMed]
28. Schaefer AW, Joshua Reynolds J, Marks DL, Boppart SA. Real-time digital signal processing-based optical coherence tomography and doppler optical coherence tomography. IEEE Trans. Biomed. Eng. 2004;51:186–190. [PubMed]
29. Yan S, Piao D, Chen Y, Zhu Q. Digital signal processor-based real-time optical Doppler tomography system. J. Biomed. Opt. 2004;9:454–463. [PubMed]
30. Su J, Zhang J, Yu L, Colt HG, Brenner M, Chen Z. Real-time swept source optical coherence tomography imaging of the human airway using a microelectromechanical system endoscope and digital signal processor. J. Biomed. Opt. 2008;13:030506. [PMC free article] [PubMed]
31. Ustun TE, Iftimia NV, Ferguson RD, Hammer DX. Real-time processing for Fourier domain optical coherence tomography using a field programmable gate array. Rev. Sci. Instrum. 2008;79:114301. [PubMed]
32. Lafferty A. Parallel Computing: Introduction. William Andrew; 1993.
33. Amdahl G. The validity of the single processor approach to achieving large-scale computing capabilities. Proceedings of AFIPS Spring Joint Computer Conference; AFIPS; 1967. pp. 483–485.
34. OpenMP Architecture Review Board. The OpenMPAPI specification for parallel programming.
35. FFTW version 3.2.1.
36. General-purpose computation on graphics hardware.