# Method for Generating Panoramic Textures for 3D Face Reconstruction Based on the 3D Morphable Model
## 3 Panoramic Texture Generation Method
### Panoramic Texture Dataset Generation Method
#### 3.1.3. UV Texture Blending  
The UV texture generation stage provided a set of UV textures with varying degrees of self-occlusion artifacts for each synthetic identity. However, the regions of the image that included low-quality texture were identifiable--an image tilted to the right displayed a high-quality texture on the left and vice versa. Therefore, high-quality sections of the texture were combined into a single cohesive texture. In this stage, as shown in Figure 5, for each identity, each unwrapped texture \(\{T_{ij}\}\), \(i\in B,j\in\frac{N}{2}\pm M\) of the identity is considered as the input and \(M\) is the threshold for the texture range participating in the synthesis. The Poisson blending algorithm [31] was used to combine two images, considering that it provides flawless fusion solutions for image-processing challenges. Further, the panoramic texture \(\{P_{tex}\}\), \(i\in B\) of each identity was computed. First, we calculated the front-view texture image, which was at the center of each identity series of the unwrapped textures. The texture is defined as \(\big{\{}T_{ij}\big{\}}\) where \(i\in B\), \(j=\frac{N}{2}\). Then, we computed the left and right halves of the panoramic texture. For the textures \(\big{\{}T_{ij}\big{\}}\), \(i\in B,j\in\Big{[}\frac{N}{2}-M,\frac{N}{2}-1\Big{]}\) were used to construct the right half of the panorama texture for each identity. The input face images corresponding to this portion of the texture were all deflected to the right and, hence, the exposed left-face information was more comprehensive (the left side of the face corresponds to the right half of the 2D texture). As a result, the right half of the texture had higher quality and was more comprehensive. The ROI for synthesizing the right half of the texture, which is determined by the width and height of the texture mappings as well as the texture's subscript location in each identity, was first calculated for any texture within this range. Figure 6 shows the procedure for calculating the bounding box coordinates of the ROI (Algorithm 1, lines 10-15 and lines 20-24). Then, each texture within this range and the ROI were passed as arguments to the Poisson blending algorithm for producing the right-half \(I_{r}\) of the panorama texture. (Algorithm 1, line 16). Figure 4: Unwrapped UV texture. For the textures \(\left\{T_{ij}\right\},i\in\text{B},j\in\left[\frac{N}{2}+1,\frac{N}{2}+M\right]\), were utilized to construct the left half of the panorama texture. This procedure was similar to that previously described. Ultimately, the left portion of the panoramic texture, \(I_{l}\) was acquired (Algorithm 1, lines 18-25). The left \(I_{l}\) and right \(I_{r}\) sections were eventually patched together using Poisson blending, as shown in Figure 7. The ROI can be considered as the left or right half of the image. Finally, a complete panoramic texture \(\left\{P_{tex}\right\}\) corresponding to the identity was the output (Algorithm 1, lines 28-41). Figure 5: Texture blending calculation method. Figure 6: ROI calculation. ```
1:input:TEXTURE[0:B,0:N], M
2:TEXTURE is the texture map array. 3:B is the number of identities. 4:N is the number of view angle. 5:M is the threshold of the texture range for synthesizing.