## GPU based real-time quadrature transform method for 3-D surface measurement and visualization |

Optics Express, Vol. 19, Issue 13, pp. 12125-12130 (2011)

http://dx.doi.org/10.1364/OE.19.012125

Acrobat PDF (693 KB)

### Abstract

In this article, we propose a massively parallel, real-time algorithm for the estimation of the dynamic phase map of a vibrating object. The algorithm implements a Fourier-based quadrature transform and temporal phase unwrapping technique. CUDA, a graphic processing unit programming architecture was used to implement the algorithm. It was tested on a fringe pattern sequence using three devices with different capabilities, achieving a processing rate greater than 1600 frames per second (fps).

© 2011 OSA

## 1. Introduction

1. R. Legarda-Saenz, R. Rodriguez-Vera, and A. Espinosa-Romero, “Dynamic 3-D shape measurement method based on quadrature transform,” Opt. Express **18**(3), 2639–2645 (2010). [CrossRef] [PubMed]

2. NVIDIA, NVIDIA CUDA C Programming Guide (version 3.2), http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/ (2010).

## 2. Theoretical development

**r**= (

*x*

_{1},

*x*

_{2}, ⋯ ,

*x*) is an

_{n}*n*-dimensional position vector,

*a*(

**r**) is the background illumination and

*b*(

**r**

*,t*) is the amplitude modulation. It should be noted that

*a*(

**r**) is considered to remain constant throughout the experiment.

*N*frames are captured from the dynamic movement of the object in such way that where Δ

*t*is the temporal period of the captured frame and is smaller than the temporal period of the vibration cycle. Under this condition each frame can be seen as where

*I*(

_{k}**r**) =

*I*(

**r**

*,t*+

_{o}*k*Δ

*t*),

*b*(

_{k}**r**) =

*b*(

**r**

*,t*+

_{o}*k*Δ

*t*) and

*ψ*(

_{k}**r**) =

*ψ*(

**r**

*,t*+

_{o}*k*Δ

*t*) for

*k*= 0, 1, ⋯ ,

*N*– 1.

### 2.1. The general n-dimensional quadrature transform

1. R. Legarda-Saenz, R. Rodriguez-Vera, and A. Espinosa-Romero, “Dynamic 3-D shape measurement method based on quadrature transform,” Opt. Express **18**(3), 2639–2645 (2010). [CrossRef] [PubMed]

4. K. G. Larkin, D. J. Bone, and M. A. Oldfield, “Natural demodulation of two-dimensional fringe patterns. I. General background of the spiral phase quadrature transform,” J. Opt. Soc. Am. A **18**, 1862–1870 (2001). [CrossRef]

5. M. Servin, J. A. Quiroga, and J. L. Marroquin, “General n-dimensional quadrature transform and its application to interferogram demodulation,” J. Opt. Soc. Am. A **20**, 924–934 (2003). [CrossRef]

*a*(

**r**) is filtered from the fringe pattern defined in Eq. (2), the following fringe pattern results [7]

*n*-dimensional quadrature transform for fringe patterns with carrier frequency is defined as [5

5. M. Servin, J. A. Quiroga, and J. L. Marroquin, “General n-dimensional quadrature transform and its application to interferogram demodulation,” J. Opt. Soc. Am. A **20**, 924–934 (2003). [CrossRef]

**q**= {

*u*

_{1}

*, u*

_{2}

*,..., u*} is the

_{n}*n*-dimensional position vector on the frequency domain and

*ℱ*{·} denotes de Fourier transform. Using Eq. (6) we can write the complex fringe pattern of Eq. (5) as which in turn can be reduced to the following expression

### 2.2. Temporal phase unwrapping

*W*{·} is called the wrapping operator [6].

*φ*(

_{M}**r**) can be computed by the sum of the

*M*– 1 phase differences using the following equation [8

8. J. M. Huntley and H. Saldner, “Temporal phase-unwrapping algorithm for automated interferogram analysis,” Appl. Opt. **32**, 3047–3052 (1993). [CrossRef] [PubMed]

9. S. De Nicola and P. Ferraro, “Fourier transform method of fringe analysis for moire interferometry,” J. Opt. A: Pure Appl. Opt. **2**, 228–233 (2000). [CrossRef]

## 3. Parallel implementation of the quadrature transform and phase unwrapping on CUDA

10. J. D. Owens, M. Houston, D. Luebke, S. Green, J. E. Stone, and J. C. Phillips “GPU computing,” Proc. IEEE **96**(5), 879–899 (2008). [CrossRef]

*threadId*and

*blockId*, a 3-component and 2-component vectors that identify respectively the thread within the block and the grid. Each kernel can determine the portion of data it should process using these two indexes. The programming model considers the GPU as an external device, and it distinguishes explicitly the code executed sequentially on the host computer and the one executed in parallel on the GPU (kernels). Therefore, CUDA programs run on at least two devices, the host computer and one (or more) GPU. The memory space of the GPU device and the host computer are different and, as a result, a program needs to transfer data between host and the device.

*ω⃗*·

**q**< 0, and doubling the other half [5

5. M. Servin, J. A. Quiroga, and J. L. Marroquin, “General n-dimensional quadrature transform and its application to interferogram demodulation,” J. Opt. Soc. Am. A **20**, 924–934 (2003). [CrossRef]

*Flt*is a band-pass filter defined in the Fourier domain.

*φ*(

_{m}**r**) over the last

*k*– 1 algorithm iterations.

*M*,

*H*, and

*G*indicate respectively memory transfer between the host and the GPU, execution in the host, and execution in the GPU. Three different operations are executed on the GPU: the computation of the FFT, the execution of the quadrature transform, and the phase map kernels, labelled respectively as

*G_FFT*,

*G_K1*and

*G_K2*. Although the algorithm does not show explicit synchronization barriers, it is assumed that the host waits for the GPU to complete its task before proceeding with its execution.

## 4. Experimental results

11. M. Frigo and S. G. Johnson, “The design and implementation of FFTW3,” Proc. IEEE **93**, 216–231 (2005). [CrossRef]

12. NVIDIA, NVIDIA CUDA CUFFT LIBRARY (PG-05327-032_V02), http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/ (2010).

1. R. Legarda-Saenz, R. Rodriguez-Vera, and A. Espinosa-Romero, “Dynamic 3-D shape measurement method based on quadrature transform,” Opt. Express **18**(3), 2639–2645 (2010). [CrossRef] [PubMed]

13. C. Meneses-Fabian, R. Rodriguez-Vera, J. A. Rayas, F. Mendoza-Santoyo, and G. Rodriguez-Zurita, “Surface contour from a low-frequency vibrating object using phase differences and the Fourier-transform method,” Opt. Commun. **272**(2), 310–313 (2007). [CrossRef]

**18**(3), 2639–2645 (2010). [CrossRef] [PubMed]

## 5. Discussions and conclusions

## Acknowledgments

## References and links

1. | R. Legarda-Saenz, R. Rodriguez-Vera, and A. Espinosa-Romero, “Dynamic 3-D shape measurement method based on quadrature transform,” Opt. Express |

2. | NVIDIA, NVIDIA CUDA C Programming Guide (version 3.2), http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/ (2010). |

3. | K. J. Gåsvik, |

4. | K. G. Larkin, D. J. Bone, and M. A. Oldfield, “Natural demodulation of two-dimensional fringe patterns. I. General background of the spiral phase quadrature transform,” J. Opt. Soc. Am. A |

5. | M. Servin, J. A. Quiroga, and J. L. Marroquin, “General n-dimensional quadrature transform and its application to interferogram demodulation,” J. Opt. Soc. Am. A |

6. | D. Ghigila and M. D. Pritt, |

7. | T. Kreis, |

8. | J. M. Huntley and H. Saldner, “Temporal phase-unwrapping algorithm for automated interferogram analysis,” Appl. Opt. |

9. | S. De Nicola and P. Ferraro, “Fourier transform method of fringe analysis for moire interferometry,” J. Opt. A: Pure Appl. Opt. |

10. | J. D. Owens, M. Houston, D. Luebke, S. Green, J. E. Stone, and J. C. Phillips “GPU computing,” Proc. IEEE |

11. | M. Frigo and S. G. Johnson, “The design and implementation of FFTW3,” Proc. IEEE |

12. | NVIDIA, NVIDIA CUDA CUFFT LIBRARY (PG-05327-032_V02), http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/ (2010). |

13. | C. Meneses-Fabian, R. Rodriguez-Vera, J. A. Rayas, F. Mendoza-Santoyo, and G. Rodriguez-Zurita, “Surface contour from a low-frequency vibrating object using phase differences and the Fourier-transform method,” Opt. Commun. |

**OCIS Codes**

(100.2650) Image processing : Fringe analysis

(100.5070) Image processing : Phase retrieval

(120.5050) Instrumentation, measurement, and metrology : Phase measurement

**ToC Category:**

Instrumentation, Measurement, and Metrology

**History**

Original Manuscript: January 5, 2011

Revised Manuscript: April 26, 2011

Manuscript Accepted: May 23, 2011

Published: June 8, 2011

**Citation**

Arturo Espinosa-Romero and Ricardo Legarda-Saenz, "GPU based real-time quadrature transform method for 3-D surface measurement and visualization," Opt. Express **19**, 12125-12130 (2011)

http://www.opticsinfobase.org/oe/abstract.cfm?URI=oe-19-13-12125

Sort: Year | Journal | Reset

### References

- R. Legarda-Saenz, R. Rodriguez-Vera, and A. Espinosa-Romero, “Dynamic 3-D shape measurement method based on quadrature transform,” Opt. Express 18(3), 2639–2645 (2010). [CrossRef] [PubMed]
- NVIDIA, NVIDIA CUDA C Programming Guide (version 3.2), http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/ (2010).
- K. J. Gåsvik, Optical Metrology , 3rd ed. (John Wiley & Sons Ltd., 2002). [CrossRef]
- K. G. Larkin, D. J. Bone, and M. A. Oldfield, “Natural demodulation of two-dimensional fringe patterns. I. General background of the spiral phase quadrature transform,” J. Opt. Soc. Am. A 18, 1862–1870 (2001). [CrossRef]
- M. Servin, J. A. Quiroga, and J. L. Marroquin, “General n-dimensional quadrature transform and its application to interferogram demodulation,” J. Opt. Soc. Am. A 20, 924–934 (2003). [CrossRef]
- D. Ghigila and M. D. Pritt, Two-Dimensional Phase Unwrapping. Theory, Algorithms, and Software (John Wiley & Sons Ltd., 1998).
- T. Kreis, Holographic Interferometry: Principles and Methods (Akademie Verlag, 1996).
- J. M. Huntley and H. Saldner, “Temporal phase-unwrapping algorithm for automated interferogram analysis,” Appl. Opt. 32, 3047–3052 (1993). [CrossRef] [PubMed]
- S. De Nicola and P. Ferraro, “Fourier transform method of fringe analysis for moire interferometry,” J. Opt. A: Pure Appl. Opt. 2, 228–233 (2000). [CrossRef]
- J. D. Owens, M. Houston, D. Luebke, S. Green, J. E. Stone, and J. C. Phillips “GPU computing,” Proc. IEEE 96(5), 879–899 (2008). [CrossRef]
- M. Frigo and S. G. Johnson, “The design and implementation of FFTW3,” Proc. IEEE 93, 216–231 (2005). [CrossRef]
- NVIDIA, NVIDIA CUDA CUFFT LIBRARY (PG-05327-032_V02), http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/ (2010).
- C. Meneses-Fabian, R. Rodriguez-Vera, J. A. Rayas, F. Mendoza-Santoyo, and G. Rodriguez-Zurita, “Surface contour from a low-frequency vibrating object using phase differences and the Fourier-transform method,” Opt. Commun. 272(2), 310–313 (2007). [CrossRef]

## Cited By |
Alert me when this paper is cited |

OSA is able to provide readers links to articles that cite this paper by participating in CrossRef's Cited-By Linking service. CrossRef includes content from more than 3000 publishers and societies. In addition to listing OSA journal articles that cite this paper, citing articles from other participating publishers will also be listed.

### Figures

Algorithm 1 |
Fig. 1 |

« Previous Article | Next Article »

OSA is a member of CrossRef.