# A Binocular Vision-Based 3D Sampling Moire Method for Complex Shape Measurement
## 3 Digital Simulation Experiment and Discussions
### Anti-Noise Ability  
In actual measurement, noise is inevitable in digital images. The heterogeneous reflectivity of the measured object or improper settings of the camera, such as underexposure or an excessive ISO, can result in significant noise [17]. In order to verify the anti-noise capability of the sampling moir\(\acute{\text{e}}\) method, we introduce displacement field \(u\) into the undeformed fringe and speckle images and obtained the deformed images through the sub-pixel  
Figure 4: Digital simulation of 3D-sample moir\(\acute{\text{e}}\).  
Figure 5: Comparison of 3D shape measured by 3D-SM and 3D-DIC. (**a**) Left and right view of the virtual plane, (**b**) Measurement results of 3D-SM and 3D-DIC, (**c**) RMS 3D shape error of different displacements.  
difference. The expression of \(u\) is shown in Equation (10), and its value range was from -6.5 to 8.1 pixels. Second, different levels of random noise were added to the fringe and speckle images. The noise was composed of Gaussian noise with an average value of 0, a standard deviation of 0%-23%, and salt-and-pepper noise with a density of 0%-23%. In the digital experiment, the size of the fringe and speckle images was 500 \(\times\) 500 pixels, the fringe spacing and sampling pitch were 10 pixels, the diameter of a single speckle in the speckle images was 7-9 pixels, and the subset size calculated by DIC was 21 \(\times\) 21 pixels. In addition, a common processing method for random noise is filtering. After Gaussian filtering of the fringe and speckle images under different noise levels, the displacement field was also calculated for comparison. A Gaussian window with a size of 5 \(\times\) 5 pixels and a standard deviation of 1 were used in the filtering process.  
Figure 6 shows the displacement results of sampling moire and DIC under different noise levels. As can be seen, in an ideal noise-free situation (Figure 6a), the accuracy of sampling moire is an order of magnitude higher than that of DIC. At a noise level of 10% (Figure 6b), the root mean square (RMS) of the displacement error was similar, and both were less than 5% of the \(u\) displacement field. When the noise level reached 15% (Figure 6c), there were several obvious line-shaped zones in the DIC displacement contour, meaning that the displacement inside was not reliable. In this regard, the image filtering process can improve the result. When the noise reaches 20% (Figure 6d), the speckle images before and after deformation lose their correlation, making the DIC calculation fail, and even filter processing cannot obtain the correct result. In contrast, sampling moire under such a noise level can still be used to acquire the displacement field. Even when the noise level reaches 23% (Figure 6d) and the fringe shape is difficult to recognize by the naked eye, the displacement field distribution obtained by sampling moire remains close to \(u\). According to the comparison with DIC, sampling moire has a stronger anti-noise capability, which means it may have good potential for further applications.  
\[u(x,y)=3(1-x)^{2}e^{-x^{2}-(y+1)^{2}}-10\Big{(}\frac{x}{5}-x^{3}-y^{5}\Big{)}e ^{-x^{2}-y^{2}}-\frac{1}{3}e^{-(x+1)^{2}-y^{2}} \tag{10}\]  
Figure 6: The RMS displacement error versus random noise obtained by SM and DIC. (**a**) Noise-free (**b**) Noise 10%, (**c**) Noise 15%, (**d**) Noise 20%, (**e**) RMS displacement error under different noise levels.