## 2 Principle
### The PMP Based on the Proposed Quaternary Grating Projection Principle  
After obtaining three binary fringes with a duty cycle of \(1/3\) and an interval of \(1/3\) period, the binary grating PMP method could be used to reconstruct the 3D surface shape of the object. The binary deformed patterns can be expressed as  
\[\left\{\begin{array}{l}I_{1}(x,y)=A_{0}rect(\frac{x}{w_{1}})*comb(\frac{x}{T_ {0}})\\ I_{2}(x,y)=A_{0}rect(\frac{x}{w_{1}})*comb(\frac{x-T_{0}/3}{T_{0}})\\ I_{3}(x,y)=A_{0}rect(\frac{x}{w_{1}})*comb(\frac{x-2T_{0}/3}{T_{0}})\\ \end{array}\right. \tag{1}\]  
where \(I_{1}(x,y)\), \(I_{2}(x,y)\), \(I_{3}(x,y)\) represent the gray distribution of three nonzero grayscale deformed patterns. \(A_{0}\) represents the background light intensity which is constantly played, w1 represents the width of a nonzero part in one period of the encoded binary fringe, and \(T_{0}\) is the width of the period of the encoded binary fringe, and \(*\) denotes the convolution operation.  
The \(I_{1}(x,y)\) is analyzed in detail to illustrate the principle of the proposed method. The Fourier spectrum \(G_{1}\big{(}f_{x},f_{y}\big{)}\) of \(I_{1}(x,y)\) can be expressed as  
\[G_{1}(f_{x},f_{y})=A_{0}w_{1}[\delta(f_{x})+\sin c(\frac{w_{1}}{T_{0}})\delta( f_{x}+f_{0})+\sin c(\frac{w_{1}}{T_{0}})\delta(f_{x}-f_{0})] \tag{2}\]  
The nearly unbroken sinusoidal deformed pattern \(I_{1F}(x,y)\) can be extracted by Inver Fourier Transform (IFT) and represented as  
\[I_{1F}(x,y)=A_{0}P_{dc}T_{0}+2A_{0}P_{dc}T_{0}\sin c(P_{dc})\cos(2\pi f_{0}x) \tag{3}\]  
The other two sinusoidal deformed patterns \(I_{2F}(x,y)\) and \(I_{3F}(x,y)\) can also be extracted from another two deformed patterns, respectively, which can be represented as  
\[\left\{\begin{array}{l}I_{1F}(x,y)=A(x,y)+B(x,y)\cos[\frac{2\pi x}{2}+\varphi (x,y)]\\ I_{2F}(x,y)=A(x,y)+B(x,y)\cos[\frac{2\pi x}{2}+\varphi(x,y)+\frac{2\pi}{3}]\\ I_{3F}(x,y)=A(x,y)+B(x,y)\cos[\frac{2\pi x}{2}+\varphi(x,y+\frac{4\pi}{3})]\\ \end{array}\right. \tag{4}\]  
where T represents the period of the deformed patterns, \(A(x,y)\) is simplified from \(A_{0}P_{dc}T\) and represents the background light intensity, \(B(x,y)\) represent the contrast of the deformed pattern and simplified from \(2A_{0}P_{dc}T\sin c(P_{dc})\), \(\varphi(x,y)\) is the phase introduced by the reference plane and it can be expressed as  
\[\varphi(x,y)=\arctan\left\{\frac{\sqrt{3}[I_{1F}(x,y)-I_{3F}(x,y)]}{2I_{2F}(x,y)-I_{1F}(x,y)-I_{3F}(x,y)}\right\} \tag{5}\]  
Due to the \(\varphi(x,y)\) is wrapped in \((-\pi,\pi]\) by the arctan function. The wrapped phase of the object should be unwrapped to \(\phi_{d}(x,y)\), in the same way, the unwrapped phase of the reference plane can be acquired as \(\phi_{d}(x,y)\), and the phase \(\phi_{d}(x,y)\) caused by the height of the measured object can be represented as  
\[\phi_{h}(x,y)=\phi_{d}(x,y)-\phi_{r}(x,y) \tag{6}\]  
Thus, a phase-to-height mapping relationship is used to reconstruct the 3D shape of the measured object [28]:  
\[\frac{1}{h(x,y)}=a(x,y)+b(x,y)\frac{1}{\phi_{h}(x,y)}+c(x,y)\frac{\phi_{r}(x,y)}{\phi_{h}(x,y)} \tag{7}\]  
where \(a(x,y)\), \(b(x,y)\) and \(c(x,y)\) are the system constants and can be calibrated by several planes with known heights.