Scientific research of a stabilized flapping flight process (e.g. hovering) has been of great interest to a variety of fields including biology, aerodynamics, and bio-inspired robotics. Different from the current passive photogrammetry based methods, the digital fringe projection (DFP) technique has the capability of performing dense superfast (e.g. kHz) 3D topological reconstructions with the projection of defocused binary patterns, yet it is still a challenge to measure a flapping flight process with the presence of rapid flapping wings. This paper presents a novel absolute 3D reconstruction method for a stabilized flapping flight process. Essentially, the slow motion parts (e.g. body) and the fast-motion parts (e.g. wings) are segmented and separately reconstructed with phase shifting techniques and the Fourier transform, respectively. The topological relations between the wings and the body are utilized to ensure absolute 3D reconstruction. Experiments demonstrate the success of our computational framework by testing a flapping wing robot at different flapping speeds.
© 2017 Optical Society of America under the terms of the OSA Open Access Publishing Agreement
A stabilized flapping flight process (e.g. hovering) happening in a biological scene has been an excitement for a variety of fields including but not limited to biomechanics, aerodynamics and robotics. Performing dynamic 3D topological reconstruction for a flapping flight process has great potential to facilitate better understanding of the dynamics and mechanics of the flapping flight process . However, performing 3D reconstruction of a flapping flight process is challenging mainly because of the highly dynamic motion of the flapping wings.
Over the decades, scientists have been investigating different approaches for faster and more accurate 3D topological reconstruction. Among which, the photogrammetry based technology  has been widely adopted for flapping flight studies. To compute 3D coordinates, fiducial markers are commonly arranged on joints or boundaries of the wings to provide corresponding pairs for triangulation in different camera perspectives, and the topological reconstruction is typically performed through geometric modeling methods [2,3] from the sparsely measured marker points. Such technology has been proven successful in numerous insect flight studies [4–8]. However, the reconstructed 3D topology has a limited spatial resolution since only those marker points are precisely measured, which makes the potential subsequent analysis (e.g. wing mechanics analysis) become a challenging task.
Unlike a passive technique such as photogrammetry, the digital fringe projection (DFP) technique illuminates pre-designed patterns onto the scene to actively provide features for correspondence identification. The technology which projects defocused binary patterns  has the capability of conducting dense, high-quality and superfast (e.g. kHz) 3D topological reconstruction, and thus could be a potential solution to performing high quality 3D recording of a dynamic flapping flight process.
A DFP based technique typically performs phase-based analysis, which has advantages compared to intensity-based technique since phase information tends to be insensitive to noise and has higher measurement resolutions. Within phase-based analysis, the Fourier transform profilometry has apparent speed advantages for dynamic measurements with single-shot phase extraction. Later, a modified Fourier transform profilometry (MFTP)  was introduced to improve the phase quality by adding a π-shifted fringe. Generally speaking, to fully realize the speed advantage of FTP or MFTP, a spatial phase unwrapping [11,12] is typically accompanied to remove the 2π discontinuities on their extracted wrapped phase maps. However, a spatial phase unwrapping locally searches for 2π discontinuities on the phase map itself, which only produces a phase map that is relative to the starting point on a single connected component, which is not suitable for absolute 3D reconstruction. To find absolute phase for Fourier-based methods, different techniques were developed including embedding markers [13–15] or shifting the π-shifted fringe into a low frequency . The former method could encounter problems when the embedded markers are not clear on the measured sample, while the robustness of the latter method can be affected given that FTP typically does not produce high quality phase with low frequency fringes.
Apart from FTP or MFTP, the phase shifting technique [17–19] also enjoys popularity within DFP. The phase shifting technique typically produces a higher measurement quality than FTP or MFTP owing to the increased number of fringe images, and thus is more suitable for static or quasi-static measurements. Similar to FTP or MFTP, a phase shifting technique also extracts a wrapped phase map, and thus phase unwrapping is necessary to produce continuous phase map. For absolute 3D reconstruction, temporal phase unwrapping is typically employed which adds additional fringe images to provide cues for absolute phase retrieval. Popular techniques include multi-wavelength methods [20–23], intensity-coding methods [24,25] and phase-coding methods [26, 27]. All these techniques can produce high measurement quality under static or quasi-static scenes. However, it is not well suited for dynamic measurements since additional fringe images will further sacrifice the measurement speed. Although An et al  introduced a temporal phase unwrapping method without additional images, such method only functions well when the measured object does not exhibit depth range larger than 2π in phase domain.
For a stabilized flapping flight process, a unique characteristic is that the imaged scene contains both quasi-static (e.g. body) and rapid-motion (e.g. wings) components. With such priori knowledge, it is desirable to incorporate the merits of different technologies to achieve the optimum measurement quality. Some existing techniques [29–34] were aiming at developing generic solutions to alleviate motion induced problems in dynamic measurement conditions. Achieving such generality, however, may not always be necessary especially when the measurement is targeting at a specific case. For instance, the difference between the body and the wings in their nature of motion provides possibilities for further algorithm optimization.
In this research, we propose a specialized absolute 3D shape measurement technology for a stabilized flapping flight process. First of all, the quasi-static (e.g. body) and the rapid-motion (e.g. wings) components are segmented using image processing tools; then, the absolute phase of the quasi-static body part is reconstructed through a four-step phase shifting technique plus a temporal phase unwrapping method ; next, the relative phase maps of the rapid flapping wings are extracted by MFTP plus a spatial phase unwrapping method . Finally, with the known absolute phase map of the body, the geometric relations between the body and wings are employed to shift the relative phase maps of the wings to absolute ones, which subsequently results in a complete final absolute phase map after merging all the phases. Experiments will demonstrate the success of our computational framework by measuring a robotic bird under different flapping speeds. Results show that under an image acquisition speed of 5,000 Hz, we can successfully perform high quality topological 3D reconstruction of a flapping flight process up to 21 cycles/second.
In this section, we will introduce the related theoretical background as well as our proposed computational framework to perform superfast 3D imaging of a rapidly flying robot. We will first introduce two different fringe analysis techniques within the DFP technique: modified Fourier Transform profilometry (MFTP)  and four-step phase shifting method . We will then introduce our proposed computational framework which separately applies the two different techniques to the measurements of different parts of the flapping-wing robot.
2.1. Modified Fourier transform profilometry (MFTP)
In a MFTP method , two fringe patterns with a phase shift of π are required:Eq. (1) – (2), one can first of all eliminate the DC component by doing image subtraction Eq. (4) can be rewritten in a form of summing two harmonic conjugate components: 10]) to preserve only one of the two harmonic conjugate components. The resultant image If can be expressed as:
2.2. Four-step phase shifting profilometry
Besides MFTP, we also used a four-step phase shifting method  in this research. Apart from the two fringes expressed in Eq. (1) – (2), two additional π-shifted fringes are required which can be expressed asEq. (1) – (2) and Eq. (8) – (9), we can extract the phase ϕ(x, y) with the following equation: Eq. (7) and Eq. (10) are expressed in arctangent functions, meaning that both MFTP and phase shifting methods can only produce wrapped phase maps ranging from −π to π. To remove the 2π discontinuities and produce a continuous phase map, a spatial or temporal phase unwrapping method is necessary which essentially adds integer k (x, y) multiples of 2π on the points with phase discontinuities:
As aforementioned, in general, the resultant unwrapped phase maps from spatial phase unwrapping are relative to a point on a single connected component, and thus is difficult to be used for absolute phase retrieval. However, a temporal phase unwrapping method typically requires additional fringe projection to provide cues to determine the absolute fringe order, making it challenging for measuring flapping wings which commonly presents perceivable motion between a sequence of fringes even if a high-speed (e.g. kHz) fringe projection and image acquisition is performed. However, consider in a stabilized flapping flight, the body part can be regarded as quasi-static given that no vibrant body locomotion is present. In this case, temporal phase unwrapping should still function well enough to obtain high quality absolute phase. Also, given that the wings and the body are constrained geometrically, the known absolute phase of the body could assist us in obtaining absolute phase for the fast flapping wings. The next section will elaborate our proposed hybrid computational framework based on the aforementioned assumptions.
2.3. Proposed hybrid computational framework for absolute phase retrieval
Figure 1 illustrates a schematic diagram of our proposed computational framework. In our proposed method, we used a total of 8 fringes for absolute phase computation, including a set of high-frequency (i.e. fringe period TH = 24 pixels) four-step phase shifted binary area modulated patterns  (denote as I1 – I4), and a set of low-frequency (i.e. fringe period TL = 380 pixels) four-step phase shifted binary dithered patterns  (denote as I5 – I8). The first step is to obtain the DC component [see Eq. (3)] to assist the segmentation of the body (with slow motion) and the wings (with fast motion). The details of segmentation will be explained in Step 1 of Sec. 2.4. For the body part, we used the standard four-step phase shifting with an enhanced two-wavelength temporal phase unwrapping method  to obtain absolute phase, using all 8 patterns. For each segmented wing, we used MFTP method with spatial phase unwrapping to get continuous relative phase maps. To shift the relative phase maps of the wings to absolute sense, we inspected the known absolute phase of the body to get insights for determining absolute fringe order for the wings (details to be explained in Step 4 of Sec. 2.4). Finally, the absolute phase map of the entire robotic bird with flapping flight is reconstructed by merging the absolute phase maps of both the body and the wings. In the next section, we will elaborate the details step-by-step for better understanding of our proposed computational framework.
The entire computational framework is composed of the following major steps:
- Step 1: Segmentation of the body and the wings. We first obtained the DC component of the robotic bird using Eq. (3). Then, for the first frame, we manually extracted the body segment shown in Fig. 2(a) as a template image. For our next frame, we recognized its body part by performing template matching using MatLab vision.TemplateMatcher toolbox which inherently adopts a matching metric of the sum of absolute difference. The matched body part is shown in Fig. 2(b), on which the extracted body part will then be used to identify the body part for the next frame. Once the body part is recognized, we can create a mask image Mbody for the body part, as shown in Fig. 2(c). The mask images for the wings Mwings are then generated by subtracting the body part from the overall image, as shown in Fig. 2(d).
- Step 2: Absolute phase retrieval for the body. After segmenting the body and the wings, we first adopt an enhanced two-wavelength phase shifting method for absolute phase retrieval  of the body. First, we extract the wrapped phases and respectively from both the low-frequency (i.e. I5 – I8, TL = 380) and high-frequency (i.e. I1 – I4, TH = 24) fringes using four-step phase shifting (see Sec. 2.2). A sample fringe (with body mask Mbody applied) of both low- and high-frequency fringes are shown in Fig. 3(a) and 3(b), respectively; and the resultant wrapped phase maps and are shown in Fig. 3(c) – 3(d). It is worth to note that all figures in Fig. 3 are cropped for better visualization purpose. Then, the low-frequency absolute phase shown in Fig. 3(f) is obtained by referring to an artificial absolute phase plane Φmin shown in Fig. 3(e) (see Reference  for details). The low-frequency absolute phase can be computed as Fig. 3(g).
It is worth to mention that we did not directly use MFTP for the extraction of body. The reason is that the body part, as shown in Fig. 4(a), contains dramatic local textural or geometric variations, which could deteriorate the phase quality of the MFTP method. Figure 4(b) – 4(c) demonstrate the reconstructed 3D profiles of the body part respectively using the absolute phases obtained from MFTP and four-step phase shifting methods. From visual comparison, one can clearly see that four-step phase shifting presents higher measurement quality under this scenario. Therefore, we use four-step phase shifting for body extraction in this research.
- Step 3: Relative phase retrieval for the wings. For the extracted wings, we adopted the MFTP method (see Sec. 2.1) using I1 and I2 to obtain a wrapped phase map for each wing. A sample fringe with each wing’s mask applied is shown in Fig. 5(a) and 5(d) and the resultant wrapped phase maps are shown in Fig. 5(b) and 5(e). Then, we adopted a multi-level quality guided spatial phase unwrapping method  to obtain continuous relative phase maps for each wing, as shown in Fig. 5(c) – 5(f).
- Step 4: Absolute phase retrieval for the wings by referring to the body’s absolute phase. As aforementioned, the nature of spatial phase unwrapping is that it unwraps phase starting from a point on a single connected component. Therefore, the unwrapped phase for each wing from previous step is relative to a single point on that wing, which has an integer kshift multiples of 2π shift from its absolute phase. Figure 6(a) – 6(c) respectively show the body’s absolute phase and the wings’ relative phases. If we pick the same cross-section (red) on the three phase maps and plot them all on Fig. 6(d), we can see that there exists abrupt phase jumps between the boundaries of the wings and the body, which is a result of the rigid shift of kshift × 2π. However, since the phase of the body is absolute, it gives us additional information to find out the rigid shift kshift in fringe order. We first introduce a reference phase line y = f(x) that can be expressed as: Fig. 6(d) as a pink dash-dotted line. Once we have extracted the reference phase line, we pick the phase values ywings of the nearest 20 boundary pixels of the wings to locate the fringe order shift kshift as Figure. 6(e) and 6(f) respectively show a cross-section and the complete absolute phase map of the wings after compensating the rigid shift.
- Step 5: Generation of final absolute phase map. Once the absolute phase maps and are obtained for both the body and the wings, we can merge into a final absolute phase map by applying the mask images: Figure 7(a) shows the final absolute phase map. To demonstrate that the finally computed phase map is indeed absolute phase map, we plot a phase cross-section in Fig. 7(b) and overlay it with the same phase cross-section obtained from the conventional temporal phase unwrapping (i.e. enhanced two-wavelength method ), from which we can see that overall they agree quite well with each other. To visualize their differences, we subtracted the two curves and plotted the difference in Fig. 7(c). On this difference curve, we can see that on the body part (middle), the two methods have identical results since for body phase extraction, our proposed method does exactly the same way as the conventional temporal phase unwrapping method does. However, we can indeed see apparent difference on the wings (mean difference: 0.27 rad; RMS difference: 1.34 rad). The reason is that the conventional temporal phase unwrapping method introduces measurement errors caused by the wings’ motion, albeit the mean difference is still relatively small. To clearly visualize this effect, we performed calibration based 3D reconstruction  using both methods and the results are shown in Fig. 7(d) – 7(e). The results and associated video ( Visualization 1) clearly demonstrate that our method consistently produces high measurement quality, yet the conventional temporal phase unwrapping method creates errors and motion artifacts on the surface and on some boundary points of the wings, as shown in the highlighted areas in Fig. 7(e). In this preliminary testing, we set the flapping speed at a relatively slow speed of 7 cycles/second. In the next section, we will demonstrate more thorough evaluations by showing the dynamic experimental results under other different flapping speeds of the wings, including 12 cycles/second (moderate) and 21 cycles/second (high).
We set up a superfast DFP-based 3D shape measurement platform to validate our proposed computational framework. A Wintech PRO 6500 DLP projector is used for high-speed fringe projection, and a high-speed CMOS camera (Model: NAC MEMRECAM GX-8F) is used for image capture. The image acquisition is properly synchronized with pattern projection at a speed of 5,000 Hz. The image resolutions for the projector and the camera are set as 1, 920 × 1, 080 pixels and 800 × 600 pixels, respectively. The camera lens (Model: SIGMA 24 mm f/1.8 EX DG) has a 24 mm focal length with an aperture ranges from f/1.8 to f/22. The sample robotic bird (Model: XTIM Bionic Bird Avitron V2.0) that we used has a maximum beat frequency around 25 cycles/second. A single wing span is around 150 mm (L) × 70 mm (W).
We first set the robotic bird at a moderate flapping speed around 12 cycles/second, and measured its dynamic flapping flight process using both proposed method and conventional enhanced two-wavelength method . We show the results of a sample down-stroke and up-stroke frame in Fig. 8 and the dynamic 3D results in its associated video ( Visualization 2). From the results, we can clearly see that similar as the previous result, the conventional enhanced two-wavelength method exhibits apparent errors and artifacts on the wings. Yet our method consistently provides higher measurement quality, which indicates the success of our method.
For further validation, we performed similar experiments by changing the flapping speed up to 21 cycles/second. Figure 9 and its associated video ( Visualization 3) show the measurement results, from which we can see that the our method again consistently works well, yet the conventional enhanced two-wavelength method still suffers quite a lot from motion induced errors and artifacts. This series of experiments with different flapping speeds have clearly demonstrated the success of our computational framework.
For the measurement of a stabilized flapping flight process, our method has the following advantages compared to existing absolute 3D reconstruction methods:
- Marker-less measurements with high spatial resolutions. Compared to existing photogrammetry based methods, our technology does not require fuidicial markers for topological reconstruction, and can provide high resolution 3D recovery of a flapping flight process with high measurement quality.
- Resistance to errors caused by wings’ motion. The absolute phase of the wings were separately retrieved by shifting the spatially unwrapped phase from MFTP method. Therefore, the phase obtained from MFTP ultimately determines the quality of reconstructed 3D geometry for the wings. Since MFTP method only requires two fringe images, it is resistant to errors caused by the wings’ motion.
- Combined advantages of Fourier transform and phase-shifting. Our method separately performs 3D reconstruction for the body and the wings, where the phase quality advantage of the phase-shifting method was beneficial to the reconstruction of quasi-static body, yet the speed advantage of Fourier transform method was more appropriate for the reconstruction of rapid-moving wings.
Our research presented in this article mainly focuses on measuring a stabilized flapping flight process. It has great potential for analysis of a similar phenomenon in insect flight study such as hovering. However, our technology could encounter challenges when the flapping flight scene is not stabilized or contains vibrant out-of-plane body locomotion, since our body-wing segmentation is based on template matching. Future investigations on developing a more robust body tracking and segmentation methods are necessary to employ such algorithm in a more generic flapping flight process.
In this research, we presented a specialized absolute 3D shape measurement method for a stabilized flapping flight process. We first segmented the body with slow motion and the wings with fast motion. Then, by taking advantage of the phase quality merit of phase-shifting and the speed advantage of Fourier transform, we separately performed phase extraction using the former method for the body and the latter method for the wings. The former method computes absolute phase map for the body using conventional temporal phase unwrapping, yet the latter method produces relative phase maps for the wings with spatial phase unwrapping. Finally, the absolute phase map of the wings are computed by referring to the known extracted absolute phase map of the body. Under a superfast 3D shape measurement system with an image acquisition speed of 5,000 Hz, we demonstrated the success of our method by measuring a robotic bird at different flapping speeds. Such technology can drastically increase the resolutions of topological reconstruction compared to current passive photogrammetry based methods.
National Science Foundation (NSF) Directorate for Engineering (ENG) (CMMI-1531048).
The authors would like to thank the members in XYZT laboratory at Purdue University. In particular, we thank Jae-Sang Hyun for his assistance in hardware setup and data collection. This research work was carried out when Beiwen Li was with Purdue University.
References and links
1. T. L. Hedrick, S. A. Combes, and L. A. Miller, “Recent developments in the study of insect flight,” Canadian Journal of Zoology 93, 925–943 (2014). [CrossRef]
2. S. M. Walker, A. L. Thomas, and G. K. Taylor, “Photogrammetric reconstruction of high-resolution surface topographies and deformable wing kinematics of tethered locusts and free-flying hoverflies,” J. Royal Soc. Interface 6, 351–366 (2009). [CrossRef]
4. Y. Ren, H. Dong, X. Deng, and B. Tobalske, “Turning on a dime: Asymmetric vortex formation in hummingbird maneuvering flight,” Physical Review Fluids 1, 050511 (2016). [CrossRef]
5. B. W. Tobalske, D. R. Warrick, C. J. Clark, D. R. Powers, T. L. Hedrick, G. A. Hyder, and A. A. Biewener, “Three-dimensional kinematics of hummingbird flight,” J. Exp. Biol. 210, 2368–2382 (2007). [CrossRef] [PubMed]
6. A. P. Willmott and C. P. Ellington, “The mechanics of flight in the hawkmoth manduca sexta. i. kinematics of hovering and forward flight,” J. Exp. Biol. 200, 2705–2722 (1997).
7. R. J. Wootton, “Leading edge section and asymmetric twisting in the wings of flying butterflies (insecta, papilionoidea),” J. Exp. Biol. 180, 105 (1993).
8. U. M. L. Norberg and Y. Winter, “Wing beat kinematics of a nectar-feeding bat, glossophaga soricina, flying at different flight speeds and strouhal numbers,” J. Exp. Biol. 209, 3887–3897 (2006). [CrossRef]
10. L. Guo, X. Su, and J. Li, “Improved fourier transform profilometry for the automatic measurement of 3d object shapes,” Opt. Eng. 29, 1439–1444 (1990). [CrossRef]
11. D. C. Ghiglia and M. D. Pritt, Two-Dimensional Phase Unwrapping: Theory, Algorithms, and Software (John Wiley and Sons, 1998).
12. X. Su and W. Chen, “Reliability-guided phase unwrapping algorithm: a review,” Opt. Laser Eng. 42, 245–261 (2004). [CrossRef]
13. H. Guo and P. S. Huang, “Absolute phase technique for the fourier transform method,” Opt. Eng. 48, 043609 (2009). [CrossRef]
14. Y. Xiao, X. Su, Q. Zhang, and Z. Li, “3-d profilometry for the impact process with marked fringes tracking,” Opto-Electron. Eng. 34, 46–52 (2007).
16. H. Yun, B. Li, and S. Zhang, “Pixel-by-pixel absolute three-dimensional shape measurement with modified Fourier transform profilometry,” Appl. Opt. 56, 1472–1480 (2017). [CrossRef]
17. D. Malacara, Optical Shop Testing (John Wiley & Sons, 2007). [CrossRef]
18. M. Servin, J. A. Quiroga, and J. M. Padilla, Fringe Pattern Analysis for Optical Metrology: Theory, Algorithms, and Applications (John Wiley & Sons, 2014).
19. S. Zhang, High-Speed 3D Imaging with Digital Fringe Projection Techniques (CRC Press, 2016).
21. Y.-Y. Cheng and J. C. Wyant, “Multiple-wavelength phase shifting interferometry,” Appl. Opt. 24, 804–807 (1985). [CrossRef]
22. Y. Wang and S. Zhang, “Superfast multifrequency phase-shifting technique with optimal pulse width modulation,” Opt. Express 19, 5143–5148 (2011).
24. J. Pan, P. S. Huang, and F.-P. Chiang, “Color-coded binary fringe projection technique for 3-d shape measurement,” Opt. Eng. 44, 023606 (2005). [CrossRef]
25. S. Zhang, “Flexible 3d shape measurement using projector defocusing: Extended measurement range,” Opt. Lett. 35, 931–933 (2010).
27. Y. Xing, C. Quan, and C. Tay, “A modified phase-coding method for absolute phase retrieval,” Opt. Lasers Eng. (2016). (in press). [CrossRef]
30. C. Zuo, Q. Chen, G. Gu, S. Feng, F. Feng, R. Li, and G. Shen, “High-speed three-dimensional shape measurement for dynamic scenes using bi-frequency tripolar pulse-width-modulation fringe projection,” Opt. Lasers Eng. 51, 953–960 (2013). [CrossRef]
32. P. Cong, Z. Xiong, Y. Zhang, S. Zhao, and F. Wu, “Accurate dynamic 3d sensing with Fourier-assisted phase shifting,” IEEE Journal of Selected Topics in Signal Processing 9, 396–408 (2015). [CrossRef]
33. B. Li, Z. Liu, and S. Zhang, “Motion induced error reduction by combining Fourier transform profilometry with phase-shifting profilometry,” Opt. Express 24, 23289–23303 (2016). [CrossRef] [PubMed]
35. S. Zhang, X. Li, and S.-T. Yau, “Multilevel quality-guided phase unwrapping algorithm for real-time three-dimensional shape reconstruction,” Appl. Opt. 46, 50–57 (2007). [CrossRef]
36. H. Schreiber and J.-H. Bruning, “Phase Shifting Interferometry”, in Optical Shop Testing, 3 Edition, D. Malacaral,ed. (John Wiley & Sons, 2007). [CrossRef]
37. W. Lohry and S. Zhang, “Fourier transform profilometry using a binary area modulation technique,” Opt. Eng. 51, 113602 (2012). [CrossRef]