Mapping method of head model
Through Poisson reconstruction and image fusion technology, combined with histogram equalization and Gamma correction, the problems of hair lighting simulation and seam texture splicing in the existing technology are solved, achieving a more natural and realistic head model map, and improving rendering. Effects and interactivity.
Patent Information
- Application Number
- CN202410593949.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
AI Technical Summary
Existing head mapping technology is difficult to accurately simulate the appearance of hair under different lighting conditions. As a result, the hair area mapping is not natural enough, and some areas lose details due to lighting problems. The facial texture cannot be automatically beautified, and the texture splicing at the seams is incorrect, destroying the The realism of the model.
By collecting image information from different areas of the human head, using the Poisson reconstruction method for triangular grid processing, extracting texture information and performing image fusion, combined with histogram equalization and Gamma correction methods, adjust the image grayscale and brightness, and use camera parameters Map textures onto 3D models to achieve seamless mapping.
Implemented adaptive lighting intensity adjustment to ensure that shadows do not appear too dark, dynamically adjusted map brightness to make the rendering effect more natural and realistic, solved hair texture errors and seam texture problems, and improved the authenticity and accuracy of the head model. Interactivity.
Smart Images

Figure CN118537485A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of 3D digital modeling, and in particular relates to a mapping method for a head model. Background Art
[0002] With the rapid development of metaverse and digital human technologies, 3D modeling of the human body, especially the human head, and building hyper-realistic, drivable digital humans have become an urgently needed technology.
[0003] 3D modeling refers to the process of creating three-dimensional objects through computer graphics technology, which can be achieved through a variety of methods, including polygonal modeling, surface modeling, and voxel modeling. Based on 3D modeling, mapping technology is the process of adding texture and details to the surface of the model. Maps can be color textures, normal maps, displacement maps, etc. These maps make 3D models look more realistic because they simulate the subtle details and lighting effects on the surface of the object. The current trend is to use physically based rendering, which is a method of simulating lighting and material reactions more realistically. PBR takes into account the physical properties of light, including metalness, roughness, etc., making the rendering results more realistic. With the development of real-time graphics technology, such as real-time rendering in game engines, people can see high-quality 3D models and mapping effects in real-time environments, not just pre-rendered scenes. The rise of deep learning technology has brought new possibilities to the field of graphics generation. For example, generative adversarial networks (GANs) based on neural networks can be used for map synthesis to generate high-quality textures and details. With the development of AR and VR technology, the demand for more realistic and interactive 3D models and maps is also increasing. This requires higher graphics quality and performance. Overall, 3D modeling and texturing technology has made significant progress in both technology and application. From early simple models and textures to today's real-time rendering and deep learning applications, this field continues to evolve, bringing more fascinating experiences to fields such as digital art, games, and virtual reality.
[0004] The human head is a very complex geometric body. Rapid modeling of the human head is the most important and difficult part of 3D human modeling. The existing head mapping technology mainly has the following technical problems: (1) Hair presents different colors and textures under different lighting conditions. Existing algorithms may find it difficult to accurately simulate the appearance of hair under various lighting conditions, resulting in unnatural mapping of the hair area, which will show some wrong textures when pasted on the model. (2) Some areas may lose details due to overexposure (too bright) or underexposure (too dark). Failure to properly handle reflections and shadows may cause the brightness on the map to not match the actual scene, making the model look unrealistic. (3) Facial textures cannot be automatically beautified, which cannot meet the user's multiple choices. (4) In 3D reconstruction and mapping, the problem of seams is a common challenge. These seams may appear in different situations, such as where different parts of the model are connected, where different maps are spliced, etc. When different areas or different maps are connected, due to changes in lighting, materials or shooting conditions, the texture at the seams is incorrectly spliced, thus destroying the overall sense of reality. Summary of the invention
[0005] In view of the above-mentioned defects, an object of the present invention is to provide an improved method for mapping a head model so as to achieve a more realistic and natural mapping of the head model.
[0006] The technical solution adopted by the present invention is as follows:
[0007] A mapping method for a head model, the method comprising:
[0008] Collect image information from different areas of the human head, including structured light images and texture images, and then stitch them together to get a complete head point cloud;
[0009] Performing triangulated meshing processing on the head point cloud by using a Poisson reconstruction method to reconstruct the head surface;
[0010] Extracting foreground information from the texture image to obtain a foreground Mask image, and performing an erosion operation on the foreground Mask image;
[0011] Designing and storing a universal background texture map, wherein the background texture map includes: a hair texture map and a skin texture map;
[0012] Combining the foreground information, the foreground mask image and the background texture map, using image fusion technology to complete the fusion of the background and foreground, and obtain a fused image of each head area;
[0013] Detecting a local area in the fused image, and adjusting the grayscale value of the fused image to a normal illumination range by using a histogram equalization method and a gamma correction method;
[0014] The camera parameters and the reconstructed head surface are combined to determine the image coordinates corresponding to each point on the surface of the three-dimensional model, and the texture on the image is mapped onto the three-dimensional model, and texture synthesis is performed to obtain a complete map of the head model.
[0015] Further, obtaining the fused image of each head region includes:
[0016] For different angle areas of the head, a foreground image and a preset background texture map, as well as a corresponding foreground Mask image, are obtained;
[0017] Converting the foreground image and the background texture map from the RGB color space to the Lab color space;
[0018] Applying Gaussian blur processing to the edge of the foreground Mask image;
[0019] The high-brightness area in the Mask image represents the pixels of the first image, and the dark-brightness area represents the pixels of the second image. The foreground image extracted from the first image is merged with the background texture image extracted from the second image.
[0020] Furthermore, adjusting the image grayscale by the histogram equalization method includes: dividing the fused image into a plurality of small blocks, analyzing the histogram distribution of each small block, detecting the local histogram area, identifying the area with abnormal grayscale due to the existence of illumination difference, and performing grayscale adjustment on the area.
[0021] Further, adjusting the image grayscale by the Gamma correction method includes: based on the following formula: O = A·I γ , where I γ is the input pixel value, O is the output pixel value, γ is the Gamma value, and A is the amplification factor. By adjusting the γ value, the overall brightness of the image is affected. When γ<1, the image will become brighter, and when γ>1, the image will become darker. For areas with too much backlight or dark parts, use a γ value less than 1 to increase their brightness, and for overexposed areas, increase the γ value to reduce the brightness.
[0022] Furthermore, the stitching to obtain a complete head point cloud includes: analyzing the image changes after the human head is projected with structured light, calculating the phase information of each pixel, using the phase information to calculate the depth value of each point on the object surface to obtain three-dimensional information, and denoising, aligning, and stitching the three-dimensional information to obtain a complete point cloud.
[0023] Furthermore, obtaining a complete texture of the head model includes:
[0024] Get camera parameters, including internal and external parameters of the camera;
[0025] The three-dimensional geometric surface of the head is obtained by a head modeler;
[0026] Using the camera parameters, a projection matrix is constructed from the 3D space to the 2D image plane, so that each point of the 3D model can find its specific position on the image.
[0027] Extracting texture information from multiple images, wherein if a 3D point is visible in multiple images, the texture with the highest image clarity is selected;
[0028] According to the correspondence between 3D points and images, multiple different image textures are fused into a continuous and seamless 3D model surface map through the Poisson fusion method.
[0029] Furthermore, collecting different areas of the human head includes: using head modeling to collect the top area, front face area, back area, left area and right area of the human head respectively.
[0030] Compared with the prior art, the head model mapping method provided by the present invention has the following technical effects:
[0031] 1. Adaptive lighting intensity to ensure that there is enough ambient light in the shadow area so that the shadow does not appear too dark.
[0032] 2. Use histogram equalization, gamma correction and local adjustment methods to dynamically adjust the brightness of the map to ensure that the adjusted map brightness is neither too dark nor overexposed, making the overall rendering effect more natural and realistic.
[0033] 3. The use of cutout technology and image fusion technology solves the problem of texture error and loss in the hair area, which can improve the performance of the hair area in 3D reconstruction and mapping.
[0034] 4. Create smooth transition areas at the seams of textures to ensure that color, brightness, and texture features transition gradually rather than change abruptly. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 4 is a flow chart of a method for mapping a head model according to an embodiment of the present invention.
[0036] FIG. 2( a ) is an original image of a human head captured in an embodiment of the present invention.
[0037] FIG2( b ) is a detected foreground Mask image according to an embodiment of the present invention.
[0038] FIG. 3( a ) is a background hair texture diagram designed according to an embodiment of the present invention.
[0039] FIG. 3( b ) is a background skin texture diagram designed according to an embodiment of the present invention.
[0040] FIG. 4( a ) is a diagram showing the effect of fusion of each region according to an embodiment of the present invention.
[0041] FIG4( b ) is a complete 8k high-resolution head texture synthesized according to an embodiment of the present invention.
[0042] FIG. 5( a ) is a schematic diagram showing the display of a reconstructed 3D human head in 3D software according to an embodiment of the present invention.
[0043] FIG. 5( b ) is a schematic diagram of the front display in 3D software after adding a texture map to a 3D human head according to an embodiment of the present invention.
[0044] FIG. 5( c ) is a schematic diagram showing the back side of a 3D human head displayed in 3D software after adding a texture map according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following examples are only used to more clearly illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. For example, certain words are used in the specification and claims to refer to specific components. Those skilled in the art should understand that hardware or software manufacturers may use different nouns to refer to the same component. This specification and claims do not use the difference in name as a way to distinguish components, but use the difference in function of the components as the criterion for distinction. The subsequent description of the specification is a preferred embodiment of the present invention, but the description is for the purpose of illustrating the general principles of the present invention, and is not intended to limit the scope of the present invention. The scope of protection of the present invention shall be determined by the definition of the attached claims.
[0046] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] Reference Figure 1 As shown, an embodiment of the present invention provides a method for mapping a head model, the method comprising the following steps:
[0048] Step S1: collect image information of different areas of the human head respectively, including structured light images and texture images, and then stitch them together to obtain a complete head point cloud.
[0049] Specifically, a head modeler can be used to collect the top area, front face area, back of the head area, left area and right area of the human head respectively to form five images. By collecting the five areas of the human head, the human head model can be accurately reflected. Among them, the head modeler can adopt the scanning module structure in the patent CN116664796B previously applied for and disclosed by the applicant.
[0050] When the scanned and collected image data is completed, the structured light coded images of the structured light modules at each angle are 3D reconstructed, and the point cloud data obtained after reconstruction are processed and spliced to obtain the final head point cloud. Here, three-dimensional point cloud reconstruction refers to the surface or outline of the target reconstructed based on the three-dimensional point cloud, that is, surface reconstruction. The changes in the structured light images of each area after the structured light is projected can be analyzed. The structured light image here refers to the reflected image obtained by capturing the camera after the stripe wave is projected onto the human head (including the face). It is used to analyze the three-dimensional information of the head, calculate the phase information of each pixel point, and use the phase information to calculate the depth value of each point on the surface of the object to obtain three-dimensional information. The three-dimensional information is denoised, filtered, downsampled, and the like, and the results are simultaneously registered using the ICP registration algorithm, and finally spliced to obtain a complete head point cloud.
[0051] Step S2: triangulate the head point cloud using a Poisson reconstruction method to reconstruct the head surface.
[0052] In order to facilitate the subsequent mesh rendering, the point cloud needs to be triangulated in advance. The 3D mesh is a geometric data structure, usually composed of a bunch of connected triangles, which clearly describe a surface. The Poisson surface reconstruction algorithm combines the advantages of global and local methods. It adopts an implicit fitting method to obtain the implicit equation represented by the surface information described by the point cloud model by solving the Poisson equation. By extracting the isosurface of the equation, a surface model with geometric entity information is obtained, that is, the input is a set of directed point clouds on the surface of the object, and the output is a three-dimensional mesh of the surface of the object. The advantage is that the vertices of the output mesh do not need to come from the original point cloud, the result is smoother, has good geometric surface characteristics and detail characteristics, and due to the global solution, the watertightness of the reconstructed mesh model can be guaranteed.
[0053] Step S3: extract foreground information from the texture image to obtain a foreground Mask image, and perform an erosion operation on the foreground Mask image.
[0054] Specifically, as shown in FIG2, the foreground information of the texture image is detected by using the cutout technology, where, in a captured image, since people are usually close to the camera and the background is far from the camera, the foreground information refers to the part of information close to the camera, usually referring to the portrait information. After the cutout is obtained, the foreground Mask image is obtained, and then the Mask image is corroded to remove the edge interference information. The Mask parameter is a binary image that specifies the initial state of the active contour. The boundary of the object area (white) in the Mask defines the initial contour position of the contour evolution for image segmentation. The output image BW is a binary image with a foreground of white (logical true) and a background of black (logical false). The five images in FIG2(a) are the original acquisition images, and the five images in FIG2(b) are the detected foreground Mask images.
[0055] Step S4: designing and storing a universal background texture map, wherein the designed background texture map includes: a hair texture map and a skin texture map.
[0056] The background hair texture map is shown in Figure 3(a), and the background skin texture map is shown in Figure 3(b). The designed background hair texture map and skin texture map are both in line with the general texture of the general public, real and natural, and convenient for subsequent image fusion processing. The stored background texture map will be used for subsequent fusion.
[0057] Step S5: Combining the foreground information, the foreground Mask image and the background texture map, using image fusion technology to complete the fusion of the background and foreground, and obtain a fused image of each head area.
[0058] Specifically, for different angle areas of the head, a foreground image and a preset background texture map, as well as a corresponding foreground Mask image, are obtained;
[0059] First, color space conversion is performed to convert the foreground image and background texture map from RGB color space to Lab color space. This design helps to separate brightness information and color information, making subsequent processing more accurate.
[0060] Then, applying Gaussian blur processing to the edge of the foreground Mask image to smooth the edge and avoid obvious boundaries in the fused image;
[0061] Finally, as shown in Figure 4(a), the high-brightness areas in the Mask image represent the pixels selected from the first image, and the dark-brightness areas represent the pixels selected from the second image. The foreground image extracted from the first image is merged with the background texture image extracted from the second image. Due to the blurring effect of the Mask edge, the foreground and background will smoothly transition in the edge area, creating a natural fused image.
[0062] Finally, the fused image presents a natural gradient effect of color, brightness and texture features.
[0063] Step S6: Detect the local area in the fused image, and adjust the grayscale value of the fused image to a normal lighting range by using a histogram equalization method and a gamma correction method.
[0064] In addition to ensuring a natural transition of edges, it is also necessary to deal with uneven grayscale or exposure problems that may be caused by inconsistent lighting conditions. This situation is more common when merging images taken at different times or in different environments. In order to achieve a more natural and unified visual effect, this application uses histogram equalization and gamma correction methods to locally adjust the image grayscale, as follows:
[0065] Adjusting the grayscale of an image by a histogram equalization method includes: in order to accurately adjust the local uneven illumination, dividing the fused image into a plurality of small blocks, schematically, dividing the image into a 10x10 grid, analyzing the histogram distribution of each small block, detecting the local histogram area, identifying the area with abnormal grayscale due to illumination difference by analyzing the local histogram of the image, and performing grayscale adjustment on the area, for example, filling in the gap, or increasing or decreasing the brightness of the local area.
[0066] Adjusting the image grayscale by the Gamma correction method includes: Based on the formula: O = A·I γ , where I γ is the input pixel value, O is the output pixel value, γ is the Gamma value, and A is the amplification factor. By adjusting the γ value, the overall brightness of the image can be affected. When γ<1, the image will become brighter, and when γ>1, the image will become darker. For image areas under different lighting conditions, select the appropriate γ value for adjustment. For areas with too much backlight or dark parts, use a γ value less than 1 to increase their brightness, and for overexposed areas, increase the γ value to reduce the brightness.
[0067] During the adjustment process, if some areas have unnatural visual effects due to over-adjustment, you can re-analyze the histogram and lighting conditions of these areas, adjust the gamma value appropriately or re-apply histogram equalization for optimization. Alternatively, use an artificial intelligence model and continuously train it to adaptively adjust and achieve the best image effect.
[0068] Step S7: Combining the camera parameters and the reconstructed head surface, determine the image coordinates corresponding to each point on the surface of the three-dimensional model, map the texture on the image to the three-dimensional model, and perform texture synthesis to obtain a complete map of the head model.
[0069] Specifically, this step includes the following detailed processes:
[0070] S71, obtaining camera parameters, including internal parameters (focal length, optical center, distortion coefficient, etc.) and external parameters (camera position and orientation) of the camera, which are crucial for correctly mapping the image to the three-dimensional model because they determine how each point in the image corresponds to the three-dimensional space;
[0071] S72, obtaining a three-dimensional geometric surface of the head by using a head modeler;
[0072] S73. Use the camera parameters to construct a projection matrix from the three-dimensional space to the two-dimensional image plane. This matrix combines the internal and external parameters of the camera and can convert points in the three-dimensional coordinate system into points on the two-dimensional image plane. Apply the projection matrix to each vertex on the three-dimensional model and calculate its corresponding coordinates on the two-dimensional image. In this way, each point of the three-dimensional model can find a specific position on the image.
[0073] S74, extracting texture information from the multiple images, wherein if a 3D point is visible in multiple images, selecting a texture with the highest image clarity; according to S73, it can be known that the 3D vertices all have corresponding 2D texture coordinates, and these coordinates can be used to extract texture information from the image and apply it to the 3D model, so that the 3D model can have a detailed texture that matches the original image;
[0074] S75. According to the correspondence between the three-dimensional points and the image, multiple different image textures are fused into a continuous and seamless three-dimensional model surface map through the Poisson fusion method. Each point on the above model corresponds to the accurate texture position on the image. According to the correspondence between the three-dimensional points and the image, multiple different image textures are fused into a continuous and seamless three-dimensional model surface map. At this time, Poisson fusion is used to process the boundary transition area of the image texture to maintain a natural transition with the surrounding texture. As shown in Figure 4(b), Figure 4(b) is a synthesized complete head 8k high-resolution map. It can be seen from the figure that it can capture the subtle details of the facial skin, high-definition and realistic maps, which can enhance the visual experience after rendering. In addition, through image fusion, background cutout, pixel smoothing and other technologies, the continuity and detail richness of the hair texture are restored, avoiding the common blur and breakage phenomena in the past, and also solving the texture dislocation problem at the edge position to ensure that the texture is accurate and natural.
[0075] Finally, the mapping of the head model is completed, as shown in Figure 5(a), Figure 5(b), and Figure 5(c). Figure 5(a) is a schematic diagram of the display of the reconstructed 3D human head in the 3D software, Figure 5(b) is a diagram of the display of the 3D human head with texture mapping in the 3D software, that is, the front view, and Figure 5(c) is another view of 5(b), that is, the back view. Since the human head is 3D and can be rotated arbitrarily, the effects of different view angles are shown here. In order to highlight the head model, its background color can be replaced with other colors with a large color difference from the head.
[0076] It is worth noting that the above is only a preferred embodiment of the present invention, and does not limit the scope of patent protection of the present invention. The present invention can also improve the materials and structures of the above-mentioned various parts, or replace them with technical equivalents. Therefore, all equivalent structural changes made by using the description and illustrations of the present invention, or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.
Claims
1. A mapping method for a head model, It is characterized in that The method comprises: Collect image information from different areas of the human head, including structured light images and texture images, and then stitch them together to get a complete head point cloud; Performing triangulated meshing processing on the head point cloud by using a Poisson reconstruction method to reconstruct the head surface; Extracting foreground information from the texture image to obtain a foreground Mask image, and performing an erosion operation on the foreground Mask image; Designing and storing a universal background texture map, wherein the background texture map includes: a hair texture map and a skin texture map; Combining the foreground information, the foreground mask image and the background texture map, using image fusion technology to complete the fusion of the background and foreground, and obtain a fused image of each head area; Detecting a local area in the fused image, and adjusting the grayscale value of the fused image to a normal illumination range by using a histogram equalization method and a gamma correction method; The camera parameters and the reconstructed head surface are combined to determine the image coordinates corresponding to each point on the surface of the three-dimensional model, and the texture on the image is mapped onto the three-dimensional model, and texture synthesis is performed to obtain a complete map of the head model.
2. The head model mapping method according to claim 1, It is characterized in that The obtaining of the fused image of each head region comprises: For different angle areas of the head, a foreground image and a preset background texture map, as well as a corresponding foreground Mask image, are obtained; Converting the foreground image and the background texture map from the RGB color space to the Lab color space; Applying Gaussian blur processing to the edge of the foreground Mask image; The high-brightness area in the Mask image represents the pixels of the first image, and the dark-brightness area represents the pixels of the second image. The foreground image extracted from the first image is merged with the background texture image extracted from the second image.
3. The head model mapping method according to claim 1 or 2, It is characterized in that Adjusting the image grayscale by the histogram equalization method includes: dividing the fused image into a plurality of small blocks, analyzing the histogram distribution of each small block, detecting the local histogram area, identifying the area with abnormal grayscale due to illumination difference, and performing grayscale adjustment on the area.
4. The head model mapping method according to claim 1 or 2, It is characterized in that The gamma correction method for adjusting the grayscale of an image includes: based on the formula: O = A·I γ , where I γ is the input pixel value, O is the output pixel value, γ is the Gamma value, and A is the amplification factor. By adjusting the γ value, the overall brightness of the image is affected. When γ<1, the image will become brighter, and when γ>1, the image will become darker. For areas with too much backlight or dark parts, use a γ value less than 1 to increase their brightness, and for overexposed areas, increase the γ value to reduce the brightness.
5. The head model mapping method according to claim 2, It is characterized in that The stitching to obtain a complete head point cloud includes: analyzing image changes after the human head is projected with structured light, calculating phase information of each pixel, using the phase information to calculate the depth value of each point on the surface of the object to obtain three-dimensional information, and denoising, aligning, and stitching the three-dimensional information to obtain a complete point cloud.
6. The head model mapping method according to claim 1, It is characterized in that The complete texture of the head model is obtained by: Get camera parameters, including internal and external parameters of the camera; The three-dimensional geometric surface of the head is obtained by a head modeler; Using the camera parameters, a projection matrix is constructed from the 3D space to the 2D image plane, so that each point of the 3D model can find its specific position on the image. Extracting texture information from multiple images, wherein if a 3D point is visible in multiple images, the texture with the highest image clarity is selected; According to the correspondence between 3D points and images, multiple different image textures are fused into a continuous and seamless 3D model surface map through the Poisson fusion method.
7. The head model mapping method according to claim 1, It is characterized in that The different areas of the human head are collected: using head modeling, the top area, front face area, back area, left area and right area of the human head are collected respectively.
Citation Information
Cited By
Human head three-dimensional reconstruction method and system based on semantic separation and PBR material prior
CN121616758A
Head three-dimensional reconstruction method and system based on semantic separation and PBR material prior
CN121616758B
