Texture mapping method and apparatus, and electronic device and storage medium

By combining the three-dimensional grid model and the three-dimensional point cloud model, accurately positioning the target area of ​​the face to be mapped, and selecting the most suitable texture image for mapping, the problem of texture map errors in the existing texture mapping methods is solved, and the authenticity and visual effect of the three-dimensional model are improved.

WO2025092906A1PCT designated stage expired Publication Date: 2025-05-08BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Application Number
PCT/CN2024/128895
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-31
Filing Date
2024-10-31
Publication Date
2025-05-08

AI Technical Summary

Technical Problem

When selecting images, it is difficult to accurately match the patch to be mapped, resulting in texture map errors and affecting the authenticity of the three-dimensional model.

Method used

By obtaining the three-dimensional grid model and the three-dimensional point cloud model, determine the target area of ​​the face to be mapped, and select the most suitable texture image from the sample image for mapping based on the camera pose of the point cloud in the target area.

Benefits of technology

Improves the accuracy of texture mapping, reduces map errors, and enhances the authenticity and visual effects of the three-dimensional model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024128895_08052025_PF_FP_ABST
    Figure CN2024128895_08052025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present disclosure are a texture mapping method and apparatus, and an electronic device and a storage medium. The method comprises: acquiring a three-dimensional grid model, a three-dimensional point cloud model, sample images, and camera poses corresponding to the sample images, wherein the sample images and the camera poses corresponding to the sample images are used for constructing the three-dimensional grid model and the three-dimensional point cloud model; on the basis of position information of a patch to be mapped in the three-dimensional grid model, determining a corresponding target area in the three-dimensional point cloud model; on the basis of a camera pose corresponding to a point cloud in the target area, determining a first texture image from among the sample images; and on the basis of the first texture image, performing texture mapping on said patch.
Need to check novelty before this filing date? Find Prior Art

Description

Texture mapping method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese invention patent application with application number 202311436343.8 filed on October 31, 2023 and titled “A texture mapping method, device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a texture mapping method, device, electronic device, and storage medium. Background Art

[0003] Texture mapping (also known as texture mapping) allows you to select a suitable image (view) for each face of a 3D mesh model as the corresponding area for texture mapping. The choice of image significantly influences the quality of texture mapping, and selecting the optimal image is a pressing technical challenge.

[0004] Summary of the Invention

[0005] Embodiments of the present disclosure provide a texture mapping method, device, electronic device, and storage medium.

[0006] In a first aspect, an embodiment of the present disclosure provides a texture mapping method, comprising: obtaining a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image; wherein each sample image and the camera pose corresponding to each sample image are used to construct the three-dimensional mesh model and the three-dimensional point cloud model; determining the corresponding target area in the three-dimensional point cloud model based on the position information of the surface patch to be mapped in the three-dimensional mesh model; determining a first texture image from each sample image based on the camera pose corresponding to the point cloud in the target area; and performing texture mapping on the surface patch to be mapped based on the first texture image.

[0007] In the second aspect, the embodiments of the present disclosure also provide a texture mapping device, including: a data acquisition module, used to acquire a three-dimensional mesh model, a three-dimensional point cloud model, each sample image and the camera pose corresponding to each sample image; wherein, each sample image and the camera pose corresponding to each sample image are used to construct the three-dimensional mesh model and the three-dimensional point cloud model; a point cloud area determination module, used to determine the corresponding target area in the three-dimensional point cloud model according to the position information of the surface to be mapped in the three-dimensional mesh model; an image determination module, used to determine a first texture image from each sample image according to the camera pose corresponding to the point cloud in the target area; a texture mapping module, used to perform texture mapping on the surface to be mapped according to the first texture image.

[0008] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the texture mapping method as described in any one of the embodiments of the present disclosure.

[0009] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the texture mapping method as described in any one of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0011] FIG1 is a schematic diagram of a flow chart of a texture mapping method provided by an embodiment of the present disclosure;

[0012] FIG2 is a block diagram of a texture mapping method provided by an embodiment of the present disclosure;

[0013] FIG3 is a schematic diagram of a flow chart of a texture mapping method provided by an embodiment of the present disclosure;

[0014] FIG4 is a schematic diagram of a flow chart of a texture mapping method provided by an embodiment of the present disclosure;

[0015] FIG5 is a schematic diagram of pixel value comparison in a texture mapping method provided by an embodiment of the present disclosure;

[0016] FIG6 is a schematic diagram of a flow chart of a texture mapping method provided by an embodiment of the present disclosure;

[0017] FIG7 is a schematic diagram of a wall map provided by an embodiment of the present disclosure;

[0018] FIG8 is a schematic diagram of a textured hole provided by an embodiment of the present disclosure;

[0019] FIG9 is a schematic diagram of filling holes and gaps in a texture mapping method provided by an embodiment of the present disclosure;

[0020] FIG10 is a schematic diagram of Gaussian blur in a texture mapping method provided by an embodiment of the present disclosure;

[0021] FIG11 is a schematic structural diagram of a texture mapping device provided by an embodiment of the present disclosure;

[0022] FIG12 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0025] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0026] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0027] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0028] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions. In addition, during the collection and use of data, the user's personal information will not be collected or processed in a manner that does not reveal the user's identity.

[0029] Figure 1 is a schematic flow diagram of a texture mapping method provided by an embodiment of the present disclosure. This embodiment of the present disclosure is applicable to texture mapping scenarios. The method can be performed by a texture mapping device, which can be implemented in software and / or hardware and can be configured in an electronic device, such as a computer.

[0030] As shown in FIG1 , the texture mapping method provided in this embodiment may include steps S110 , S120 , S130 , and S140 .

[0031] S110 , obtaining a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image.

[0032] In the disclosed embodiments, each sample image and the camera pose corresponding to each sample image are used to construct a 3D mesh model and a 3D point cloud model. In some embodiments, the 3D mesh model can be considered a mesh model requiring texture mapping. The 3D point cloud model may include a dense point cloud model. Because the 3D mesh model and the 3D point cloud model are constructed based on the same sample images, the 3D mesh model and the 3D point cloud model have a corresponding relationship in size and shape.

[0033] In some embodiments, the camera pose corresponding to each sample image can be considered as the camera extrinsic parameters corresponding to each sample image (i.e., the rotation parameters and translation parameters of the camera). Existing pose solution methods, such as the Structure from Motion (SfM) method, can be used to determine the camera pose corresponding to each sample image. The camera intrinsic parameters may include the camera focal length, principal point coordinates, and distortion parameters, etc. The camera intrinsic parameters of each sample image can be considered to be the same and known. Based on the camera pose and camera intrinsic parameters, the pixel coordinates in each sample image can be projected into the world coordinate system to obtain the sparse point cloud data corresponding to each sample image.

[0034] After obtaining the sparse point cloud data, a three-dimensional mesh model and a three-dimensional point cloud model may be constructed, and the steps of constructing the two models may include, for example, the following steps.

[0035] On the one hand, a signed distance field (SDF) model can be constructed using the world coordinates of sparse point cloud data. In some embodiments, a signed distance field model is a method for representing three-dimensional spatial geometric information. For a point in space, a signed distance value is defined. The positive / negative sign of the signed distance value can indicate whether the point is inside or outside the three-dimensional model, and the distance value can represent the distance from the point to the nearest edge point of the three-dimensional model. The surface of the three-dimensional model can be determined based on the portion of the signed distance value output by the constructed signed distance field model where the signed distance value is zero, thereby determining the three-dimensional model in space. Furthermore, the three-dimensional model can be converted into a three-dimensional mesh model based on existing mesh model conversion methods.

[0036] On the other hand, the depth image can be estimated based on the camera pose, camera intrinsic parameters, sparse point cloud and sample image through the Multiple View Stereo (MVS) algorithm, and then the depth image can be fused and reconstructed to obtain a dense point cloud model.

[0037] In addition, other methods of constructing three-dimensional mesh models and three-dimensional point cloud models can also be applied here, and are not specifically limited here.

[0038] For example, FIG2 is a block diagram of a texture mapping method provided by an embodiment of the present disclosure. Referring to FIG2 , for an object A (a rectangular parallelepiped is used as an example in FIG2 ) that needs to be three-dimensionally reconstructed, sample images of different perspectives can be collected by an image acquisition device. Each sample image and the camera pose corresponding to each sample image can be used to construct a three-dimensional mesh model and a three-dimensional point cloud model of object A. In some embodiments, the three-dimensional mesh model and the three-dimensional point cloud model have a corresponding relationship in size and shape.

[0039] S120 : Determine a corresponding target area in the three-dimensional point cloud model according to the position information of the to-be-mapped facets in the three-dimensional mesh model.

[0040] In the disclosed embodiments, texture mapping is required for each facet (typically a triangular facet) in a 3D mesh model to ensure the authenticity of the reconstructed 3D model. In some embodiments, the facet to be mapped can be considered to be the facet currently requiring texture mapping. Facets in the 3D mesh model can be selected sequentially as the facets to be mapped, or the facets to be mapped can be determined based on other methods, which are not specifically limited here.

[0041] In some embodiments, the position information of the to-be-mapped patch may include the relative position information of the to-be-mapped patch in the 3D mesh model. Since the 3D mesh model and the 3D point cloud model have a corresponding relationship, the target area corresponding to the position information can be determined from the 3D point cloud model based on the position information of the to-be-mapped patch.

[0042] In some embodiments, the process of determining the target area may include, for example, counting parameters such as the side length or circumscribed circle radius of each facet in the three-dimensional mesh model, and determining a radius value based on the statistical parameters (for example, using the mean of the circumscribed circle radius as the radius value, etc.). Based on the center position of the facet to be mapped, the center point of the target area in the three-dimensional point cloud model is determined. The corresponding spherical area in the three-dimensional point cloud model can be determined with the center point as the center and the radius value as the radius, and the spherical area can be used as the target area.

[0043] S130 : Determine a first texture image from each sample image according to the camera pose corresponding to the point cloud in the target area.

[0044] During the construction of the three-dimensional point cloud model, it is possible to determine whether each point is visible under the camera pose corresponding to each sample image. The information on whether it is visible can be referred to as the visibility information of the point. In the embodiment of the present disclosure, after determining the target area in the three-dimensional point cloud model, the visibility information of each point in the target area can be viewed. In addition, the camera pose corresponding to the sample image in which each point in the target area is visible can be used as the camera pose corresponding to the point cloud in the target area. Alternatively, the camera pose corresponding to the sample image in which the proportion of visible points in the target area reaches a threshold condition can be used as the camera pose corresponding to the point cloud in the target area. Thus, the sample image corresponding to the camera pose can be used as the first texture image.

[0045] In traditional texture mapping, texture image selection is typically performed based on the normal information of the patch to be mapped, determining whether it is visible under the corresponding camera pose of each sample image. As the final step in the 3D reconstruction chain, texture mapping is often affected by errors introduced in previous steps (such as pose errors and errors in the construction of the 3D mesh model) as well as occlusion relationships between foreground and background objects. This results in low accuracy of texture images determined based on patch normal information, leading to numerous mapping errors where foreground object textures are mapped onto background objects, seriously affecting the realism of the 3D model.

[0046] In the embodiment of the present disclosure, based on the visibility information of each point in the target area corresponding to the facet in the three-dimensional point cloud model, a more accurate first texture image that can completely capture the facet to be mapped can be selected, and the sample images that do not completely capture the facet to be mapped can be screened out. This can avoid the problem of mapping errors to a certain extent and is conducive to improving the texture mapping effect.

[0047] S140: Perform texture mapping on the surface to be mapped according to the first texture image.

[0048] In some embodiments, texture mapping may be performed on the surface to be mapped based on the texture of the area corresponding to the surface to be mapped in the first texture image, based on an existing texture mapping method.

[0049] In the disclosed embodiment, a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image are obtained; wherein each sample image and the camera pose corresponding to each sample image are used to construct a three-dimensional mesh model and a three-dimensional point cloud model; based on the position information of the to-be-mapped facets in the three-dimensional mesh model, the corresponding target area in the three-dimensional point cloud model is determined; based on the camera pose corresponding to the point cloud in the target area, a first texture image is determined from each sample image; and based on the first texture image, texture mapping is performed on the to-be-mapped facets.

[0050] During the construction of the three-dimensional point cloud model, it is possible to determine whether each point is visible under each camera pose, and the information on whether it is visible can be called the visibility information of the point. By combining the visibility information of the point cloud in the area corresponding to the patch in the three-dimensional point cloud model during the patch mapping process, a texture image under a better camera pose can be selected from the sample image. Compared with the existing method of determining the texture image under the corresponding camera pose based on the normal information of the patch, the technical solution of the embodiment of the present disclosure can determine the texture image under the corresponding camera pose based on the visibility information of the point cloud, which can make the texture image selection more accurate. Furthermore, texture mapping is performed based on the texture image under the selected better camera pose, which can improve the texture mapping effect.

[0051] The various optional solutions in the texture mapping method provided in the disclosed embodiments can be combined with those in the above embodiments. The texture mapping method provided in this embodiment provides a detailed description of the process for selecting a superior texture image. By combining the strong and weak texture information provided by the dense point cloud to select the superior texture image, the problem of mapping errors can be further reduced.

[0052] Figure 3 is a flow chart of a texture mapping method provided by an embodiment of the present disclosure. As shown in Figure 3, the texture mapping method provided by this embodiment may include steps S310, S320, S331, S332, S340, and S350.

[0053] S310: Acquire a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image.

[0054] In this embodiment, each sample image and the camera pose corresponding to each sample image are used to construct a three-dimensional mesh model and a three-dimensional point cloud model.

[0055] S320: Determine a corresponding target area in the three-dimensional point cloud model according to the position information of the to-be-mapped facets in the three-dimensional mesh model.

[0056] S331 : Determine a first texture image from each sample image according to the camera pose corresponding to the point cloud in the target area.

[0057] S332. Set image selection indicators according to the number of point clouds in the target area.

[0058] In some embodiments, the number of point clouds within the target area can be used as a criterion for measuring the texture strength of the to-be-mapped patch. When the number of point clouds is large, the texture corresponding to the to-be-mapped patch is considered richer, and the patch can be considered to have a strong texture. Conversely, when the number of point clouds is small, the texture corresponding to the to-be-mapped patch is considered simpler, and the patch can be considered to have a weak texture.

[0059] In some embodiments, the texture mapping process can be modeled based on a mathematical model of a Markov random field, and an objective function can be set for the mathematical model of the Markov random field. The objective function can include a data term and a smoothing term, wherein the data term can be used to evaluate the quality of the texture image, and the smoothing term can be used to determine the continuity of the texture after mapping. In the disclosed embodiments, the image selection metric can include the data term in the objective function of the Markov random field.

[0060] In some embodiments, different image selection indicators can be set based on the number of point clouds within the target area. That is, different texture image selection strategies can be set for strong texture patches and weak texture patches to obtain texture images with better effects. For example, for strong texture patches, an indicator can be set based on the texture clarity of the area where the patch to be mapped is projected into the sample image, so as to select an image with a clear texture for mapping. For weak texture patches, an indicator can be set based on the area where the patch to be mapped is projected into the sample image, so as to select an image with the most coverage for mapping. In this way, the selected texture image can be made more accurate, and the problem of mapping errors can be further reduced.

[0061] In some optional implementations, the image selection index items are set according to the number of point clouds in the target area, which may include: when the number of point clouds in the target area is greater than or equal to a preset threshold, the texture gradient integral of the projection area is used as the index item; wherein the projection area includes the area after the surface to be mapped is projected onto the first texture image; when the number of point clouds in the target area is less than a preset threshold, the area of ​​the projection area is used as the index item.

[0062] In some embodiments, the preset threshold value can be set according to an experimental value or an empirical value, for example, it can be set to 20.

[0063] When the number of points in the point cloud within the target area is greater than or equal to 20, the patch to be mapped can be considered a strongly textured patch. In this case, the texture gradient integral of the area after the patch to be mapped is projected onto each first texture image can be used as an indicator. In some embodiments, a larger texture gradient integral indicates both higher texture clarity and a larger projection area. The first texture image with the larger texture gradient integral value can be selected as the second texture image for the patch to be mapped.

[0064] If the number of points in the point cloud within the target area is less than 20, the patch to be mapped can be considered a weakly textured patch. In this case, the area of ​​the area after the patch to be mapped is projected onto each first texture image can be used as an indicator. In some embodiments, a larger area indicates that the first texture image covers more of the patch to be mapped, resulting in clearer texture details. The first texture image with the larger area value can be selected as the second texture image for the patch to be mapped.

[0065] In these optional implementations, by setting the texture gradient integral as an indicator item for a strong texture region and setting the area as an indicator item for a weak texture region, selection of a better texture image can be achieved.

[0066] S340: Determine a second texture image from the first texture image based on the set index item.

[0067] In this embodiment, a second texture image with better image quality may be selected from each first texture image according to the numerical value of the indicator item.

[0068] S350: Perform texture mapping on the surface to be mapped according to the second texture image.

[0069] The technical solution of the embodiment of the present disclosure describes in detail the process of selecting a superior texture image. By combining the strong and weak texture information provided by the dense point cloud to select the superior texture image, the problem of mapping errors can be further reduced. The texture mapping method provided in the embodiment of the present disclosure and the texture mapping method provided in the above embodiment belong to the same disclosed concept. Technical details not fully described in this embodiment can be referred to the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.

[0070] The various optional solutions in the texture mapping method provided in the embodiments of this disclosure can be combined with the above embodiments. The texture mapping method provided in this embodiment describes in detail the process of selecting a better texture image. By combining the texture atlas rendered by the neural radiation field model to filter out the first texture image with inconsistent pixel colors, the problem of mapping errors can be further reduced.

[0071] Figure 4 is a flow chart of a texture mapping method provided by an embodiment of the present disclosure. As shown in Figure 4, the texture mapping method provided by this embodiment may include steps S410, S420, S430, S440, and S450.

[0072] S410: Acquire a texture atlas, a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image.

[0073] In this embodiment, each sample image and the camera pose corresponding to each sample image are used to construct a three-dimensional mesh model and a three-dimensional point cloud model.

[0074] In some embodiments, the texture atlas is rendered based on each sample image using a neural radiance field model.

[0075] In some embodiments, the Neural Radiance Fields (NeRF) model is a computer vision technology that uses deep learning to extract the collective shape and texture information of objects from images from multiple perspectives, and then uses this information to generate a continuous three-dimensional radiation field, thereby presenting highly realistic three-dimensional models / scenes at any angle and distance. The rendering process of the texture atlas can include: rendering the color (i.e., pixel value) of the three-dimensional model at each perspective through the NeRF model; filling the color into the corresponding pixel position in the two-dimensional image; and the two-dimensional image with the filled pixels can be called a texture atlas.

[0076] S420: Determine a corresponding target area in the three-dimensional point cloud model according to the position information of the to-be-mapped face in the three-dimensional mesh model.

[0077] S430 : Determine a first texture image from each sample image according to the camera pose corresponding to the point cloud in the target area.

[0078] S440 , determining a third texture image from the first texture image according to the pixel value of each pixel in the projection area and the pixel value of each pixel in the corresponding area in the texture atlas.

[0079] In some embodiments, the projection area includes an area after the to-be-mapped patch is projected onto the first texture image.

[0080] In this embodiment, the pixel values ​​within the area after the to-be-mapped patch is projected onto the first texture image can be compared one by one with the pixel values ​​of each pixel in the corresponding area of ​​the to-be-mapped patch in the texture atlas. The first texture image with consistent comparison results can then be used as the third texture image, and first texture images with inconsistent colors can be filtered out. In some embodiments, a consistent comparison result can include the percentage of pixels with identical pixel values ​​reaching a preset percentage. By selecting third texture images with highly consistent comparison results, the accuracy of the selected texture image can be improved, thereby enhancing the texture mapping effect.

[0081] For example, FIG5 is a schematic diagram of pixel value comparison in a texture mapping method provided by an embodiment of the present disclosure. Referring to FIG5 , the surface to be mapped may be a surface of a sofa backrest. The pixel values ​​within the projection area after the surface to be mapped is projected onto the first texture image can be compared one by one with the pixel values ​​of each pixel in the corresponding area of ​​the surface to be mapped in the texture atlas, thereby filtering out first texture images with inconsistent pixel values. For example, by filtering out first texture images where the number of pixels with the same pixel value does not reach a predetermined percentage, mapping errors can be avoided to a certain extent.

[0082] S450: Perform texture mapping on the surface to be mapped according to the third texture image.

[0083] The technical solution of the embodiment of the present disclosure describes in detail the process of selecting a better texture image. By combining the texture atlas rendered by the neural radiation field model to screen out the first texture image with inconsistent pixel colors, the problem of mapping errors can be further reduced. The texture mapping method provided in the embodiment of the present disclosure and the texture mapping method provided in the above embodiment belong to the same public concept. The technical details not fully described in this embodiment can be found in the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.

[0084] The various optional solutions in the texture mapping method provided in the embodiments disclosed herein can be combined with those in the above embodiments. The texture mapping method provided in this embodiment provides a detailed description of the texture mapping process when a 3D mesh model includes a target plane. By mapping the facets within the target plane in the 3D mesh model as a whole, misalignment issues can be reduced, resulting in a more compact overall texture.

[0085] Figure 6 is a flow chart of a texture mapping method provided by an embodiment of the present disclosure. As shown in Figure 6, the texture mapping method provided by this embodiment may include steps S610, S620, S630, S640, S650, and S660.

[0086] S610: Acquire a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image.

[0087] In this embodiment, each sample image and the camera pose corresponding to each sample image are used to construct a three-dimensional mesh model and a three-dimensional point cloud model.

[0088] S620: Determine a target plane in the three-dimensional mesh model according to normal information of each facet in the three-dimensional mesh model.

[0089] In this embodiment, the target plane in the 3D mesh model can be determined using the normal information of each facet in the 3D mesh model. In some embodiments, the target plane can include at least two faces that meet the normal information requirements. For example, if the normal information of adjacent faces in the 3D mesh model is consistent, it can be considered that the adjacent faces constitute the target plane.

[0090] S630: Merge the facets in each target plane to obtain a merged facet.

[0091] In this embodiment, the 3D mesh model may include at least one target plane, where each target plane exists independently of the other. For each target plane region, the facets within the target plane may be treated as a whole and merged into a single facet for mapping, which is beneficial for improving texture mapping effects.

[0092] S640: Determine a corresponding target area in the three-dimensional point cloud model according to the position information of the merged facets in the three-dimensional mesh model.

[0093] In this embodiment, the merged patch may be used as a patch to be mapped, and a target area corresponding to the merged patch may be determined in the three-dimensional point cloud model.

[0094] S650 : Determine a first texture image from each sample image according to the camera pose corresponding to the point cloud in the target area.

[0095] S660: Perform texture mapping on the merged patch according to the first texture image.

[0096] For example, Figure 7 is a schematic diagram of wall mapping provided by an embodiment of the present disclosure. Referring to Figure 7 , the target plane in the three-dimensional mesh model can be a wall. Figure 7(a) shows the effect of mapping each facet of the wall individually. This may result in misalignment, which seriously affects the realism of the wall. Figure 7(b) shows the effect of mapping the facets of the wall as a whole, which effectively avoids misalignment and makes the overall texture more compact.

[0097] The technical solution of the embodiment of the present disclosure describes in detail the texture mapping process when the three-dimensional mesh model contains a target plane. By mapping the patches within the target plane in the three-dimensional mesh model as a whole, the problem of mapping misalignment can be reduced, making the overall texture more compact. The texture mapping method provided in the embodiment of the present disclosure and the texture mapping method provided in the above embodiment belong to the same disclosed concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.

[0098] The various optional solutions in the texture mapping method provided in the embodiment of the present disclosure and the above embodiment can be combined. The texture mapping method provided in this embodiment provides a detailed description of texture hole filling when the three-dimensional model after texture mapping contains texture holes. By removing small texture areas within the texture holes, it can support the repair of more texture holes. By performing a reverse Gaussian blur from the outside to the inside before texture hole filling, it is helpful to avoid the occurrence of gaps after hole filling.

[0099] FIG8 is a schematic diagram of texture holes provided by an embodiment of the present disclosure. As shown in FIG8 , when the sample image cannot completely cover the surface of the object to be three-dimensionally reconstructed, there will be areas of unmapped texture in the three-dimensional mesh model after texture mapping, and these areas can be called texture holes. In some embodiments, the unmapped texture areas can be filled with reasonable colors based on existing texture hole filling algorithms. However, existing texture hole filling algorithms have high requirements for the regional topological structure of texture holes. For example, there cannot be textured patches inside the texture holes (the patches in the box in FIG8 belong to the textured patches inside the texture holes), which results in many texture holes being unable to be filled.

[0100] The texture mapping method provided in this embodiment can determine the target surface that has been texture mapped inside the texture hole when there are texture holes in the three-dimensional mesh model after texture mapping; after removing the texture of the target surface, the texture hole is filled.

[0101] In some embodiments, existing image processing methods, such as a breadth-first search (BFS) algorithm, can be used to scan for target patches within texture holes that have already been texture-mapped. Furthermore, the texture within the target patches can be removed to adjust the topology of the texture holes. Furthermore, texture hole patching can be performed based on existing texture hole patching algorithms, thereby supporting the patching of a wider range of texture holes.

[0102] The operating principle of texture hole filling may include: expanding the texture hole onto a two-dimensional image based on an existing image expansion method (such as UV expansion), and intersecting the expanded shape with the pixels of the two-dimensional image to obtain the texture hole edge (usually a circular edge). Since this is a pixel-level processing, there is usually an error of 1 to 2 pixels, which results in points originally inside the texture hole being divided outside the texture hole, and points originally outside the texture hole being divided inside the texture hole. In this case, after texture hole filling, there will usually be a hole filling gap.

[0103] For example, Figure 9 is a schematic diagram of a hole-filling method in a texture mapping method provided by an embodiment of the present disclosure. Referring to Figure 9 , the texture hole-filling algorithm is affected by pixel-level errors, resulting in poor edge continuity after the texture hole-filling process, and gaps at the edges of the texture hole-filling process.

[0104] In some optional implementations, after removing the texture of the target patch and before performing the hole filling process, the process may further include: performing Gaussian blurring on the texture holes from the outside in. In these optional implementations, before filling the holes, a preset number of inverse Gaussian blurring from the outside in can be performed on the texture holes. The preset number of inverse Gaussian blurring can be set based on empirical or experimental values. By performing multiple inverse Gaussian blurring processes, pixel values ​​can be set for points that were originally inside the texture holes but are now classified as outside the texture holes, which can largely resolve the edge gap problem after texture hole filling.

[0105] Furthermore, after patching, you can use a forward Gaussian blur from the inside out to process the edges of the texture holes, setting appropriate pixel values ​​for points that were originally outside the texture hole but now fall within it. By performing a reverse Gaussian blur before patching and a forward Gaussian blur after, the final texture patching result is free of visible texture seams, achieving excellent patching results.

[0106] For example, Figure 10 illustrates a Gaussian blur method used in a texture mapping method according to an embodiment of the present disclosure. Referring to Figure 10 , the annular area shows the effect of a preset number of inverse Gaussian blurs before patching the texture holes, while the central blurred area shows the effect of patching the holes using the existing Poisson editing method. By performing multiple inverse Gaussian blurs before patching the holes, the problem of edge gaps after patching the texture holes can be largely resolved.

[0107] The technical solution of the embodiment of the present disclosure provides a detailed description of texture hole filling when the three-dimensional model after texture mapping contains texture holes. By removing small texture areas within the texture holes, it is possible to support the repair of more texture holes. By performing reverse Gaussian blurring from the outside to the inside before texture hole filling, it is helpful to avoid the presence of gaps after hole filling. The texture mapping method provided by the embodiment of the present disclosure and the texture mapping method provided by the above embodiment belong to the same disclosed concept. The technical details not fully described in this embodiment can be found in the above embodiment, and the same technical features have the same beneficial effects in this embodiment and the above embodiment.

[0108] Figure 11 is a schematic diagram of the structure of a texture mapping device provided by an embodiment of the present disclosure. The texture mapping device provided by this embodiment is suitable for texture mapping situations.

[0109] As shown in Figure 11, the texture mapping device provided by the embodiment of the present disclosure may include: a data acquisition module 1101, used to acquire a three-dimensional mesh model, a three-dimensional point cloud model, each sample image and a camera pose corresponding to each sample image; wherein each sample image and the camera pose corresponding to each sample image are used to construct a three-dimensional mesh model and a three-dimensional point cloud model; a point cloud area determination module 1102, used to determine the corresponding target area in the three-dimensional point cloud model based on the position information of the to-be-mapped surface in the three-dimensional mesh model; an image determination module 1103, used to determine a first texture image from each sample image based on the camera pose corresponding to the point cloud in the target area; a texture mapping module 1104, used to perform texture mapping on the to-be-mapped surface based on the first texture image.

[0110] In some optional implementations, the image determination module can also be used to: after determining the corresponding target area in the three-dimensional point cloud model, set the image selection index item according to the number of point clouds in the target area; based on the set index item, determine the second texture image from the first texture image; accordingly, the texture mapping module can be used to perform texture mapping on the to-be-mapped surface according to the second texture image.

[0111] In some optional implementations, the image determination module can also be used to: when the number of point clouds in the target area is greater than or equal to a preset threshold, use the texture gradient integral of the projection area as an indicator item; wherein the projection area includes the area after the surface to be mapped is projected onto the first texture image; when the number of point clouds in the target area is less than a preset threshold, use the area of ​​the projection area as an indicator item.

[0112] In some optional implementations, the image determination module can also be used to: obtain a texture atlas; wherein the texture atlas is rendered based on each sample image through a neural radiation field model; determine a third texture image from the first texture image based on the pixel value of each pixel in the projection area and the pixel value of each pixel in the corresponding area in the texture atlas; wherein the projection area includes the area after the surface to be mapped is projected onto the first texture image; accordingly, the texture mapping module can be used to perform texture mapping on the surface to be mapped based on the third texture image.

[0113] In some optional implementations, the texture mapping device may also include: a patch merging module, used to determine the target plane in the three-dimensional mesh model based on the normal information of each patch in the three-dimensional mesh model; merge the patches in each target plane to obtain a merged patch; accordingly, the point cloud area determination module can be used to: determine the corresponding target area in the three-dimensional point cloud model based on the position information of the merged patches in the three-dimensional mesh model.

[0114] In some optional implementations, the texture mapping device may also include: a hole filling module for determining the target surface that has been texture mapped inside the texture hole when there are texture holes in the three-dimensional mesh model after texture mapping; and filling the texture hole after removing the texture of the target surface.

[0115] In some optional implementations, after removing the texture of the target patch and before performing the hole filling process, the hole filling module may also be used to perform Gaussian blurring from the outside to the inside on the texture holes.

[0116] The texture mapping device provided in the embodiments of the present disclosure can execute the texture mapping method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0117] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as they can achieve the corresponding functions. In addition, the specific names of the functional units are only for the convenience of distinguishing each other and are not used to limit the scope of protection of the embodiments of the present disclosure.

[0118] Reference is now made to FIG12, which illustrates a schematic diagram of the structure of an electronic device (e.g., a terminal device or server in FIG12) 1200 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG12 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0119] As shown in FIG12 , the electronic device 1200 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage device 1208 into a random access memory (RAM) 1203. Various programs and data required for the operation of the electronic device 1200 are also stored in the RAM 1203. The processing device 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0120] Typically, the following devices may be connected to the I / O interface 1205: an input device 1206 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1209. The communication device 1209 may allow the electronic device 1200 to communicate with other devices wirelessly or by wire to exchange data. Although FIG12 illustrates the electronic device 1200 with various devices, it should be understood that not all of the illustrated devices are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0121] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1209, or installed from the storage device 1208, or installed from the ROM 1202. When the computer program is executed by the processing device 1201, the above-mentioned functions defined in the texture mapping method of the embodiment of the present disclosure are performed.

[0122] The electronic device provided by the embodiment of the present disclosure and the texture mapping method provided by the above embodiment belong to the same disclosed concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0123] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the texture mapping method provided in the above embodiment is implemented.

[0124] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory (FLASH), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0125] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0126] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0127] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is caused to: obtain a three-dimensional mesh model, a three-dimensional point cloud model, each sample image and a camera pose corresponding to each sample image; wherein each sample image and the camera pose corresponding to each sample image are used to construct a three-dimensional mesh model and a three-dimensional point cloud model; determine the corresponding target area in the three-dimensional point cloud model based on the position information of the to-be-mapped surface in the three-dimensional mesh model; determine a first texture image from each sample image based on the camera pose corresponding to the point cloud in the target area; and perform texture mapping on the to-be-mapped surface based on the first texture image.

[0128] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0130] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the names of the units and modules do not, in certain circumstances, limit the units and modules themselves.

[0131] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and the like.

[0132] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0133] According to one or more embodiments of the present disclosure, a texture mapping method is provided, which includes: obtaining a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image; wherein each sample image and the camera pose corresponding to each sample image are used to construct the three-dimensional mesh model and the three-dimensional point cloud model; determining the corresponding target area in the three-dimensional point cloud model based on the position information of the to-be-mapped surface in the three-dimensional mesh model; determining a first texture image from each sample image based on the camera pose corresponding to the point cloud in the target area; and performing texture mapping on the to-be-mapped surface based on the first texture image.

[0134] According to one or more embodiments of the present disclosure, a texture mapping method is provided, which also includes: in some optional implementations, after determining the corresponding target area in the three-dimensional point cloud model, it also includes: setting an image selection index item according to the number of point clouds in the target area; accordingly, texture mapping the to-be-mapped surface according to the first texture image includes: determining a second texture image from the first texture image based on the set index item; and texture mapping the to-be-mapped surface according to the second texture image.

[0135] According to one or more embodiments of the present disclosure, a texture mapping method is provided, which also includes: in some optional implementations, setting an index item for image selection based on the number of point clouds in the target area, including: when the number of point clouds in the target area is greater than or equal to a preset threshold, using the texture gradient integral of the projection area as the index item; wherein the projection area includes the area after the surface to be mapped is projected onto the first texture image; when the number of point clouds in the target area is less than the preset threshold, using the area of ​​the projection area as the index item.

[0136] According to one or more embodiments of the present disclosure, a texture mapping method is provided, which also includes: in some optional implementations, obtaining a texture atlas; wherein the texture atlas is rendered based on the sample images through a neural radiation field model; accordingly, texture mapping is performed on the surface to be mapped based on the first texture image, including: determining a third texture image from the first texture image based on the pixel value of each pixel in the projection area and the pixel value of each pixel in the corresponding area in the texture atlas; wherein the projection area includes the area after the surface to be mapped is projected onto the first texture image; and texture mapping is performed on the surface to be mapped based on the third texture image.

[0137] According to one or more embodiments of the present disclosure, a texture mapping method is provided, which also includes: in some optional implementations, determining a target plane in the three-dimensional mesh model based on the normal information of each facet in the three-dimensional mesh model; merging the faces in each of the target planes to obtain a merged facet; accordingly, determining a corresponding target area in the three-dimensional point cloud model based on the position information of the facets to be mapped in the three-dimensional mesh model, including: determining the corresponding target area in the three-dimensional point cloud model based on the position information of the merged facets in the three-dimensional mesh model.

[0138] According to one or more embodiments of the present disclosure, a texture mapping method is provided, which also includes: in some optional implementations, when texture holes exist in a three-dimensional mesh model after texture mapping, determining a target surface patch that has been texture mapped inside the texture hole; after removing the texture of the target surface patch, filling the texture hole.

[0139] According to one or more embodiments of the present disclosure, a texture mapping method is provided, which also includes: in some optional implementations, after removing the texture of the target surface and before performing the hole filling process, it also includes: performing Gaussian blur processing on the texture holes from the outside to the inside.

[0140] According to one or more embodiments of the present disclosure, a texture mapping device is provided, which includes: a data acquisition module for acquiring a three-dimensional mesh model, a three-dimensional point cloud model, each sample image and a camera pose corresponding to each sample image; wherein each sample image and the camera pose corresponding to each sample image are used to construct the three-dimensional mesh model and the three-dimensional point cloud model; a point cloud area determination module for determining the corresponding target area in the three-dimensional point cloud model according to the position information of the to-be-mapped surface in the three-dimensional mesh model; an image determination module for determining a first texture image from each sample image according to the camera pose corresponding to the point cloud in the target area; and a texture mapping module for performing texture mapping on the to-be-mapped surface according to the first texture image.

[0141] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0142] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0143] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A texture mapping method, comprising: Acquire a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image; wherein each sample image and the camera pose corresponding to each sample image are used to construct the three-dimensional mesh model and the three-dimensional point cloud model; Determining a corresponding target area in the three-dimensional point cloud model according to position information of the to-be-mapped face in the three-dimensional grid model; Determining a first texture image from each of the sample images according to a camera pose corresponding to a point cloud in the target area; According to the first texture image, texture mapping is performed on the surface to be mapped.

2. The method according to claim 1, wherein: After determining the corresponding target area in the three-dimensional point cloud model, the method further includes: According to the number of point clouds in the target area, an index item for image selection is set; Correspondingly, performing texture mapping on the to-be-mapped surface according to the first texture image includes: Determining a second texture image from the first texture image based on the set indicator item; According to the second texture image, texture mapping is performed on the surface to be mapped.

3. The method according to claim 2, wherein: The step of setting the index item for image selection according to the number of point clouds in the target area includes: When the number of point clouds in the target area is greater than or equal to a preset threshold, the texture gradient integral of the projection area is used as an indicator item; wherein the projection area includes the area after the surface patch to be mapped is projected onto the first texture image; When the number of point clouds in the target area is less than the preset threshold, the area of ​​the projection area is used as an indicator item.

4. The method according to claim 1, wherein: Also includes: Acquire a texture atlas; wherein the texture atlas is rendered based on each sample image through a neural radiation field model; Correspondingly, performing texture mapping on the to-be-mapped surface according to the first texture image includes: Determine a third texture image from the first texture image according to the pixel value of each pixel in the projection area and the pixel value of each pixel in the corresponding area in the texture atlas; wherein the projection area includes the area after the surface patch to be mapped is projected onto the first texture image; According to the third texture image, texture mapping is performed on the surface to be mapped.

5. The method according to claim 1, wherein: Also includes: Determining a target plane in the three-dimensional mesh model according to normal information of each facet in the three-dimensional mesh model; Merging the face patches in each target plane to obtain a merged face patch; Accordingly, according to the position information of the to-be-mapped face in the three-dimensional mesh model, the corresponding target area in the three-dimensional point cloud model is determined, including: According to the position information of the merged facets in the three-dimensional mesh model, the corresponding target area in the three-dimensional point cloud model is determined.

6. The method according to claim 1, wherein: Also includes: In the case where a texture hole exists in the three-dimensional mesh model after texture mapping, determining a target face patch inside the texture hole that has been texture mapped; After removing the texture of the target surface, the texture holes are filled.

7. The method according to claim 6, wherein: After removing the texture of the target patch and before performing the hole filling process, the method further includes: The texture holes are subjected to Gaussian blur processing from outside to inside.

8. A texture mapping device, comprising: A data acquisition module, used to acquire a three-dimensional mesh model, a three-dimensional point cloud model, each sample image, and a camera pose corresponding to each sample image; wherein each sample image and the camera pose corresponding to each sample image are used to construct the three-dimensional mesh model and the three-dimensional point cloud model; A point cloud region determination module, used to determine the corresponding target region in the three-dimensional point cloud model according to the position information of the to-be-mapped face in the three-dimensional grid model; An image determination module, configured to determine a first texture image from each of the sample images according to a camera pose corresponding to a point cloud in the target area; The texture mapping module is used to perform texture mapping on the surface to be mapped according to the first texture image.

9. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the texture mapping method as described in any one of claims 1 to 7.

10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the texture mapping method according to any one of claims 1 to 7 when executed by a computer processor.

Citation Information

Patent Citations

  • Three-dimensional reconstruction method and device and computer readable medium

    CN111127633A

  • Three-dimensional head model reconstruction method, device and terminal

    CN116051722A

  • Dense three-dimensional reconstruction method based on binocular vision structure characteristics

    CN116402978A

  • AU2019201822A1

Cited By

  • Three-dimensional scanning method, scanning device, computing device and nonvolatile storage medium

    CN121616762A