WO2023030163A1 - 三维模型纹理贴图的转换方法、装置、设备以及介质 - Google Patents

三维模型纹理贴图的转换方法、装置、设备以及介质 Download PDF

Info

Publication number
WO2023030163A1
WO2023030163A1 PCT/CN2022/114853 CN2022114853W WO2023030163A1 WO 2023030163 A1 WO2023030163 A1 WO 2023030163A1 CN 2022114853 W CN2022114853 W CN 2022114853W WO 2023030163 A1 WO2023030163 A1 WO 2023030163A1
Authority
WO
WIPO (PCT)
Prior art keywords
coordinates
initial key
texture map
dimensional model
key points
Prior art date
Application number
PCT/CN2022/114853
Other languages
English (en)
French (fr)
Inventor
郭旭峰
张宏龙
Original Assignee
咪咕文化科技有限公司
中国移动通信集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 咪咕文化科技有限公司, 中国移动通信集团有限公司 filed Critical 咪咕文化科技有限公司
Publication of WO2023030163A1 publication Critical patent/WO2023030163A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/08Projecting images onto non-planar surfaces, e.g. geodetic screens
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

Definitions

  • the present invention is based on a Chinese patent application with application number 202111017923.4 and application date of August 31, 2021.
  • the applicants are Migu Culture Technology Co., Ltd. and China Mobile Communications Group Co., Ltd., and the application name is "Conversion method for three-dimensional model texture map” , device, equipment and medium” and claim the priority of this Chinese patent application, the entire content of this Chinese patent application is hereby incorporated by reference in the present invention.
  • the present invention relates to the field of computer technology, and relates to but not limited to a conversion method, device, equipment and computer-readable storage medium of a three-dimensional model texture map.
  • the obtained texture map is usually a summary of a series of taken texture photos, which contains a lot of redundant information and cannot be directly applied.
  • texture map details are easily lost, resulting in inaccurate texture maps of the unfolded 3D model.
  • the present invention provides a conversion method, device, equipment and computer-readable storage medium of a texture map of a three-dimensional model, aiming at solving the problem of how to improve the accuracy of the texture map of an unfolded three-dimensional model.
  • the present invention provides a conversion method of a three-dimensional model texture map, and the conversion method of the three-dimensional model texture map comprises the following steps:
  • the target plane according to the coordinates of a plurality of initial key points in the three-dimensional model, the three-dimensional model is divided into a plurality of patches, and the initial key points are border vertices of the patches;
  • the step of determining the Laplacian coordinates of each of the initial key points on the target plane according to each of the key point sets includes:
  • the projection plane is determined by the sum of the distances from each of the initial key points in the key point set to the projection plane;
  • the Laplacian coordinates of each initial key point on the target plane are determined according to the projection coordinates corresponding to each key point set.
  • the step of determining the Laplacian coordinates of each initial key point on the target plane according to the projected coordinates corresponding to each key point set includes:
  • the Laplacian coordinates are determined from the rotated coordinates on the target plane.
  • the step of determining the Laplacian coordinates according to the rotation coordinates on the target plane includes:
  • the Laplace coordinates of each of the initial key points are determined according to the preset anchor point and the Laplace equation corresponding to each of the key point sets.
  • the step of determining the rotation matrix according to the preset unit vector, the global normal vector and the local normal vector includes:
  • the rotation matrix is determined according to a preset unit vector and the rotation angle.
  • the step of determining the target plane according to the coordinates of a plurality of initial key points in the three-dimensional model includes:
  • the target plane is determined according to the two global basis vectors.
  • the step of determining the global normal vector according to the plurality of initial key point coordinates includes:
  • a singular vector corresponding to the smallest singular value of the target matrix is determined as the global normal vector.
  • the present invention also provides a conversion device for a three-dimensional model texture map, and the conversion device for a three-dimensional model texture map includes:
  • a determining module configured to determine a target plane according to coordinates of a plurality of initial key points in a three-dimensional model, the three-dimensional model being divided into a plurality of patches, and the initial key points being boundary vertices of the patches;
  • An acquisition module configured to acquire a set of key points corresponding to each of the initial key points, where the set of key points corresponding to each of the initial key points includes coordinates of the initial key points and initial keys in the neighborhood of the initial key points point;
  • a calculation module configured to determine the Laplacian coordinates of each of the initial key points on the target plane according to each of the key point sets;
  • the conversion module is configured to insert the texture map corresponding to each of the patches into the target plane according to a preset algorithm and the Laplacian coordinates of each of the initial key points to obtain a two-dimensional texture map.
  • the present invention also provides a conversion device for a three-dimensional model texture map
  • the conversion device for a three-dimensional model texture map includes a memory, a processor, and the conversion of a three-dimensional model texture map stored in the memory and executable on the processor A program, when the conversion program of the 3D model texture map is executed by the processor, each step of the above-mentioned conversion method of the 3D model texture map is implemented.
  • the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores the conversion program of the texture map of the 3D model, and when the conversion program of the texture map of the 3D model is executed by the processor, the above-mentioned 3D model is realized.
  • the steps of the conversion method of the texture map are realized.
  • a conversion method, device, equipment and computer-readable storage medium for a three-dimensional model texture map determine a target plane according to the coordinates of a plurality of initial key points in a three-dimensional model, and obtain a set of key points corresponding to each initial key point; Determine the Laplacian coordinates of each initial key point on the target plane according to each key point set; insert the texture map corresponding to each patch into the target plane according to the preset algorithm and the Laplacian coordinates of each initial key point
  • the target plane is described to obtain a two-dimensional texture map.
  • the invention realizes converting the three-dimensional model into a two-dimensional texture map, the generated two-dimensional texture map retains the detailed information of the texture map, and improves the texture map accuracy of the unfolded three-dimensional model.
  • FIG. 1 is a schematic diagram of the hardware structure of a conversion device for a texture map of a three-dimensional model according to an embodiment of the present invention
  • Fig. 2 is a schematic flow chart of the first embodiment of the conversion method of the three-dimensional model texture map of the present invention
  • Fig. 3 is the schematic diagram of three-dimensional model in the conversion method of three-dimensional model texture map of the present invention.
  • Fig. 4 is the schematic diagram of the transformation result of three-dimensional model texture mapping of the present invention.
  • FIG. 5 is a schematic diagram of the refinement process of step S30 of the second embodiment of the conversion method of the three-dimensional model texture map of the present invention.
  • Fig. 6 is the schematic diagram of projection plane in the conversion method of three-dimensional model texture mapping of the present invention.
  • Fig. 7 is a schematic diagram of the refinement process of step S33 of the third embodiment of the conversion method of the three-dimensional model texture map of the present invention.
  • Fig. 8 is a schematic diagram of the global normal vector and the local normal vector in the conversion method of the three-dimensional model texture map of the present invention.
  • FIG. 9 is a schematic diagram of the corresponding coordinates when the initial key points in the key point set in the conversion method of the three-dimensional model texture map of the present invention are converted to the target plane;
  • Fig. 10 is a schematic diagram of the Laplace coordinates of each initial key point on the target plane in the conversion method of the three-dimensional model texture map of the present invention.
  • FIG. 11 is a schematic diagram of the refinement process of step S10 of the fourth embodiment of the conversion method of the texture map of the 3D model of the present invention.
  • Fig. 12 is a schematic diagram of the logical structure of the conversion device for the texture map of the 3D model of the present invention.
  • the main solution of the embodiment of the present invention is: determine the target plane according to the coordinates of multiple initial key points in the three-dimensional model, and obtain the key point set corresponding to each initial key point; determine each initial key point in the target according to each key point set Laplacian coordinates on the plane; according to the preset algorithm and the Laplacian coordinates of each initial key point, the texture map corresponding to each patch is inserted into the target plane to obtain a two-dimensional texture map.
  • the invention realizes converting the three-dimensional model into a two-dimensional texture map, the generated two-dimensional texture map retains the detailed information of the texture map, and improves the texture map accuracy of the unfolded three-dimensional model.
  • the conversion device for the texture map of the 3D model may be as shown in FIG. 1 .
  • the embodiment scheme of the present invention relates to a conversion device for a three-dimensional model texture map
  • the conversion device for a three-dimensional model texture map may include: a processor 101, such as a central processing unit (Central Processing Unit, CPU), a memory 102 and a communication bus 103.
  • a processor 101 such as a central processing unit (Central Processing Unit, CPU)
  • a memory 102 such as a random access memory (RAM)
  • a communication bus 103 is used to realize connection and communication between these components.
  • the memory 102 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the memory 102 as a computer-readable storage medium may include a conversion program for a three-dimensional model texture map; and the processor 101 may be configured to call the conversion program for a three-dimensional model texture map stored in the memory 102, and Do the following:
  • the target plane according to the coordinates of a plurality of initial key points in the three-dimensional model, the three-dimensional model is divided into a plurality of patches, and the initial key points are border vertices of the patches;
  • the processor 101 may be configured to call the conversion program of the texture map of the 3D model stored in the memory 102, and perform the following operations:
  • the projection plane is determined by the sum of the distances from each of the initial key points in the key point set to the projection plane;
  • the Laplacian coordinates of each initial key point on the target plane are determined according to the projection coordinates corresponding to each key point set.
  • the processor 101 may be configured to call the conversion program of the texture map of the 3D model stored in the memory 102, and perform the following operations:
  • the Laplacian coordinates are determined from the rotated coordinates on the target plane.
  • the processor 101 may be configured to call the conversion program of the texture map of the 3D model stored in the memory 102, and perform the following operations:
  • the Laplace coordinates of each of the initial key points are determined according to the preset anchor point and the Laplace equation corresponding to each of the key point sets.
  • the processor 101 may be configured to call the conversion program of the texture map of the 3D model stored in the memory 102, and perform the following operations:
  • the rotation matrix is determined according to a preset unit vector and the rotation angle.
  • the processor 101 may be configured to call the conversion program of the texture map of the 3D model stored in the memory 102, and perform the following operations:
  • the target plane is determined according to the two global basis vectors.
  • the processor 101 may be configured to call the conversion program of the texture map of the 3D model stored in the memory 102, and perform the following operations:
  • a singular vector corresponding to the smallest singular value of the target matrix is determined as the global normal vector.
  • Fig. 2 is the first embodiment of the conversion method of three-dimensional model texture mapping of the present invention
  • the conversion method of described three-dimensional model texture mapping may comprise the following steps:
  • Step S10 determining the target plane according to the coordinates of multiple initial key points in the three-dimensional model, the three-dimensional model is divided into multiple meshes, and the initial key points are boundary vertices of the meshes.
  • the multiple initial key points may be key points taken from the surface of a human face, and the number of initial key points may be tens of thousands.
  • the three-dimensional model can be a three-dimensional model of a human face.
  • the three-dimensional model is divided into multiple patches, and the initial key points are boundary vertices of the patches.
  • the number of initial key points corresponding to the three-dimensional model can be Eight points, A, B, C, D, E, F, G and H are the boundary vertices of the 3D model.
  • the coordinates of the initial key point A are (0,1,0), and the coordinates of the initial key point B are (1,0,0), the coordinates of the initial key point C are (0,-1,0), the coordinates of the initial key point D are (-1,0,0), and the coordinates of the initial key point E are (-1 ,1,-1), the coordinates of the initial key point F are (1,1,-1), the coordinates of the initial key point G are (1,-1,-1), and the coordinates of the initial key point H are (-1 ,-1,-1).
  • AEF, ABF, BFG, BCG, CGH, DCH, DEH, ADE, ABD and BCD are the meshes of the 3D model.
  • the target plane is determined according to the coordinates of multiple initial key points in the 3D model, the normal vector of the 3D model can be determined according to the initial key points, and a plane perpendicular to the normal vector is selected as the target plane.
  • Step S20 acquiring a key point set corresponding to each of the initial key points, the key point set corresponding to each of the initial key points includes the coordinates of the initial key point and the initial key points within the neighborhood of the initial key point.
  • a set of key points corresponding to each initial key point is obtained, and the set of key points corresponding to each initial key point may include coordinates of the initial key point and initial key points within a neighborhood of the initial key point.
  • the initial key points in the neighborhood of the initial key point A are B, D, E and F
  • the initial key points in the neighborhood of the initial key point B are A, C, D, F and g.
  • Step S30 determining the Laplacian coordinates of each initial key point on the target plane according to each key point set.
  • the projection plane corresponding to each key point set is determined, the projection coordinates of each initial key point in each key point set on the projection plane corresponding to the key point set are determined, and each initial key point is determined according to the projection coordinates
  • the rotation coordinates on the target plane according to the rotation coordinates on the target plane, determine the Laplacian coordinates of each initial key point.
  • Step S40 according to a preset algorithm and the Laplacian coordinates of each initial key point, the texture map corresponding to each of the patches is inserted into the target plane to obtain a two-dimensional texture map.
  • the texture map corresponding to each patch is inserted into the target plane to obtain a two-dimensional texture map.
  • the preset algorithm can be a triangular interpolation algorithm, or It may be other types of algorithms, which are not limited in this embodiment of the present invention.
  • the texture maps of the ten patches are migrated from the 3D model to the target plane.
  • Figure 4a is a three-dimensional model
  • Figure 4b is a two-dimensional texture map.
  • the target plane is determined according to the coordinates of multiple initial key points in the three-dimensional model, and the set of key points corresponding to each initial key point is obtained; Laplacian coordinates on ; according to the preset algorithm and the Laplacian coordinates of each initial key point, the texture map corresponding to each patch is inserted into the target plane to obtain a two-dimensional texture map.
  • the invention realizes converting the three-dimensional model into a two-dimensional texture map, the generated two-dimensional texture map retains the detailed information of the texture map, and improves the texture map accuracy of the unfolded three-dimensional model.
  • Fig. 5 is the second embodiment of the conversion method of the three-dimensional model texture map of the present invention, based on the first embodiment, the step S30 may include:
  • Step S31 determining the projection plane of the key point set corresponding to each of the initial key points, the projection plane is determined by the sum of the distances from each of the initial key points in the key point set to the projection plane;
  • Step S32 determining the projection coordinates of each of the initial key point coordinates in each of the key point sets on the projection plane;
  • Step S33 determining the Laplacian coordinates of each initial key point on the target plane according to the projected coordinates corresponding to each key point set.
  • the sum of the distances from each initial key point to the same plane in the key point set can be calculated, and the minimum sum value of each initial key point to the same plane
  • the plane serves as the projection plane for this set of keypoints.
  • the key point set corresponding to the initial key point A is ⁇ A, B, D, E, F ⁇ , and the coordinate matrix corresponding to the key point set after decentralization is recorded as vA.
  • PCA principal component analysis
  • the projection plane corresponding to the initial key point A is plane_A
  • the projection coordinate of the initial key point A on the projection plane plane_A is A'
  • the projection coordinate of the initial key point B on the projection plane plane_A is B'
  • the projection coordinate of the initial key point D on the projection plane plane_A is D'
  • the projection coordinate of the initial key point E on the projection plane plane_A is E'
  • the projection coordinate of the initial key point F on the projection plane plane_A is F' .
  • the Laplacian coordinates of each initial key point on the target plane are determined according to the projected coordinates corresponding to each key point set.
  • the rotation coordinates of each initial key point on the target plane can be determined according to the projection coordinates, and the Laplacian coordinates of each initial key point can be determined according to the rotation coordinates on the target plane.
  • the projection plane of the key point set corresponding to each initial key point is determined, the projection coordinates of each initial key point coordinate in each key point set on the projection plane are determined, and according to each key point
  • the set of corresponding projected coordinates determines the Laplacian coordinates of each initial keypoint on the target plane. Determine the Laplacian coordinates of each initial key point on the target plane according to the projection coordinates on the projection plane, so that the texture map corresponding to each patch can be inserted into the target plane to obtain a two-dimensional texture map.
  • Fig. 7 is the third embodiment of the conversion method of the three-dimensional model texture map of the present invention, based on the second embodiment, the step S33 includes:
  • Step S331 acquiring the global normal vector of the target plane
  • Step S332 determining the local normal vector of the projection plane
  • Step S333 determining a rotation matrix according to a preset unit vector, the global normal vector, and the local normal vector;
  • Step S334 determining the projection coordinates on the target plane corresponding to the projection coordinates on the projection plane according to the rotation matrix
  • Step S335 determining the Laplacian coordinates according to the projected coordinates on the target plane.
  • the global normal vector of the target plane is perpendicular to the target plane
  • the local normal vector of the projection plane is perpendicular to the projection plane
  • the rotation angle can be determined first according to the global normal vector and the local normal vector. For example, as shown in FIG. 8, the global normal vector is n_global, the local normal vector is n_local, and the rotation angle is the angle ⁇ between the global normal vector and the local normal vector ; Determine the rotation matrix according to the preset unit vector and rotation angle.
  • A', B', D', E' and F' are rotated by ⁇ around the rotation axis n_rot, so that n_local is rotated to the direction of n_global.
  • the unit vector of the axis of rotation be The rotation angle is ⁇ , then the rotation matrix matrix_rotation_local is as follows:
  • the projection points of the key point set corresponding to the initial key point A on plane_A are A', B', D', E' and F', and the rotated points are A", B", D", E” and F ", the three-dimensional model shown in Figure 3, the coordinate matrix corresponding to A', B', D', E' and F' can be multiplied to the left by the corresponding rotation matrix to obtain the corresponding matrix point_rot of the rotation coordinates as:
  • b 1 and b 2 are the basis vectors of the target plane. Exemplarily, the positions of A", B", D", E" and F" on the target plane are shown in FIG. 9 .
  • the above Laplace equation about the x and y coordinates is the Laplace equation corresponding to the initial key point A, and so on, the initial key points A, B, C, D, E, F, G and H correspond to two Laplace equation, 16 Laplace coordinate equations can be obtained.
  • the global normal vector of the target plane is obtained; the local normal vector of the projection plane is determined; the rotation matrix is determined according to the preset unit vector, the global normal vector and the local normal vector;
  • the projection coordinates on correspond to the rotation coordinates on the target plane;
  • the Laplacian coordinates are determined according to the rotation coordinates on the target plane.
  • the Laplace coordinates of the projection coordinates on the target plane are determined by the global normal vector of the target plane and the local normal vector of the projection plane, so that the texture map corresponding to each patch can be accurately inserted into the target plane.
  • Fig. 11 is the fourth embodiment of the conversion method of the three-dimensional model texture map of the present invention, based on any one of the first to third embodiments, the step S10 includes:
  • Step S11 determining a global normal vector according to a plurality of initial key point coordinates
  • Step S12 determining two global basis vectors corresponding to the global normal vector according to preset rules, the global normal vector being perpendicular to the two global basis vectors;
  • Step S13 determining the target plane according to the two global basis vectors.
  • the coordinates of the initial key point A are (0,1,0)
  • the coordinates of the initial key point B are (1,0,0)
  • the coordinates of the initial key point C are (0,-1,0)
  • the coordinates of the initial key point D are (-1,0,0)
  • the coordinates of the initial key point E are (-1,1,-1)
  • the coordinates of the initial key point F are (1,1,-1)
  • the coordinates of the initial key point G are (1,-1,-1)
  • the coordinates of the initial key point H are (-1,-1,-1).
  • vs[:, i] represents the i-th column of the matrix vs
  • vsRaw[:, i] represents the j-th column of the matrix vsRaw.
  • the target matrix looks like this:
  • the coordinate matrix is determined according to a plurality of initial key point coordinates; the average value of the values of each row in the coordinate matrix is determined; the value in the coordinate matrix is subtracted from the average value of the row to obtain the target matrix, and the target is determined
  • the singular vector corresponding to the smallest singular value of the matrix is used as the global normal vector.
  • the global normal vector corresponding to the target plane is determined, and the target plane can be determined according to the base vector of the global normal vector, which facilitates the subsequent accurate insertion of the texture map corresponding to each patch into the target plane.
  • the present invention also provides a conversion device for a three-dimensional model texture map
  • the conversion device for a three-dimensional model texture map includes:
  • the determination module 100 is configured to determine the target plane according to the coordinates of a plurality of initial key points in the three-dimensional model, the three-dimensional model is divided into a plurality of meshes, and the initial key points are boundary vertices of the meshes;
  • the obtaining module 200 is configured to obtain a set of key points corresponding to each of the initial key points, and the set of key points corresponding to each of the initial key points includes coordinates of the initial key points and initial key points within the neighborhood of the initial key points key point;
  • the calculation module 300 is configured to determine the Laplacian coordinates of each of the initial key points on the target plane according to each of the key point sets;
  • the conversion module 400 is configured to insert a texture map corresponding to each of the patches into the target plane according to a preset algorithm and the Laplacian coordinates of each of the initial key points to obtain a two-dimensional texture map.
  • the calculation module 300 is specifically configured as:
  • the projection plane is determined by the sum of the distances from each of the initial key points in the key point set to the projection plane;
  • the Laplacian coordinates of each initial key point on the target plane are determined according to the projection coordinates corresponding to each key point set.
  • the calculation module 300 is specifically configured as:
  • the Laplacian coordinates are determined from the rotated coordinates on the target plane.
  • the calculation module 300 is specifically configured as:
  • the Laplace coordinates of each of the initial key points are determined according to the preset anchor point and the Laplace equation corresponding to each of the key point sets.
  • the calculation module 300 is specifically configured as:
  • the rotation matrix is determined according to a preset unit vector and the rotation angle.
  • the determination module 100 is specifically configured as:
  • the target plane is determined according to the two global basis vectors.
  • the determination module 100 is specifically configured as:
  • a singular vector corresponding to the smallest singular value of the target matrix is determined as the global normal vector.
  • the present invention also provides a conversion device for a three-dimensional model texture map
  • the conversion device for a three-dimensional model texture map includes a memory, a processor, and the conversion of a three-dimensional model texture map stored in the memory and executable on the processor A program, when the conversion program of the 3D model texture map is executed by the processor, each step of the conversion method of the 3D model texture map as described in the above embodiment is implemented.
  • the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores the conversion program of the texture map of the 3D model, and when the conversion program of the texture map of the 3D model is executed by the processor, the above-mentioned embodiment is realized. Each step of the conversion method of the texture map of the 3D model.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Computer Graphics (AREA)
  • Image Generation (AREA)

Abstract

本发明公开了一种三维模型纹理贴图的转换方法、装置、设备以及介质,所述方法包括:根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点;获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点;根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标;根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。本发明提高了展开的三维模型的纹理贴图准确度。

Description

三维模型纹理贴图的转换方法、装置、设备以及介质
相关申请的交叉引用
本发明基于申请号为202111017923.4、申请日为2021年08月31日的中国专利申请提出,申请人为咪咕文化科技有限公司、中国移动通信集团有限公司,申请名称为“三维模型纹理贴图的转换方法、装置、设备以及介质”的技术方案,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本发明作为参考。
技术领域
本发明涉及计算机技术领域,涉及但不限于一种三维模型纹理贴图的转换方法、装置、设备以及计算机可读存储介质。
背景技术
在使用三维建模软件时,需要对三维模型进行纹理展开,得到一张包含模型所有纹理信息的纹理贴图,同时获得三维模型与纹理贴图之间的映射关系,不同的映射关系对应着不同的纹理贴图。
而在实际纹理图像的采集处理过程中,得到的纹理贴图通常为一系列拍摄的纹理照片的汇总,包含大量冗余信息且无法直接应用,而且对于同一模型,由于不同建模师对模型纹理展开方式不同,纹理贴图细节容易丢失,导致展开的三维模型的纹理贴图不准确。
发明内容
本发明提供一种三维模型纹理贴图的转换方法、装置、设备以及计算机可读存储介质,旨在解决如何提高展开的三维模型的纹理贴图准确度的问题。
本发明提供一种三维模型纹理贴图的转换方法,所述三维模型纹理贴图的转换方法包括以下步骤:
根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点;
获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点;
根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标;
根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
在一实施例中,所述根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标的步骤包括:
确定每个所述初始关键点对应的所述关键点集合的投影平面,所述投影平面由所述关键点集合中的各个所述初始关键点到投影平面的距离的和值确定;
确定每个所述关键点集合中的各个所述初始关键点坐标在所述投影平面上的投影坐标;
根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标。
在一实施例中,所述根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标的步骤包括:
获取所述目标平面的全局法向量;
确定所述投影平面的局部法向量;
根据预设的单位向量、所述全局法向量以及所述局部法向量确定旋转矩阵;
根据所述旋转矩阵确定在所述投影平面上的所述投影坐标对应的在所述目标平面上的旋转坐标;
根据在所述目标平面上的旋转坐标确定所述拉普拉斯坐标。
在一实施例中,所述根据在所述目标平面上的旋转坐标确定所述拉普拉斯坐标的步骤包括:
根据在所述目标平面上的各个所述旋转坐标确定拉普拉斯方程;
根据预设锚点以及每个所述关键点集合对应的拉普拉斯方程确定各个所述初始关键点的拉普拉斯坐标。
在一实施例中,所述根据预设的单位向量、所述全局法向量以及所述局部法向量确定旋转矩阵的步骤包括:
根据所述全局法向量以及所述局部法向量确定旋转角度;
根据预设的单位向量以及所述旋转角度确定所述旋转矩阵。
在一实施例中,所述根据三维模型中多个初始关键点坐标确定目标平面的步骤包括:
根据多个所述初始关键点坐标确定全局法向量;
根据预设法则确定所述全局法向量对应的两个全局基向量,所述全局法向量垂直于所述两个全局基向量;
根据两个所述全局基向量确定所述目标平面。
在一实施例中,所述根据多个所述初始关键点坐标确定全局法向量的步骤包括:
根据多个所述初始关键点坐标确定坐标矩阵;
确定所述坐标矩阵中每一行的数值的平均值;
将所述坐标矩阵中的数值减去所述行的平均值得到目标矩阵;
确定所述目标矩阵的最小奇异值对应的奇异向量作为所述全局法向量。
本发明还提供一种三维模型纹理贴图的转换装置,所述三维模型纹理贴图的转换装置包括:
确定模块,配置为根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点;
获取模块,配置为获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点;
计算模块,配置为根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标;
转换模块,配置为根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
本发明还提供一种三维模型纹理贴图的转换设备,所述三维模型纹理贴图的转换设备包括存储器、处理器以及存储在所述存储器并可在所述处理器上执行的三维模型纹理贴图的转换程序,所述三维模型纹理贴图的转换程序被所述处理器执行时实现如上所述的三维模型纹理贴图的转换方法的各个步骤。
本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有三维模型纹理贴图的转换程序,所述三维模型纹理贴图的转换程序被处理器执行时实现如上所述的三维模型纹理贴图的转换方法的各个步骤。
本发明提供的一种三维模型纹理贴图的转换方法、装置、设备以及计算机可读存储介质,根据三维模型中多个初始关键点坐标确定目标平面,获取每个初始关键点对应的关键点集合;根据每个关键点集合确定每个初始关键点在目标平面上的拉普拉斯坐标;根据预设算法以及每个初始关键点的拉普拉斯坐标将每个面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。本发明实现了将三维模型转换为二维的纹理贴图,生成的二维的纹理贴图保留了纹理贴图的细节信息,提高展开的三维模型的纹理贴图准确度。
附图说明
图1为本发明实施例涉及的三维模型纹理贴图的转换设备的硬件结构示意图;
图2为本发明三维模型纹理贴图的转换方法的第一实施例的流程示意图;
图3为本发明三维模型纹理贴图的转换方法中三维模型的示意图;
图4为本发明三维模型纹理贴图的转换结果的示意图;
图5为本发明三维模型纹理贴图的转换方法的第二实施例的步骤S30 的细化流程示意图;
图6为本发明三维模型纹理贴图的转换方法中投影平面的示意图;
图7为本发明三维模型纹理贴图的转换方法的第三实施例的步骤S33的细化流程示意图;
图8为本发明三维模型纹理贴图的转换方法中全局法向量以及局部法向量的示意图;
图9为本发明三维模型纹理贴图的转换方法中关键点集合中的初始关键点转换至目标平面时对应的坐标的示意图;
图10为本发明三维模型纹理贴图的转换方法中各个初始关键点在目标平面上的拉普拉斯坐标的示意图;
图11为本发明三维模型纹理贴图的转换方法的第四实施例的步骤S10的细化流程示意图;
图12为本发明三维模型纹理贴图的转换装置的逻辑结构示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例的主要解决方案是:根据三维模型中多个初始关键点坐标确定目标平面,获取每个初始关键点对应的关键点集合;根据每个关键点集合确定每个初始关键点在目标平面上的拉普拉斯坐标;根据预设算法以及每个初始关键点的拉普拉斯坐标将每个面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
本发明实现了将三维模型转换为二维的纹理贴图,生成的二维的纹理贴图保留了纹理贴图的细节信息,提高展开的三维模型的纹理贴图准确度。
作为一种实现方案,三维模型纹理贴图的转换设备可以如图1所示。
本发明实施例方案涉及的是三维模型纹理贴图的转换设备,三维模型纹理贴图的转换设备可以包括:处理器101,例如中央处理器(Central Processing Unit,CPU),存储器102和通信总线103。其中,通信总线103用于实现这些组件之间的连接通信。
存储器102可以是高速随机存取存储器(Random Access Memory,RAM),也可以是稳定的非易失性存储器(Non-Volatile Memory,NVM),例如磁盘 存储器。如图1所示,作为一种计算机可读存储介质的存储器102中可以包括三维模型纹理贴图的转换程序;而处理器101可以配置为调用存储器102中存储的三维模型纹理贴图的转换程序,并执行以下操作:
根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点;
获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点;
根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标;
根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
在一实施例中,处理器101可以配置为调用存储器102中存储的三维模型纹理贴图的转换程序,并执行以下操作:
确定每个所述初始关键点对应的所述关键点集合的投影平面,所述投影平面由所述关键点集合中的各个所述初始关键点到投影平面的距离的和值确定;
确定每个所述关键点集合中的各个所述初始关键点坐标在所述投影平面上的投影坐标;
根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标。
在一实施例中,处理器101可以配置为调用存储器102中存储的三维模型纹理贴图的转换程序,并执行以下操作:
获取所述目标平面的全局法向量;
确定所述投影平面的局部法向量;
根据预设的单位向量、所述全局法向量以及所述局部法向量确定旋转矩阵;
根据所述旋转矩阵确定在所述投影平面上的所述投影坐标对应的在所述目标平面上的旋转坐标;
根据在所述目标平面上的旋转坐标确定所述拉普拉斯坐标。
在一实施例中,处理器101可以配置为调用存储器102中存储的三维模型纹理贴图的转换程序,并执行以下操作:
根据在所述目标平面上的各个所述旋转坐标确定拉普拉斯方程;
根据预设锚点以及每个所述关键点集合对应的拉普拉斯方程确定各个所述初始关键点的拉普拉斯坐标。
在一实施例中,处理器101可以配置为调用存储器102中存储的三维模型纹理贴图的转换程序,并执行以下操作:
根据所述全局法向量以及所述局部法向量确定旋转角度;
根据预设的单位向量以及所述旋转角度确定所述旋转矩阵。
在一实施例中,处理器101可以配置为调用存储器102中存储的三维模型纹理贴图的转换程序,并执行以下操作:
根据多个所述初始关键点坐标确定全局法向量;
根据预设法则确定所述全局法向量对应的两个全局基向量,所述全局法向量垂直于所述两个全局基向量;
根据两个所述全局基向量确定所述目标平面。
在一实施例中,处理器101可以配置为调用存储器102中存储的三维模型纹理贴图的转换程序,并执行以下操作:
根据多个所述初始关键点坐标确定坐标矩阵;
确定所述坐标矩阵中每一行的数值的平均值;
将所述坐标矩阵中的数值减去所述行的平均值得到目标矩阵;
确定所述目标矩阵的最小奇异值对应的奇异向量作为所述全局法向量。
基于上述三维模型纹理贴图的转换设备的硬件构架,提出本发明三维模型纹理贴图的转换方法的实施例。
参照图2,图2为本发明三维模型纹理贴图的转换方法的第一实施例,所述三维模型纹理贴图的转换方法可以包括以下步骤:
步骤S10,根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点。
示例性地,多个初始关键点可以是取自人脸表面的关键点,初始关键点的数量可以是成千上万个。三维模型可以是人脸的三维模型,三维模型分为多个面片,初始关键点为面片的边界顶点,示例性的,如图3所示, 三维模型对应的初始关键点的数量可以是八个,A、B、C、D、E、F、G和H八个点为三维模型的边界顶点,初始关键点A的坐标为(0,1,0),初始关键点B的坐标为(1,0,0),初始关键点C的坐标为(0,-1,0),初始关键点D的坐标为(-1,0,0),初始关键点E的坐标为(-1,1,-1),初始关键点F的坐标为(1,1,-1),初始关键点G的坐标为(1,-1,-1),初始关键点H的坐标为(-1,-1,-1)。AEF、ABF、BFG、BCG、CGH、DCH、DEH、ADE、ABD和BCD为三维模型的面片。
根据三维模型中多个初始关键点坐标确定目标平面,可以根据初始关键点确定三维模型的法向量,选取一个与法向量垂直的平面作为目标平面。
步骤S20,获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点。
示例性地,获取每个初始关键点对应的关键点集合,每个初始关键点对应的关键点集合可以包括该初始关键点坐标以及初始关键点的邻域内的初始关键点。示例性的,如图3所示,初始关键点A的邻域内的初始关键点为B、D、E以及F,初始关键点B的邻域内的初始关键点为A、C、D、F以及G。
步骤S30,根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标。
示例性地,确定每个关键点集合对应的投影平面,确定每个关键点集合中的每个初始关键点在关键点集合对应的投影平面上的投影坐标,根据投影坐标确定各个初始关键点在目标平面上的旋转坐标,根据在目标平面上的旋转坐标确定每个初始关键点的拉普拉斯坐标。
步骤S40,根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
示例性地,根据预设算法以及每个初始关键点的拉普拉斯坐标将每个面片对应的纹理贴图插入目标平面,得到二维的纹理贴图,预设算法可以是三角插值算法,也可以是其他类型算法,本发明实施例对此不作限定。示例性的,如图3所示,在确定初始关键点A、B、C、D、E、F、G以及H在目标平面上的拉普拉斯坐标之后,将AEF、ABF、BFG、BCG、CGH、 DCH、DEH、ADE、ABD和BCD这十个面片的纹理贴图由三维模型上迁移至目标平面上。如图4所示,图4a为三维模型,图4b为二维的纹理贴图。
在本实施例的技术方案中,根据三维模型中多个初始关键点坐标确定目标平面,获取每个初始关键点对应的关键点集合;根据每个关键点集合确定每个初始关键点在目标平面上的拉普拉斯坐标;根据预设算法以及每个初始关键点的拉普拉斯坐标将每个面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。本发明实现了将三维模型转换为二维的纹理贴图,生成的二维的纹理贴图保留了纹理贴图的细节信息,提高展开的三维模型的纹理贴图准确度。
参照图5,图5为本发明三维模型纹理贴图的转换方法的第二实施例,基于第一实施例,所述步骤S30可以包括:
步骤S31,确定每个所述初始关键点对应的所述关键点集合的投影平面,所述投影平面由所述关键点集合中的各个所述初始关键点到投影平面的距离的和值确定;
步骤S32,确定每个所述关键点集合中的各个所述初始关键点坐标在所述投影平面上的投影坐标;
步骤S33,根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标。
示例性地,确定每个初始关键点对应的关键点集合的投影平面,可以计算关键点集合中各个初始关键点到同一平面的距离的和值,将各个初始关键点到同一平面和值最小的平面作为该关键点集合的投影平面。初始关键点A对应的关键点集合为{A,B,D,E,F},将关键点集合对应的坐标矩阵去中心化以后的坐标矩阵记为vA。对vA进行主成分分析(Principal Component Analysis,PCA)降维处理,得到vA的两个主方向构成的投影平面plane_A,然后确定每个关键点集合中各个初始关键点坐标在投影平面上的投影坐标。示例性的,如图6所示,初始关键点A对应的投影平面为plane_A,初始关键点A在投影平面plane_A上的投影坐标为A’,初始关键点B在投影平面plane_A上的投影坐标为B’,初始关键点D在投影平面plane_A上的投影坐标为D’,初始关键点E在投影平面plane_A上的投影坐标为E’,初始关键点F在投影平面plane_A上的投影坐标为F’。
根据每个关键点集合对应的投影坐标确定每个初始关键点在目标平面上的拉普拉斯坐标。可以根据投影坐标确定各个初始关键点在目标平面上的旋转坐标,根据在目标平面上的旋转坐标确定每个初始关键点的拉普拉斯坐标。
在本实施例的技术方案中,确定每个初始关键点对应的关键点集合的投影平面,确定每个关键点集合中的各个初始关键点坐标在投影平面上的投影坐标,根据每个关键点集合对应的投影坐标确定每个初始关键点在目标平面上的拉普拉斯坐标。根据投影平面上的投影坐标确定各个初始关键点在目标平面上的拉普拉斯坐标,便于后续将各个面片对应的纹理贴图插入目标平面,得到二维的纹理贴图。
参照图7,图7为本发明三维模型纹理贴图的转换方法的第三实施例,基于第二实施例,所述步骤S33包括:
步骤S331,获取所述目标平面的全局法向量;
步骤S332,确定所述投影平面的局部法向量;
步骤S333,根据预设的单位向量、所述全局法向量以及所述局部法向量确定旋转矩阵;
步骤S334,根据所述旋转矩阵确定在所述投影平面上的所述投影坐标对应的在所述目标平面上的投影坐标;
步骤S335,根据在所述目标平面上的投影坐标确定所述拉普拉斯坐标。
示例性地,目标平面的全局法向量垂直于目标平面,投影平面的局部法向量垂直于投影平面。
根据预设的单位向量、全局法向量以及局部法向量确定旋转矩阵。可以先根据全局法向量以及局部法向量确定旋转角度,示例性的,如图8所示,全局法向量为n_global,局部法向量为n_local,旋转角度为全局法向量和局部法向量的夹角θ;根据预设的单位向量以及旋转角度确定旋转矩阵。
若n_rot=n_local×n_global为旋转轴,将A’、B’、D’、E’和F’绕着旋转轴n_rot旋转θ,使得n_local被旋转至n_global的方向。设旋转轴的单位向量为
Figure PCTCN2022114853-appb-000001
旋转角度为θ,则旋转矩阵matrix_rotation_local如下所示:
Figure PCTCN2022114853-appb-000002
初始关键点A对应的关键点集合在plane_A上的投影点为A’、B’、D’、E’和F’,经过旋转以后的点为A”、B”、D”、E”和F”,如图3所示的三维模型,可以将A’、B’、D’、E’和F’对应的坐标矩阵左乘对应的旋转矩阵得到旋转坐标的对应的矩阵point_rot为:
Figure PCTCN2022114853-appb-000003
A”、B”、D”、E”和F”在目标平面上的基向量b 1×b 2上的旋转坐标的矩阵point_local为:
point_local=(b 1;b 2)’*point_rot;
Figure PCTCN2022114853-appb-000004
其中,b 1和b 2为目标平面的基向量,示例性的,A”、B”、D”、E”和F”在目标平面的位置如图9所示。
根据在目标平面上的各个旋转坐标确定拉普拉斯方程;根据预设锚点以及每个关键点集合对应的拉普拉斯方程确定各个初始关键点的拉普拉斯坐标。
由于A”、B”、D”、E”和F”在新的坐标系下的坐标有两个分量,示例性的,关于点A”对应的拉普拉斯方程有两个,关于x的坐标的拉普拉斯方程,如下所示:
Figure PCTCN2022114853-appb-000005
关于y的坐标的拉普拉斯方程,如下所示:
Figure PCTCN2022114853-appb-000006
上述关于x和y坐标的拉普拉斯方程为初始关键点A对应的拉普拉斯方程,依次类推,初始关键点A、B、C、D、E、F、G以及H分别对应两个拉普拉斯方程,可以得到16个拉普拉斯坐标方程。
根据预设锚点以及每个关键点集合对应的拉普拉斯方程确定各个初始关键点的拉普拉斯坐标,示例性的,可以选取锚点为x A=0,y A=0;由这两个方程与16个拉普拉斯坐标方程,可以解得8个点的x,y坐标,8个点在目标平面上的分布可以如图10所示。
在本实施例的技术方案中,获取目标平面的全局法向量;确定投影平面的局部法向量;根据预设的单位向量、全局法向量以及局部法向量确定旋转矩阵;根据旋转矩阵确定在投影平面上的投影坐标对应的在目标平面上的旋转坐标;根据在目标平面上的旋转坐标确定拉普拉斯坐标。通过目标平面的全局法向量和投影平面的局部法向量确定投影坐标在目标平面的拉普拉斯坐标,便于后续将每个面片对应的纹理贴图准确插入目标平面。
参照图11,图11为本发明三维模型纹理贴图的转换方法的第四实施例,基于第一至第三中任一实施例,所述步骤S10包括:
步骤S11,根据多个所述初始关键点坐标确定全局法向量;
步骤S12,根据预设法则确定所述全局法向量对应的两个全局基向量,所述全局法向量垂直于所述两个全局基向量;
步骤S13,根据两个所述全局基向量确定所述目标平面。
示例性地,假设初始关键点A的坐标为(0,1,0),初始关键点B的坐标为(1,0,0),初始关键点C的坐标为(0,-1,0),初始关键点D的坐标为(-1,0,0),初始关键点E的坐标为(-1,1,-1),初始关键点F的坐标为(1,1,-1),初始关键点G的坐标为(1,-1,-1),初始关键点H的坐标为(-1,-1,-1)。
根据多个初始关键点坐标确定坐标矩阵;
Figure PCTCN2022114853-appb-000007
确定坐标矩阵中每一行的数值的平均值为
Figure PCTCN2022114853-appb-000008
将坐标矩阵中的数值减去行的平均值得到目标矩阵,公式如下所示:
Figure PCTCN2022114853-appb-000009
其中,vs[:,i]表示矩阵vs的第i列,vsRaw[:,i]表示矩阵vsRaw的第j列。
目标矩阵如下所示:
Figure PCTCN2022114853-appb-000010
对矩阵vs进行奇异值分解,
vs=u·s·v T
其中,
Figure PCTCN2022114853-appb-000011
s=[2.449 2.449 1.414];
Figure PCTCN2022114853-appb-000012
确定目标矩阵的最小奇异值对应的奇异向量作为全局法向量。示例性的,选取u矩阵的第三个列向量为n_global=u[:,3]=[0,0,1]’,由右手法则可以确定目标平面的基向量为b 1=u[:,1]=[0,-1,0]’以及b 2=u[:,2]=[1,0,0]’;
在本实施例的技术方案中,根据多个初始关键点坐标确定坐标矩阵;确定坐标矩阵中每一行的数值的平均值;将坐标矩阵中的数值减去行的平均值得到目标矩阵,确定目标矩阵的最小奇异值对应的奇异向量作为全局法向量。确定了目标平面对应的全局法向量,根据全局法向量的基向量可以确定目标平面,便于后续将每个面片对应的纹理贴图准确插入目标平面。
参照图12,本发明还提供一种三维模型纹理贴图的转换装置,所述三维模型纹理贴图的转换装置包括:
确定模块100,配置为根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点;
获取模块200,配置为获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点;
计算模块300,配置为根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标;
转换模块400,配置为根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
在一实施例中,在根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标方面,所述计算模块300具体配置为:
确定每个所述初始关键点对应的所述关键点集合的投影平面,所述投影平面由所述关键点集合中的各个所述初始关键点到投影平面的距离的和值确定;
确定每个所述关键点集合中的各个所述初始关键点坐标在所述投影平面上的投影坐标;
根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标。
在一实施例中,在根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标方面,所述计算模块300具体配置为:
获取所述目标平面的全局法向量;
确定所述投影平面的局部法向量;
根据预设的单位向量、所述全局法向量以及所述局部法向量确定旋转矩阵;
根据所述旋转矩阵确定在所述投影平面上的所述投影坐标对应的在所述目标平面上的旋转坐标;
根据在所述目标平面上的旋转坐标确定所述拉普拉斯坐标。
在一实施例中,在根据在所述目标平面上的旋转坐标确定所述拉普拉斯坐标方面,所述计算模块300具体配置为:
根据在所述目标平面上的各个所述旋转坐标确定拉普拉斯方程;
根据预设锚点以及每个所述关键点集合对应的拉普拉斯方程确定各个所述初始关键点的拉普拉斯坐标。
在一实施例中,在根据预设的单位向量、所述全局法向量以及所述局 部法向量确定旋转矩阵方面,所述计算模块300具体配置为:
根据所述全局法向量以及所述局部法向量确定旋转角度;
根据预设的单位向量以及所述旋转角度确定所述旋转矩阵。
在一实施例中,在根据三维模型中多个初始关键点坐标确定目标平面方面,所述确定模块100具体配置为:
根据多个所述初始关键点坐标确定全局法向量;
根据预设法则确定所述全局法向量对应的两个全局基向量,所述全局法向量垂直于所述两个全局基向量;
根据两个所述全局基向量确定所述目标平面。
在一实施例中,在根据多个所述初始关键点坐标确定全局法向量方面,所述确定模块100具体配置为:
根据多个所述初始关键点坐标确定坐标矩阵;
确定所述坐标矩阵中每一行的数值的平均值;
将所述坐标矩阵中的数值减去所述行的平均值得到目标矩阵;
确定所述目标矩阵的最小奇异值对应的奇异向量作为所述全局法向量。
本发明还提供一种三维模型纹理贴图的转换设备,所述三维模型纹理贴图的转换设备包括存储器、处理器以及存储在所述存储器并可在所述处理器上执行的三维模型纹理贴图的转换程序,所述三维模型纹理贴图的转换程序被所述处理器执行时实现如上实施例所述的三维模型纹理贴图的转换方法的各个步骤。
本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有三维模型纹理贴图的转换程序,所述三维模型纹理贴图的转换程序被处理器执行时实现如上实施例所述的三维模型纹理贴图的转换方法的各个步骤。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、系统、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、系统、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过 程、系统、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本邻域的技术人员可以清楚地了解到上述实施例系统可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个计算机可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,停车管理设备,空调器,或者网络设备等)执行本发明各个实施例所述的系统。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术邻域,均同理包括在本发明的专利保护范围内。

Claims (10)

  1. 一种三维模型纹理贴图的转换方法,所述三维模型纹理贴图的转换方法包括:
    根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点;
    获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点;
    根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标;
    根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
  2. 如权利要求1所述的三维模型纹理贴图的转换方法,其中,所述根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标的步骤包括:
    确定每个所述初始关键点对应的所述关键点集合的投影平面,所述投影平面由所述关键点集合中的各个所述初始关键点到投影平面的距离的和值确定;
    确定每个所述关键点集合中的各个所述初始关键点坐标在所述投影平面上的投影坐标;
    根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标。
  3. 如权利要求2所述的三维模型纹理贴图的转换方法,其中,所述根据每个所述关键点集合对应的所述投影坐标确定每个初始关键点在所述目标平面上的拉普拉斯坐标的步骤包括:
    获取所述目标平面的全局法向量;
    确定所述投影平面的局部法向量;
    根据预设的单位向量、所述全局法向量以及所述局部法向量确定旋转矩阵;
    根据所述旋转矩阵确定在所述投影平面上的所述投影坐标对应的在所述目标平面上的旋转坐标;
    根据在所述目标平面上的旋转坐标确定所述拉普拉斯坐标。
  4. 如权利要求3所述的三维模型纹理贴图的转换方法,其中,所述根据在所述目标平面上的旋转坐标确定所述拉普拉斯坐标的步骤包括:
    根据在所述目标平面上的各个所述旋转坐标确定拉普拉斯方程;
    根据预设锚点以及每个所述关键点集合对应的拉普拉斯方程确定各个所述初始关键点的拉普拉斯坐标。
  5. 如权利要求3所述的三维模型纹理贴图的转换方法,其中,所述根据预设的单位向量、所述全局法向量以及所述局部法向量确定旋转矩阵的步骤包括:
    根据所述全局法向量以及所述局部法向量确定旋转角度;
    根据预设的单位向量以及所述旋转角度确定所述旋转矩阵。
  6. 如权利要求1所述的三维模型纹理贴图的转换方法,其中,所述根据三维模型中多个初始关键点坐标确定目标平面的步骤包括:
    根据多个所述初始关键点坐标确定全局法向量;
    根据预设法则确定所述全局法向量对应的两个全局基向量,所述全局法向量垂直于所述两个全局基向量;
    根据两个所述全局基向量确定所述目标平面。
  7. 如权利要求6所述的三维模型纹理贴图的转换方法,其中,所述根据多个所述初始关键点坐标确定全局法向量的步骤包括:
    根据多个所述初始关键点坐标确定坐标矩阵;
    确定所述坐标矩阵中每一行的数值的平均值;
    将所述坐标矩阵中的数值减去所述行的平均值得到目标矩阵;
    确定所述目标矩阵的最小奇异值对应的奇异向量作为所述全局法向量。
  8. 一种三维模型纹理贴图的转换装置,所述三维模型纹理贴图的转换装置包括:
    确定模块,配置为根据三维模型中多个初始关键点坐标确定目标平面,所述三维模型分为多个面片,所述初始关键点为所述面片的边界顶点;
    获取模块,配置为获取每个所述初始关键点对应的关键点集合,每个所述初始关键点对应的关键点集合包括所述初始关键点坐标以及所述初始关键点的邻域内的初始关键点;
    计算模块,配置为根据每个所述关键点集合确定每个所述初始关键点在所述目标平面上的拉普拉斯坐标;
    转换模块,配置为根据预设算法以及每个所述初始关键点的所述拉普拉斯坐标将每个所述面片对应的纹理贴图插入所述目标平面,得到二维的纹理贴图。
  9. 一种三维模型纹理贴图的转换设备,所述三维模型纹理贴图的转换设备包括存储器、处理器以及存储在所述存储器并可在所述处理器上执行的三维模型纹理贴图的转换程序,所述三维模型纹理贴图的转换程序被所述处理器执行时实现如权利要求1-7任一项所述的三维模型纹理贴图的转换方法的各个步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有三维模型纹理贴图的转换程序,所述三维模型纹理贴图的转换程序被处理器执行时实现如权利要求1-7任一项所述的三维模型纹理贴图的转换方法的各个步骤。
PCT/CN2022/114853 2021-08-31 2022-08-25 三维模型纹理贴图的转换方法、装置、设备以及介质 WO2023030163A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111017923.4A CN113781622A (zh) 2021-08-31 2021-08-31 三维模型纹理贴图的转换方法、装置、设备以及介质
CN202111017923.4 2021-08-31

Publications (1)

Publication Number Publication Date
WO2023030163A1 true WO2023030163A1 (zh) 2023-03-09

Family

ID=78840389

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/114853 WO2023030163A1 (zh) 2021-08-31 2022-08-25 三维模型纹理贴图的转换方法、装置、设备以及介质

Country Status (2)

Country Link
CN (1) CN113781622A (zh)
WO (1) WO2023030163A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116071276A (zh) * 2023-04-07 2023-05-05 深圳开鸿数字产业发展有限公司 基于顶点的三维模型缺口修复方法、装置、设备及介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781622A (zh) * 2021-08-31 2021-12-10 咪咕文化科技有限公司 三维模型纹理贴图的转换方法、装置、设备以及介质
CN114359456B (zh) * 2021-12-27 2023-03-24 北京城市网邻信息技术有限公司 贴图方法、装置、电子设备及可读存储介质
CN114419233A (zh) * 2021-12-31 2022-04-29 网易(杭州)网络有限公司 模型生成方法、装置、计算机设备及存储介质
CN115588070B (zh) * 2022-12-12 2023-03-14 南方科技大学 一种三维图像风格化迁移方法及终端

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5537638A (en) * 1991-10-25 1996-07-16 Hitachi, Ltd. Method and system for image mapping
US20160155262A1 (en) * 2013-09-23 2016-06-02 Beihang University Method of constructing 3d clothing model based on a single image
CN108062784A (zh) * 2018-02-05 2018-05-22 深圳市易尚展示股份有限公司 三维模型纹理贴图转换方法与装置
CN112102480A (zh) * 2020-09-22 2020-12-18 腾讯科技(深圳)有限公司 图像数据处理方法、装置、设备以及介质
CN113012271A (zh) * 2021-03-23 2021-06-22 华南理工大学 一种基于uv贴图的手指三维模型纹理映射方法
CN113781622A (zh) * 2021-08-31 2021-12-10 咪咕文化科技有限公司 三维模型纹理贴图的转换方法、装置、设备以及介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009042811A (ja) * 2007-08-06 2009-02-26 Univ Of Tokyo 3次元形状展開装置、3次元形状展開方法、および3次元形状展開用プログラム
CN104574501B (zh) * 2014-12-19 2017-07-21 浙江大学 一种针对复杂三维场景的高质量纹理映射方法
CN110443885B (zh) * 2019-07-18 2022-05-03 西北工业大学 基于随机人脸图像的三维人头脸模型重建方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5537638A (en) * 1991-10-25 1996-07-16 Hitachi, Ltd. Method and system for image mapping
US20160155262A1 (en) * 2013-09-23 2016-06-02 Beihang University Method of constructing 3d clothing model based on a single image
CN108062784A (zh) * 2018-02-05 2018-05-22 深圳市易尚展示股份有限公司 三维模型纹理贴图转换方法与装置
CN112102480A (zh) * 2020-09-22 2020-12-18 腾讯科技(深圳)有限公司 图像数据处理方法、装置、设备以及介质
CN113012271A (zh) * 2021-03-23 2021-06-22 华南理工大学 一种基于uv贴图的手指三维模型纹理映射方法
CN113781622A (zh) * 2021-08-31 2021-12-10 咪咕文化科技有限公司 三维模型纹理贴图的转换方法、装置、设备以及介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116071276A (zh) * 2023-04-07 2023-05-05 深圳开鸿数字产业发展有限公司 基于顶点的三维模型缺口修复方法、装置、设备及介质

Also Published As

Publication number Publication date
CN113781622A (zh) 2021-12-10

Similar Documents

Publication Publication Date Title
WO2023030163A1 (zh) 三维模型纹理贴图的转换方法、装置、设备以及介质
CN109389665B (zh) 三维模型的纹理获取方法、装置、设备和存储介质
CN113240769B (zh) 空间链接关系识别方法及装置、存储介质
US10957062B2 (en) Structure depth-aware weighting in bundle adjustment
CN109685841B (zh) 三维模型与点云的配准方法及系统
CN116129020A (zh) 一种新型实景三维建模方法
CN116596755B (zh) 一种点云数据的拼接方法、装置、设备及存储介质
CN112733641A (zh) 物体尺寸测量方法、装置、设备及存储介质
KR20150113870A (ko) 관리 프로그램, 관리 장치 및 관리 방법
CN114202632A (zh) 网格线性结构恢复方法、装置、电子设备及存储介质
CN113269897B (zh) 表面点云的获取方法、装置、设备及存储介质
US8564607B2 (en) Apparatus and method for creating textures of building
CN117132737B (zh) 一种三维建筑模型构建方法、系统及设备
CN113034347A (zh) 倾斜摄影图像处理方法、装置、处理设备及存储介质
CN115631317B (zh) 隧道衬砌正射影像生成方法及装置、存储介质、终端
CN116468761A (zh) 基于概率分布距离特征描述的配准方法、设备及存储介质
CN111982152B (zh) 点云地图量化方法、装置、计算机设备和存储介质
CN114511637A (zh) 一种基于构造强特征的弱特征物体图像三维重建系统及方法
US10460420B2 (en) Converting spatial features to map projection
CN114359413B (zh) 用于三维扫描的旋转平台位置参数计算方法及系统
CN110019982B (zh) 节点坐标的确定方法以及装置
JPH09138870A (ja) 画像処理装置及び方法
CN115240183A (zh) 一种识别扭曲文本图像的处理方法、装置、设备及介质
CN117687543A (zh) 三维模型规则曲面提取方法、装置、电子设备及存储介质
CN116977386A (zh) 房屋点云数据的处理方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22863301

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE