A method, device, and medium for mapping two-dimensional textures to three-dimensional models.
By employing multi-coordinate system transformation and model registration methods, a precise mapping between two-dimensional textures and three-dimensional models is achieved, solving the problems of low efficiency and difficulty in guaranteeing accuracy in existing technologies. This method is suitable for efficient three-dimensional reconstruction of objects without obvious feature points.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZG TECH CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies suffer from low data processing efficiency, limited applicability, and difficulty in guaranteeing mapping accuracy in the mapping process between two-dimensional textures and three-dimensional models. In particular, it is difficult to achieve effective mapping on objects without obvious feature points or lacking texture.
By acquiring the pose parameters of the textureless 3D model and texture image of the target object, and utilizing multi-coordinate system transformation relationships and model registration, including the transformation relationships between the 3D scanning device and the rotating platform, and between the texture acquisition device and the turntable target point coordinate system, the texture data is accurately mapped to the model coordinate system of the textureless 3D model.
It achieves efficient and automated mapping between 2D textures and 3D models, improves mapping efficiency, ensures mapping accuracy, solves the problem of mapping objects without obvious feature points, and provides an efficient and feasible solution for high-fidelity 3D reconstruction of a large number of objects.
Smart Images

Figure CN122089918A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of texture mapping technology, and more specifically, to a method, device, and medium for mapping two-dimensional textures to three-dimensional models. Background Technology
[0002] In the high-fidelity 3D reconstruction of cultural relics and other artifacts, it is necessary to simultaneously ensure the high definition and high color fidelity of 2D texture data, as well as the integrity and high precision of 3D geometric information. Because the environmental conditions and equipment requirements for 2D texture acquisition and 3D geometric information acquisition differ—for example, 2D texture imaging requires specific lighting conditions, while 3D geometric information acquisition requires meeting the working conditions of a 3D scanner—and their workflows are different, the data acquisition of artifacts is typically divided into two sequential processes: 3D geometric information acquisition and 2D texture information acquisition. In the later data processing stage, the core step is to unify the coordinate systems of the 2D texture and 3D geometric data, that is, to complete the mapping from 2D texture to 3D geometric data. Currently, the mainstream technical solution is to achieve this mapping process through manual interaction: first, select several feature points as control points on the 3D model data, then select corresponding feature points on the 2D texture image to form 2D and 3D corresponding point pairs. Based on these corresponding point pairs, the position and orientation of the 2D texture image in the 3D model are recovered, thus completing the texture mapping.
[0003] The aforementioned mainstream technical solutions have several significant drawbacks: First, data processing efficiency is low, requiring a large amount of manual work to complete interactive operations such as point selection, making automated processing impossible and creating a clear bottleneck in processing large volumes of artifact data; second, processing applicability is limited, as manual point selection relies on clear two-dimensional and three-dimensional corresponding feature points, making it difficult to complete effective point selection and subsequent mapping work for artifacts with no obvious feature points or lacking texture; third, mapping accuracy is difficult to guarantee, as the subjectivity and operational differences in manual point selection directly lead to a decrease in the registration accuracy of two-dimensional and three-dimensional data, making it difficult to guarantee data quality. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of the prior art by providing a method, device, and medium for mapping two-dimensional textures to three-dimensional models, so as to achieve accurate mapping of texture data to the model coordinate system of a textureless three-dimensional model through multi-coordinate system transformation relationships and model registration.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a method for mapping two-dimensional textures to three-dimensional models, including: A textureless 3D model of the target object, a rough model, and multiple texture images corresponding to the rough model, as well as the pose parameters of the texture images, are obtained; wherein, the rough model is a 3D model obtained by scanning the target object placed on a rotating platform using a 3D scanning device at the target workstation, and the texture images are texture images obtained by scanning the target object using a texture acquisition device at the target workstation. Obtain the first transformation relationship between the coordinate system of the three-dimensional scanning device and the coordinate system of the target point on the rotating platform; Obtain the second transformation relationship between the texture acquisition device and the coordinate system of the turntable target point; Based on the first transformation relationship, the preliminary model is transformed from the device coordinate system of the 3D scanning device to the target point coordinate system of the turntable to obtain the transformed preliminary model; According to the second transformation relationship, the pose parameters of the texture image are transformed from the device coordinate system of the texture acquisition device to the target point coordinate system of the turntable to obtain the pose parameters of the transformed texture image. The textureless 3D model and the transformed rough model are registered to obtain a third transformation relationship between the transformed rough model and the textureless 3D model; According to the third transformation relationship, the pose parameters of the transformed texture image are transformed from the coordinate system of the turntable target point to the model coordinate system of the textureless 3D model to obtain the pose parameters of the target texture image.
[0006] In an optional implementation, obtaining the first transformation relationship between the coordinate systems of the three-dimensional scanning device and the target point on the rotating platform includes: Obtain a first device relationship between the first device target point coordinate system of the device target point on the 3D scanning device and the device coordinate system of the 3D scanning device; Obtain the second device relationship between the target point coordinate system of the first device and the tracker coordinate system of the tracker; Obtain the third device relationship between the tracker coordinate system and the turntable target point coordinate system; The first conversion relationship is obtained based on the first device relationship, the second device relationship, and the third device relationship.
[0007] In an optional implementation, obtaining the first device relationship between the first device target point coordinate system and the device coordinate system of the 3D scanning device includes: The tracker is used to obtain the coordinates of the calibration target point on the calibration plate in the tracker coordinate system, and the coordinates of the device target point on the three-dimensional scanning device in the tracker coordinate system. Based on the coordinates of the calibration target point and the coordinates of the device target point on the 3D scanning device, a fourth device relationship is determined between the first device target point coordinate system and the calibration plate coordinate system. Based on the fourth device relationship, the device target point on the three-dimensional scanning device is transformed from the first device target point coordinate system to the calibration plate coordinate system to obtain the transformed device target point on the three-dimensional scanning device. The coordinates of the calibration target points on the calibration plate are obtained using the three-dimensional scanning device, and the pose of the three-dimensional scanning device in the coordinate system of the calibration plate is determined. The first device relationship is determined based on the pose of the 3D scanning device in the coordinate system of the calibration plate and the device target point on the transformed 3D scanning device.
[0008] In an optional implementation, obtaining the second device relationship between the first device target point coordinate system and the tracker coordinate system of the tracker includes: Obtain the first target point coordinate group in the first device target point coordinate system and the second target point coordinate group in the tracker coordinate system; The second device relationship is determined based on the first target point coordinate group and the second target point coordinate group.
[0009] In an optional implementation, obtaining the second transformation relationship between the texture acquisition device and the coordinate system of the turntable target point includes: Obtain the fifth device relationship between the second device target point coordinate system of the device target point on the texture acquisition device and the device coordinate system of the texture acquisition device; Obtain the sixth device relationship between the target point coordinate system of the second device and the tracker coordinate system of the tracker; The second conversion relationship is obtained based on the fifth device relationship, the sixth device relationship, and the third device relationship.
[0010] In an optional implementation, the fifth device relationship between the second device target point coordinate system and the device coordinate system of the texture acquisition device, obtained from the device target point on the texture acquisition device, includes: The tracker is used to obtain the coordinates of the calibration target point on the calibration board in the tracker coordinate system, and the coordinates of the device target point on the texture acquisition device in the tracker coordinate system. Based on the coordinates of the calibration target point and the coordinates of the device target point on the texture acquisition device, determine the seventh device relationship between the second device target point coordinate system and the calibration board coordinate system; Based on the seventh device relationship, the device target point on the texture acquisition device is transformed from the coordinate system of the second device target point to the coordinate system of the calibration board to obtain the transformed device target point on the texture acquisition device. The texture acquisition device is used to obtain the coordinates of the calibration target points on the calibration board, and the pose of the texture acquisition device in the coordinate system of the calibration board is determined. The fifth device relationship is determined based on the pose of the texture acquisition device in the calibration board coordinate system and the device target point on the transformed texture acquisition device.
[0011] In an optional implementation, obtaining the sixth device relationship between the second device target point coordinate system and the tracker coordinate system of the tracker includes: Obtain the third target point coordinate group in the second device target point coordinate system and the fourth target point coordinate group in the tracker coordinate system; The relationship of the sixth device is determined based on the coordinates of the third and fourth target points.
[0012] In an optional implementation, the method further includes: Based on the pose parameters of the target texture image and the textureless 3D model, a textured 3D model of the target object is generated.
[0013] Secondly, embodiments of this application also provide a mapping device for two-dimensional textures and three-dimensional models, comprising: The acquisition module is used to acquire a textureless 3D model of the target object, a rough model, and multiple texture images corresponding to the rough model, as well as the pose parameters of the texture images; wherein, the rough model is a 3D model obtained by scanning the target object placed on a rotating platform by a 3D scanning device at the target workstation, and the texture images are texture images obtained by scanning the target object by a texture acquisition device at the target workstation. The acquisition module is also used to acquire the first transformation relationship between the coordinate system of the three-dimensional scanning device and the coordinate system of the target point on the rotating platform; The acquisition module is also used to acquire a second transformation relationship between the texture acquisition device and the coordinate system of the turntable target point; The conversion module is used to convert the preliminary model from the device coordinate system of the 3D scanning device to the target point coordinate system of the turntable according to the first conversion relationship, so as to obtain the converted preliminary model. The conversion module is further configured to convert the pose parameters of the texture image from the device coordinate system of the texture acquisition device to the target point coordinate system of the turntable according to the second conversion relationship, so as to obtain the pose parameters of the converted texture image. The registration module is used to register the textureless 3D model and the converted rough model to obtain a third conversion relationship between the converted rough model and the textureless 3D model. The conversion module is also used to convert the pose parameters of the converted texture image from the coordinate system of the turntable target point to the model coordinate system of the textureless 3D model according to the third conversion relationship, so as to obtain the pose parameters of the target texture image.
[0014] Thirdly, embodiments of this application also provide a computer device, including: a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the mapping method between two-dimensional textures and three-dimensional models as described in any of the first aspects.
[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the mapping method between a two-dimensional texture and a three-dimensional model as described in any of the first aspects.
[0016] The beneficial effects of this application are: This application provides a method, device, and medium for mapping two-dimensional textures to three-dimensional models, including: acquiring a textureless three-dimensional model of a target object, a preliminary model, and multiple texture images corresponding to the preliminary model, as well as the pose parameters of the texture images. The preliminary model is a three-dimensional model obtained by a three-dimensional scanning device at the target station scanning the target object placed on a rotating platform. The texture images are texture images obtained by a texture acquisition device at the target station scanning the target object. A first transformation relationship is acquired between the coordinate system of the three-dimensional scanning device and the coordinate system of the target point on the rotating platform, and a second transformation relationship is acquired between the coordinate system of the texture acquisition device and the coordinate system of the target point on the rotating platform. According to the first transformation relationship, the rough model is transformed from the device coordinate system of the 3D scanning device to the target point coordinate system of the turntable to obtain the transformed rough model. According to the second transformation relationship, the pose parameters of the texture image are transformed from the device coordinate system of the texture acquisition device to the target point coordinate system of the turntable to obtain the pose parameters of the transformed texture image. The textureless 3D model and the transformed rough model are registered to obtain the third transformation relationship between the transformed rough model and the textureless 3D model. According to the third transformation relationship, the pose parameters of the transformed texture image are transformed from the target point coordinate system of the turntable to the model coordinate system of the textureless 3D model to obtain the pose parameters of the target texture image.
[0017] The method in this application achieves accurate mapping of texture data to the model coordinate system of a textureless 3D model through multi-coordinate system transformation and model registration. This eliminates the reliance on manual point selection in traditional methods, significantly improving the efficiency of mapping 2D textures to 3D models. At the same time, the standardized coordinate transformation and registration process ensures the stability of mapping accuracy, effectively solving the mapping problem of objects without obvious feature points, and providing an efficient and feasible solution for high-fidelity 3D reconstruction of a large number of objects. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic diagram of a mapping system between two-dimensional textures and three-dimensional models provided in an embodiment of this application; Figure 2 One of the flowcharts illustrating a mapping method between two-dimensional textures and three-dimensional models provided in this application embodiment; Figure 3 A second schematic flowchart illustrating a mapping method between two-dimensional textures and three-dimensional models provided in an embodiment of this application; Figure 4 The third schematic flowchart illustrates a method for mapping two-dimensional textures to three-dimensional models provided in this application embodiment; Figure 5 The fourth flowchart illustrates a method for mapping two-dimensional textures to three-dimensional models, as provided in this application embodiment. Figure 6 Fifth flowchart illustrating a mapping method between two-dimensional textures and three-dimensional models provided in this application embodiment; Figure 7 A flowchart illustrating a method for mapping two-dimensional textures to three-dimensional models, provided in an embodiment of this application, is shown in Figure 6. Figure 8 The seventh flowchart illustrates a method for mapping two-dimensional textures to three-dimensional models, as provided in the embodiments of this application. Figure 9 A schematic diagram of the functional modules of a mapping device between a two-dimensional texture and a three-dimensional model provided in an embodiment of this application; Figure 10 This is a schematic diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0021] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0022] In the description of this application, it should be noted that if the terms "upper", "lower", etc. appear to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship that the product of this application is usually placed in, it is only for the convenience of describing this application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0023] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.
[0025] To achieve fast and high-precision texture mapping, embodiments of this application provide a mapping system for two-dimensional textures and three-dimensional models. Figure 1 This is a schematic diagram of a mapping system between two-dimensional textures and three-dimensional models provided in an embodiment of this application, as shown below. Figure 1 As shown, the system includes: a tracker, a motion structure, a data acquisition device with target point modules, and a rotating platform with target point modules, the rotating platform being used to place the target object.
[0026] The acquisition equipment includes: a 3D scanning device or a texture acquisition device. For example, the 3D scanning device can be a laser 3D scanner or a structured light scanner, used to acquire detailed 3D geometric information of the target object, obtaining a detailed, texture-free 3D model of the target object. The texture acquisition device can be a color texture camera, used to acquire texture images of the target object, obtaining a texture image of the target object.
[0027] The target point module is a rigidly combined set of marker points, where the coordinates of the center of each marker point are known. The target point module can be combined with acquisition devices in a modular fashion to create acquisition devices incorporating the target point module, such as 3D scanning devices and texture acquisition devices. A tracker is used to track the target points and obtain their coordinates in the tracker's coordinate system.
[0028] The system also includes a computer device used to acquire data from the acquisition device and tracker, and to perform texture mapping. The mapping method between two-dimensional textures and three-dimensional models provided in this application will be explained in detail below with reference to the accompanying drawings and specific examples. Figure 2 This is one of the flowcharts illustrating a method for mapping two-dimensional textures to three-dimensional models provided in an embodiment of this application; such as... Figure 2 As shown, the method includes: S101. Obtain the textureless 3D model, rough model, and multiple texture images corresponding to the rough model of the target object, as well as the pose parameters of the texture images.
[0029] The preliminary model is a 3D model obtained by scanning the target object placed on a rotating platform using a 3D scanning device at the target workstation, and the texture image is a texture image obtained by scanning the target object using a texture acquisition device at the target workstation.
[0030] In this embodiment, a mapping system between two-dimensional textures and three-dimensional models is deployed at another workstation. The operator uses a three-dimensional scanning device to perform a comprehensive and detailed scan of the target object according to a preset scanning path. After removing scanning noise and filling tiny holes through the data processing module built into the three-dimensional scanning device, a high-precision three-dimensional model M_a without texture is obtained. Its coordinate system, i.e., the model coordinate system of the textureless three-dimensional model, is P_Ma. This coordinate system is determined by the factory calibration of the three-dimensional scanning device. There are no specific requirements for its coordinate system in this invention.
[0031] A mapping system between 2D textures and 3D models is also deployed at the target workstation, fixing the target object to an anti-slip rubber pad at the center of the rotating platform to ensure no displacement of the target object during rotation. The target point module can be fixed at a diagonal position on the outer shell of the 3D scanning equipment. During scanning, the tracker tracks the target points on the 3D scanning equipment in real time, and the 3D scanning equipment simultaneously acquires the 3D model data of the target object, quickly generating a preliminary model.
[0032] The target workstation is simultaneously equipped with a texture acquisition device, and the target point module can also be fixed at a diagonal position on the outer shell of the texture acquisition device. During the rotation of the turntable, the texture acquisition device and the turntable maintain synchronous linkage to capture multiple texture images, ensuring that multiple texture images can cover different areas of the target object without obvious blind spots.
[0033] S102. Obtain the first transformation relationship between the coordinate system of the target point on the rotating platform and the coordinate system of the target point on the three-dimensional scanning device.
[0034] S103. Obtain the second transformation relationship between the texture acquisition device and the coordinate system of the turntable target point.
[0035] Specifically, a first transformation relationship is pre-generated between the coordinate system of the 3D scanning device and the target point on the rotating platform, and a second transformation relationship is generated between the texture acquisition device and the coordinate system of the target point on the rotating platform.
[0036] S104. According to the first transformation relationship, the preliminary model is transformed from the device coordinate system of the 3D scanning device to the target point coordinate system of the turntable to obtain the transformed preliminary model.
[0037] Specifically, the coordinates of each vertex in the preliminary model are stored as a three-dimensional vector. For each vertex coordinate, a transformation is performed using the first transformation relation to convert the vertex coordinates to the turntable target point coordinate system P_turtable. After traversing all vertices and completing the transformation, the transformed preliminary model M_b is obtained.
[0038] S105. According to the second transformation relationship, the pose parameters of the texture image are transformed from the device coordinate system of the texture acquisition device to the target point coordinate system of the turntable to obtain the pose parameters of the transformed texture image.
[0039] Specifically, each texture image contains intrinsic and extrinsic parameters. First, based on the camera's intrinsic parameters, the image pixel coordinates are converted into a 3D ray direction vector in the camera coordinate system. Then, using a second transformation relationship, this ray direction vector is transformed into the turntable target point coordinate system P_turtable. Simultaneously, based on the camera's pose data during shooting, the pose parameters of the image in the turntable target point coordinate system P_turtable, namely the position parameters and attitude parameters, are calculated. Finally, the pose parameters P0_2dcamera of the transformed texture image are formed.
[0040] S106. Register the textureless 3D model and the converted rough model to obtain the third transformation relationship between the converted rough model and the textureless 3D model.
[0041] Specifically, due to the presence of several obvious structural features on the surface of the target object, a feature-based automatic registration algorithm is employed. First, feature points are extracted from both the textureless 3D model M_a and the transformed rough model M_b, yielding key feature points. Then, descriptor matching of these feature points automatically identifies corresponding feature points. Finally, an iterative nearest-point algorithm is used for fine registration. After registration, a third transformation relationship, Transform_MbToMa, is obtained. This third transformation relationship enables the conversion of coordinates from the turntable target point coordinate system to the model coordinate system P_Ma of the textureless 3D model.
[0042] S107. According to the third transformation relationship, the pose parameters of the transformed texture image are transformed from the coordinate system of the turntable target point to the model coordinate system of the textureless 3D model to obtain the pose parameters of the target texture image.
[0043] Specifically, for each transformed texture image, its pose parameters—that is, its position and orientation parameters in the turntable target coordinate system P_turtable—are transformed using the third transformation relation Transform_MbToMa. For example, if the pose matrix of a texture image in P_turtable is Posetur, then by matrix multiplication PoseMa = Transform_MbToMa × Posetur, we obtain the pose matrix PoseMa of the image in the model coordinates P_Ma of the textureless 3D model. Simultaneously, the same transformation is performed on the spatial ray direction vectors corresponding to the pixel coordinates of the texture image, ensuring that each pixel of the texture image accurately corresponds to the surface position of the textureless 3D model, ultimately yielding the pose parameters of the target texture image. At this point, both the pose parameters of the target texture image and the textureless 3D model are located in the model coordinates P_Ma of the textureless 3D model, achieving the mapping between the 2D texture and the 3D model.
[0044] It should be noted that if there are occluded areas when acquiring the rough model of the target object, for example, if the bottom of the target object is in contact with the rotating platform, the rough model does not contain bottom data, and the texture image does not contain bottom texture image. In this case, the target object is flipped so that the occluded area can be acquired. Then, the rough model of the target object after flipping and the corresponding multiple texture images are acquired again. The above operation is repeated, and the pose parameters of the texture images after flipping are also converted to the P_Ma coordinate system until the data acquisition of all surfaces is completed.
[0045] In summary, this application provides a method for mapping two-dimensional textures to three-dimensional models, including: acquiring a textureless three-dimensional model of a target object, a rough model, and multiple texture images corresponding to the rough model, as well as the pose parameters of the texture images. The rough model is a three-dimensional model obtained by a three-dimensional scanning device at the target workstation scanning the target object placed on a rotating platform; the texture images are texture images obtained by a texture acquisition device at the target workstation scanning the target object; a first transformation relationship is obtained between the coordinate system of the three-dimensional scanning device and the coordinate system of the target point on the rotating platform; and a second transformation relationship is obtained between the coordinate system of the texture acquisition device and the coordinate system of the target point on the rotating platform. According to the first transformation relationship, the rough model is transformed from the device coordinate system of the 3D scanning device to the target point coordinate system of the turntable to obtain the transformed rough model. According to the second transformation relationship, the pose parameters of the texture image are transformed from the device coordinate system of the texture acquisition device to the target point coordinate system of the turntable to obtain the pose parameters of the transformed texture image. The textureless 3D model and the transformed rough model are registered to obtain the third transformation relationship between the transformed rough model and the textureless 3D model. According to the third transformation relationship, the pose parameters of the transformed texture image are transformed from the target point coordinate system of the turntable to the model coordinate system of the textureless 3D model to obtain the pose parameters of the target texture image.
[0046] The method in this application achieves accurate mapping of texture data to the model coordinate system of a textureless 3D model through multi-coordinate system transformation and model registration. This eliminates the reliance on manual point selection in traditional methods, significantly improving the efficiency of mapping 2D textures to 3D models. At the same time, the standardized coordinate transformation and registration process ensures the stability of mapping accuracy, effectively solving the mapping problem of objects without obvious feature points, and providing an efficient and feasible solution for high-fidelity 3D reconstruction of a large number of objects.
[0047] Based on the above embodiments, this application also provides another possible implementation of the mapping method between two-dimensional textures and three-dimensional models. Figure 3 This is a second flowchart illustrating a method for mapping two-dimensional textures to three-dimensional models, as provided in an embodiment of this application. Figure 3 As shown, the first transformation relationship between the coordinate system of the 3D scanning device and the coordinate system of the target point on the rotating platform is obtained, including: S201. Obtain the first device relationship between the first device target point coordinate system and the device coordinate system of the 3D scanning device.
[0048] In this embodiment, the 3D scanning device can be a structured light scanner. For example, its target points are multiple circular marker points (target point modules) fixed diagonally on the scanner housing. The first device target point coordinate system P_marker1 has its origin at the geometric center of the multiple target points. The X-axis connects two opposite target points, the Y-axis is perpendicular to the X-axis and lies in the plane where the target points are located, and the Z-axis is perpendicular to the plane. The first device relationship Transform_3dcameraTomarker1 is obtained through a device relationship calibration process.
[0049] S202. Obtain the second device relationship between the first device target point coordinate system and the tracker coordinate system of the tracker.
[0050] Specifically, the second device relationship Transform_marker1Totracker is obtained between the first device target point coordinate system P_marker1 and the tracker coordinate system P_tracker of the tracker.
[0051] S203. Obtain the third device relationship between the tracker coordinate system and the turntable target point coordinate system.
[0052] For example, firstly, the coordinates of multiple turntable target points in the turntable target point coordinate system P_turtable are measured and obtained as a set of coordinates C_markers2; then, these multiple target points are tracked by a tracker to obtain their coordinates in the tracker coordinate system P_tracker as a set of coordinates T_markers2; using an absolute orientation algorithm, the third device relationship Transform_trackerToturtable is calculated based on the coordinates C_markers2 and T_markers2.
[0053] S204. Based on the first equipment relationship, the second equipment relationship, and the third equipment relationship, the first conversion relationship is obtained.
[0054] Specifically, the first transformation relationship Transform_3dcameraToturtable is the product of the first device relationship, the second device relationship, and the third device relationship in sequence, expressed as: Transform_3dcameraToturtable = Transform_3dcameraTomarker1 × Transform_marker1Totracker × Transform_trackerToturtable.
[0055] Then, according to the first transformation relationship Transform_3dcameraToturtable, the coordinates of each vertex of the rough model are transformed from the device coordinate system P_3dcamera of the 3D scanning device to the target point coordinate system P_turtable of the turntable, thus obtaining the transformed rough model.
[0056] The method provided in this application constructs a clear coordinate transformation link by splitting the three-layer relationship between the device target point and its own coordinate system, the target point and the tracker coordinate system, and the tracker and the turntable target point coordinate system. This allows for precise association between the 3D scanning device and the turntable target point coordinate system without modification. It ensures high accuracy of the transformation relationship, demonstrates the flexibility of modular combination, avoids performance loss caused by device integration, and ensures that the rough model acquired by the 3D scanning device can be accurately connected to the turntable target point coordinate system, laying a solid foundation for subsequent registration with texture data.
[0057] This application also provides another possible implementation of the mapping method between two-dimensional textures and three-dimensional models. Figure 4 This is the third flowchart illustrating a method for mapping two-dimensional textures to three-dimensional models, as provided in this application embodiment; Figure 4 As shown, the first device relationship between the first device target point coordinate system and the device coordinate system of the 3D scanning device is obtained, including: S301. Use a tracker to obtain the coordinates of the calibration target point on the calibration plate in the tracker coordinate system, and the coordinates of the device target point on the 3D scanning device in the tracker coordinate system.
[0058] In this embodiment, the calibration plate is a square or rectangular plate with a target point array printed on its surface. Adjacent target points are spaced at a preset distance, and the target points are black circles. The device target points on the 3D scanning equipment are red circles.
[0059] The calibration board is then fixed on the optical platform, ensuring its plane is perpendicular to the ground. The 3D scanning device is placed in front of the calibration board, and its orientation is adjusted so that the target points on the 3D scanning device are completely within the tracker's field of view. The tracker is then activated to simultaneously capture images of the calibration board and the target points on the 3D scanning device. Using the tracker's built-in coordinate calculation software, the coordinates of each target point on the calibration board in the tracker's coordinate system P_tracker are obtained, as are the coordinates of the target points on the 3D scanning device in the P_tracker coordinate system.
[0060] S302. Based on the coordinates of the calibration target point and the coordinates of the device target point on the 3D scanning device, determine the fourth device relationship between the first device target point coordinate system and the calibration plate coordinate system.
[0061] Among them, the calibration board coordinate system takes the target point at the lower left corner of the calibration board as the origin, the X-axis is horizontal to the right along the calibration board, the Y-axis is vertical to the upward along the calibration board, and the Z-axis is perpendicular to the plane of the calibration board and outward; the first equipment target point coordinate system P_marker1 takes the geometric center of multiple equipment target points as the origin.
[0062] First, based on the known spacing of the target points on the calibration board, a calibration board coordinate system P_calib is established, and the theoretical coordinates of each calibration target point under P_calib are determined. Then, from the coordinate data collected by the tracker, uniformly distributed target points on the calibration board are selected, and their actual coordinates under P_tracker are extracted. The transformation relationship between P_calib and P_tracker, Transform_calibTotracker, is obtained through least squares fitting. At the same time, the coordinates of the device target points on the 3D scanning device under P_tracker are extracted. Combined with the definition of P_marker1, the theoretical coordinates C_markers1 of the device target points on the 3D scanning device under P_marker1 are calculated. Finally, through the absolute orientation algorithm, based on the actual coordinates of the device target points on the 3D scanning device under P_tracker and the theoretical coordinates under P_marker1, combined with Transform_calibTotracker, the fourth device relationship Transform_marker1Tocalib is derived.
[0063] S303. Based on the fourth device relationship, the device target point on the 3D scanning device is transformed from the coordinate system of the first device target point to the coordinate system of the calibration plate to obtain the transformed device target point on the 3D scanning device.
[0064] The coordinates of each target point on the 3D scanning device are transformed using the fourth device relation, Transform_marker1Tocalib. For example, the coordinates of one target point on the 3D scanning device are multiplied by Transform_marker1Tocalib to obtain the transformed coordinates; similarly, the transformation of other target points on the 3D scanning device is completed to obtain the transformed set of target point coordinates on the 3D scanning device.
[0065] S304. Use a 3D scanning device to obtain the coordinates of the calibration target points on the calibration board, and determine the pose of the 3D scanning device in the calibration board coordinate system.
[0066] Specifically, the 3D scanning equipment is activated to scan the calibration board. The 3D scanning equipment automatically identifies the target point array on the calibration board, extracts the center coordinates of each target point, and obtains the coordinate data of the target point in the equipment coordinate system P_3dcamera of the 3D scanning equipment. Combined with the theoretical coordinates of the target points on the calibration board in P_calib, the pose data of the 3D scanning equipment in the calibration board coordinate system P_calib is calculated by matching the coordinates of multiple target points with the same name.
[0067] S305. Determine the first device relationship based on the pose of the 3D scanning device in the calibration plate coordinate system and the device target point on the 3D scanning device after conversion.
[0068] Given the pose of the 3D scanning device in P_calib, the transformation relationship from P_3dcamera to P_calib can be obtained: Transform_3dcameraTocalib. Simultaneously, the coordinates of the device target point on the 3D scanning device in P_calib after the transformation are known, and the theoretical coordinates of the device target point on the 3D scanning device in P_marker1, C_markers1, are also known. Therefore, the transformation relationship from P_marker1 to P_calib can be obtained: Transform_marker1Tocalib.
[0069] Then the first device relationship is Transform_3dcameraTomarker1 = Transform_3dcameraTocalib × Transform_marker1Tocalib.
[0070] In the method provided in this application embodiment, a calibration plate is used as an intermediate reference. Combined with bidirectional data acquisition from the tracker and the 3D scanning device, the transformation relationship between the coordinate system of the 3D scanning device and its own target point is accurately solved. This method is not limited by the type of equipment and is compatible with various existing 3D scanning devices. The calibration process is efficient and the error is controllable. It effectively solves the problem of coordinate association between the equipment and the target point module in the modular combination and provides a high-precision basic transformation basis for subsequent multi-coordinate system serialization.
[0071] This application also provides another possible implementation of the mapping method between two-dimensional textures and three-dimensional models. Figure 5 This is the fourth flowchart illustrating a method for mapping two-dimensional textures to three-dimensional models, as provided in this application embodiment; Figure 5 As shown, obtaining the second device relationship between the first device target point coordinate system and the tracker coordinate system of the tracker includes: S401. Obtain the first target point coordinate group in the first device target point coordinate system and the second target point coordinate group in the tracker coordinate system.
[0072] S402. Determine the relationship of the second device based on the coordinates of the first target point and the coordinates of the second target point.
[0073] In this embodiment, the relative positions of multiple target points are first measured using a high-precision measuring tool, and their first target point coordinate set C_markers1 under P_marker1 is calculated. This coordinate set contains known fixed values. Then, the 3D scanning device is placed within the effective tracking range of the tracker, and the device's attitude is adjusted so that multiple target points can be clearly captured by the tracker. The tracker is then activated to continuously track and capture multiple target points, determining the coordinates of each target point under the tracker's coordinate system P_tracker, thus obtaining the second target point coordinate set T_markers1.
[0074] An absolute orientation algorithm is used to solve the transformation relationship, which minimizes the transformation error between the two sets of coordinates. The first target point coordinate set C_markers1 and the second target point coordinate set T_markers1 are input into the algorithm. The homogeneous transformation matrix of the second device relationship, i.e., Transform_marker1Totracker, is finally obtained.
[0075] The method provided in this application quickly determines the transformation relationship between the target point and the tracker by obtaining two sets of coordinates in the target point's own coordinate system and the tracker's coordinate system. The process is simple and efficient. The transformation accuracy depends on the rigid combination characteristics of the target point and the positioning accuracy of the tracker. It is highly stable and realizes the precise linkage between the target point and the tracker of the 3D scanning device, providing a reliable guarantee for the smooth transmission of the coordinate transformation link.
[0076] This application also provides another possible implementation of the mapping method between two-dimensional textures and three-dimensional models. Figure 6 This is the fifth flowchart illustrating a method for mapping two-dimensional textures to three-dimensional models, as provided in the embodiments of this application; Figure 6 As shown, the second transformation relationship between the texture acquisition device and the turntable target point coordinate system is obtained, including: S501. Obtain the fifth device relationship between the second device target point coordinate system and the device coordinate system of the texture acquisition device.
[0077] In this embodiment, the device target points are, for example, multiple circular marker points (target point modules) fixed diagonally on the outer shell of the texture acquisition device. The second device target point coordinate system P_marker2 takes the geometric center of the multiple target points as its origin. The fifth device relationship Transform_2dcameraTomarker2 is obtained through the device relationship calibration process.
[0078] S502. Obtain the sixth device relationship between the second device target point coordinate system and the tracker coordinate system of the tracker.
[0079] Specifically, the second device relationship Transform_marker2Totracker is obtained between the second device target point coordinate system P_marker2 and the tracker coordinate system P_tracker.
[0080] S503. Based on the fifth equipment relationship, the sixth equipment relationship, and the third equipment relationship, the second conversion relationship is obtained.
[0081] Specifically, the second transformation relationship Transform_2dcameraToturtable is the product of the fifth device relationship, the sixth device relationship, and the third device relationship in sequence, expressed as: Transform_2dcameraToturtable = Transform_2dcameraTomarker2 × Transform_marker2Totracker × Transform_trackerToturtable.
[0082] Then, according to the second transformation relationship Transform_2dcameraToturtable, the pose parameters of the texture image are transformed from the device coordinate system P_2dcamera of the texture acquisition device to the target point coordinate system P_turtable of the turntable, so as to obtain the pose parameters of the transformed texture image.
[0083] The method provided in this application follows the idea of constructing a coordinate transformation link in layers. It establishes an association between the texture acquisition device and the coordinate system of the turntable target point, adapting to the modular combination requirements of various texture acquisition devices. Without changing the original performance and working mode of the texture acquisition device, it can realize the transformation of the acquired texture data to the coordinate system of the turntable target point. This not only ensures the quality of texture data acquisition, but also ensures the consistency of its coordinates with the preliminary model, providing key support for the accuracy of subsequent texture mapping.
[0084] This application also provides another possible implementation of the mapping method between two-dimensional textures and three-dimensional models. Figure 7 A flowchart illustrating a method for mapping two-dimensional textures to three-dimensional models, as provided in this application embodiment, is shown in Figure 6. Figure 7 As shown, the fifth device relationship between the second device target point coordinate system and the device coordinate system of the texture acquisition device is obtained, including: S601. Use a tracker to obtain the coordinates of the calibration target points on the calibration board in the tracker coordinate system, and the coordinates of the device target points on the texture acquisition device in the tracker coordinate system.
[0085] In this embodiment, the calibration plate is a square or rectangular plate with a target point array printed on its surface. Adjacent target points are spaced at a preset distance, and the target points are black circles. The device target points on the texture acquisition device are red circles.
[0086] The calibration board is then fixed on the optical platform, ensuring its plane is perpendicular to the ground. The texture acquisition device is placed in front of the calibration board, and its orientation is adjusted so that the target points on the texture acquisition device are completely within the tracker's field of view. The tracker is then activated to simultaneously capture images of the calibration board and the target points on the texture acquisition device. Using the tracker's built-in coordinate calculation software, the coordinates of each target point on the calibration board in the tracker's coordinate system P_tracker are obtained, as are the coordinates of the target points on the texture acquisition device in the P_tracker coordinate system.
[0087] S602. Based on the coordinates of the calibration target point and the coordinates of the target point on the texture acquisition device, determine the seventh device relationship between the second device target point coordinate system and the calibration board coordinate system.
[0088] Among them, the calibration board coordinate system takes the target point at the lower left corner of the calibration board as the origin, the X-axis is horizontal to the right along the calibration board, the Y-axis is vertical to the upward along the calibration board, and the Z-axis is perpendicular to the plane of the calibration board and outward; the second equipment target point coordinate system P_marker2 takes the geometric center of multiple equipment target points as the origin.
[0089] First, based on the known spacing of the target points on the calibration board, a calibration board coordinate system P_calib is established, and the theoretical coordinates of each calibration target point under P_calib are determined. Then, from the coordinate data collected by the tracker, uniformly distributed target points on the calibration board are selected, and their actual coordinates under P_tracker are extracted. The transformation relationship between P_calib and P_tracker, Transform_calibTotracker, is obtained through least squares fitting. At the same time, the coordinates of the device target points on the texture acquisition device under P_tracker are extracted. Combined with the definition of P_marker2, the theoretical coordinates C_markers3 of the device target points on the texture acquisition device under P_marker2 are calculated. Finally, through the absolute orientation algorithm, based on the actual coordinates of the device target points on the texture acquisition device under P_tracker and the theoretical coordinates under P_marker2, combined with Transform_calibTotracker, the seventh device relationship Transform_marker2Tocalib is derived.
[0090] S603. Based on the seventh device relationship, transform the target point of the texture acquisition device from the coordinate system of the second device target point to the coordinate system of the calibration board to obtain the transformed target point of the texture acquisition device.
[0091] The coordinates of each device target point on the texture acquisition device are transformed using the seventh device relation, Transform_marker1Tocalib. For example, the coordinates of one device target point on the texture acquisition device are multiplied by Transform_marker1Tocalib to obtain the transformed coordinates; similarly, the transformation of other target points on the texture acquisition device is completed to obtain the transformed set of device target point coordinates on the texture acquisition device.
[0092] S604. Use a texture acquisition device to obtain the coordinates of the calibration target points on the calibration board, and determine the pose of the texture acquisition device in the coordinate system of the calibration board.
[0093] Specifically, the texture acquisition device is activated to scan the calibration board. The device automatically identifies the target point array on the calibration board, extracts the center coordinates of each target point, and obtains the coordinate data of the target point in the device coordinate system P_2dcamera. Combined with the theoretical coordinates of the target points on the calibration board in P_calib, the pose data of the texture acquisition device in the calibration board coordinate system P_calib is calculated by matching the coordinates of multiple target points with the same name.
[0094] S605. Determine the fifth device relationship based on the pose of the texture acquisition device in the calibration board coordinate system and the device target point on the transformed texture acquisition device.
[0095] Given the pose of the texture acquisition device in P_calib, the transformation relationship from P_2dcamera to P_calib can be obtained: Transform_2dcamera Tocalib. Simultaneously, the coordinates of the device target point on the transformed texture acquisition device in P_calib are known, and the theoretical coordinates of the device target point on the texture acquisition device in P_marker2, C_markers3, are also known. Therefore, the transformation relationship from P_marker2 to P_calib can be obtained: Transform_marker2Tocalib.
[0096] Then the fifth device relationship is Transform_2dcameraTomarker2 = Transform_2dcameraTocalib × Transform_marker2Tocalib.
[0097] The method provided in this application adopts the core logic consistent with the target point calibration of the 3D scanning device. With the calibration board as the intermediate reference, the precise association between the texture acquisition device and its own target point coordinate system is achieved through bidirectional acquisition and data fitting. The calibration process has a high degree of automation and small error, effectively solving the coordinate matching problem between the texture acquisition device and the target point module, and ensuring that the texture data can be accessed through the target point module into a unified coordinate system.
[0098] This application also provides another possible implementation of the mapping method between two-dimensional textures and three-dimensional models. Figure 8 This is the seventh flowchart illustrating a method for mapping two-dimensional textures to three-dimensional models, as provided in this application embodiment; Figure 8 As shown, the sixth device relationship between the second device target point coordinate system and the tracker coordinate system of the tracker is obtained, including: S701. Obtain the coordinates of the third target point in the second device target point coordinate system and the coordinates of the fourth target point in the tracker coordinate system.
[0099] S702. Determine the relationship of the sixth device based on the coordinates of the third and fourth target points.
[0100] In this embodiment, the relative positions of multiple device target points are first measured using a high-precision measuring tool, and their coordinates in the third target point coordinate group C_markers3 under P_marker2 are calculated. This coordinate group has known fixed values. Then, the texture acquisition device is placed within the effective tracking range of the tracker, and the device posture is adjusted so that multiple target points can be clearly captured by the tracker. The tracker is then started to continuously track and capture multiple target points, and the coordinates of each target point in the tracker coordinate system P_tracker are determined, resulting in the fourth target point coordinate group T_markers3.
[0101] An absolute orientation algorithm is used to solve the transformation relationship, which minimizes the transformation error between the two sets of coordinates. The coordinate sets C_markers3 (third target point) and T_markers3 (fourth target point) are input into the algorithm. The resulting homogeneous transformation matrix for the sixth device relationship, i.e., Transform_marker2Totracker, is then obtained.
[0102] The method provided in this application embodiment directly obtains the coordinate set of the target point of the texture acquisition device in its own coordinate system and the tracker coordinate system, and quickly solves the transformation relationship, realizing the precise docking of the target point of the texture acquisition device and the tracker, ensuring the integrity and accuracy of the texture data coordinate transformation link, and providing a reliable guarantee for the same coordinate system association of texture data and preliminary model.
[0103] This application also provides another possible implementation of a method for mapping two-dimensional textures to three-dimensional models. This method further includes: Based on the pose parameters of the target texture image and the textureless 3D model, generate a textured 3D model of the target object.
[0104] In this embodiment, the pose parameters of the target texture image are first preprocessed: image noise is removed (using a median filtering algorithm), color deviation is corrected (color calibration is performed based on a standard color chart), and distortion is corrected (distortion correction is performed on the image using calibrated camera intrinsic parameters). Then, a texture mapping algorithm is used to accurately map the preprocessed texture map onto the surface of the textureless 3D model M_a according to the pose parameters of the target texture image: for each triangular facet on the model surface, the corresponding texture image pixel is found based on its position and normal vector in the P_Ma coordinate system, the pixel color value is calculated and assigned to the vertex of the triangular facet; the texture transition effect is optimized through a bilinear interpolation algorithm to avoid texture stretching or distortion.
[0105] Finally, post-processing of the model is performed: removing texture seams (using feathering algorithm to process the splicing area), optimizing lighting effects (adding ambient light and diffuse light to simulate real lighting), and finally generating a textured 3D model of the target object, which can realistically reproduce the shape and surface texture details of the target object.
[0106] The following will continue to explain the mapping device and computer equipment for two-dimensional textures and three-dimensional models provided in any of the above embodiments of this application. The specific implementation process and the resulting technical effects are the same as those in the corresponding method embodiments. For the sake of brevity, the parts not mentioned in this embodiment can be referred to the corresponding content in the method embodiment.
[0107] Figure 9 This is a functional module diagram of a mapping device between a two-dimensional texture and a three-dimensional model, provided in an embodiment of this application. Figure 9 As shown, the mapping device 100 between the two-dimensional texture and the three-dimensional model includes: The acquisition module 110 is used to acquire the textureless 3D model of the target object, the rough model, and multiple texture images corresponding to the rough model, as well as the pose parameters of the texture images; wherein, the rough model is a 3D model obtained by the 3D scanning device at the target station scanning the target object placed on the rotating platform, and the texture images are texture images obtained by the texture acquisition device at the target station scanning the target object. The acquisition module 110 is also used to acquire the first transformation relationship between the coordinate system of the target point on the three-dimensional scanning device and the target point on the rotating platform; The acquisition module 110 is also used to acquire the second transformation relationship between the texture acquisition device and the coordinate system of the turntable target point; The conversion module 120 is used to convert the rough model from the device coordinate system of the 3D scanning device to the target point coordinate system of the turntable according to the first conversion relationship, so as to obtain the converted rough model. The conversion module 120 is also used to convert the pose parameters of the texture image from the device coordinate system of the texture acquisition device to the target point coordinate system of the turntable according to the second conversion relationship, so as to obtain the pose parameters of the converted texture image. Registration module 130 is used to register the textureless 3D model and the converted rough model to obtain the third conversion relationship between the converted rough model and the textureless 3D model. The conversion module 120 is also used to convert the pose parameters of the converted texture image from the turntable target point coordinate system to the model coordinate system of the textureless 3D model according to the third conversion relationship, so as to obtain the pose parameters of the target texture image.
[0108] Optionally, the acquisition module 110 is further configured to acquire a first device relationship between the first device target point coordinate system and the device coordinate system of the 3D scanning device; acquire a second device relationship between the first device target point coordinate system and the tracker coordinate system of the tracker; acquire a third device relationship between the tracker coordinate system and the turntable target point coordinate system; and obtain a first transformation relationship based on the first device relationship, the second device relationship and the third device relationship.
[0109] Optionally, the acquisition module 110 is further configured to: acquire the coordinates of the calibration target point on the calibration plate in the tracker coordinate system and the coordinates of the device target point on the 3D scanning device in the tracker coordinate system; determine a fourth device relationship between the first device target point coordinate system and the calibration plate coordinate system based on the coordinates of the calibration target point and the coordinates of the device target point on the 3D scanning device; transform the device target point on the 3D scanning device from the first device target point coordinate system to the calibration plate coordinate system based on the fourth device relationship to obtain the transformed device target point on the 3D scanning device; acquire the coordinates of the calibration target point on the calibration plate using the 3D scanning device and determine the pose of the 3D scanning device in the calibration plate coordinate system; and determine the first device relationship based on the pose of the 3D scanning device in the calibration plate coordinate system and the transformed device target point on the 3D scanning device.
[0110] Optionally, the acquisition module 110 is further configured to acquire a first target point coordinate group in the first device target point coordinate system and a second target point coordinate group in the tracker coordinate system; and determine the second device relationship based on the first target point coordinate group and the second target point coordinate group.
[0111] Optionally, the acquisition module 110 is further configured to acquire a fifth device relationship between the second device target point coordinate system and the device coordinate system of the texture acquisition device; acquire a sixth device relationship between the second device target point coordinate system and the tracker coordinate system of the tracker; and obtain a second transformation relationship based on the fifth device relationship, the sixth device relationship and the third device relationship.
[0112] Optionally, the acquisition module 110 is further configured to: acquire the coordinates of the calibration target point on the calibration board in the tracker coordinate system and the coordinates of the device target point on the texture acquisition device in the tracker coordinate system; determine the seventh device relationship between the second device target point coordinate system and the calibration board coordinate system based on the coordinates of the calibration target point and the coordinates of the device target point on the texture acquisition device; transform the device target point on the texture acquisition device from the second device target point coordinate system to the calibration board coordinate system based on the seventh device relationship to obtain the transformed device target point on the texture acquisition device; acquire the coordinates of the calibration target point on the calibration board using the texture acquisition device and determine the pose of the texture acquisition device in the calibration board coordinate system; and determine the fifth device relationship based on the pose of the texture acquisition device in the calibration board coordinate system and the transformed device target point on the texture acquisition device.
[0113] Optionally, the acquisition module 110 is further configured to acquire the third target point coordinate group under the second device target point coordinate system and the fourth target point coordinate group under the tracker coordinate system; and determine the relationship of the sixth device based on the third target point coordinate group and the fourth target point coordinate group.
[0114] Optionally, the device further includes: The generation module is used to generate a textured 3D model of the target object based on the pose parameters of the target texture image and the textureless 3D model.
[0115] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0116] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0117] Figure 10 This is a schematic diagram of a computer device provided in an embodiment of this application. This computer device can be used for mapping two-dimensional textures to three-dimensional models. Figure 10 As shown, the computer device includes: a processor 210, a storage medium 220, and a bus 230.
[0118] Storage medium 220 stores machine-readable instructions executable by processor 210. When the computer device is running, processor 210 communicates with storage medium 220 via bus 230, and processor 210 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation and technical effects are similar, and will not be described again here.
[0119] Optionally, this application also provides a storage medium 220, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the above-described method embodiments. The specific implementation and technical effects are similar, and will not be repeated here.
[0120] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0121] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0122] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0123] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0124] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method of mapping two-dimensional textures to three-dimensional models, the method comprising: include: A textureless 3D model of the target object, a rough model, and multiple texture images corresponding to the rough model, as well as the pose parameters of the texture images, are obtained; wherein, the rough model is a 3D model obtained by scanning the target object placed on a rotating platform using a 3D scanning device at the target workstation, and the texture images are texture images obtained by scanning the target object using a texture acquisition device at the target workstation. Obtain the first transformation relationship between the coordinate system of the three-dimensional scanning device and the coordinate system of the target point on the rotating platform; Obtain the second transformation relationship between the texture acquisition device and the coordinate system of the turntable target point; Based on the first transformation relationship, the preliminary model is transformed from the device coordinate system of the 3D scanning device to the target point coordinate system of the turntable to obtain the transformed preliminary model; According to the second transformation relationship, the pose parameters of the texture image are transformed from the device coordinate system of the texture acquisition device to the target point coordinate system of the turntable to obtain the pose parameters of the transformed texture image. The textureless 3D model and the transformed rough model are registered to obtain a third transformation relationship between the transformed rough model and the textureless 3D model; According to the third transformation relationship, the pose parameters of the transformed texture image are transformed from the coordinate system of the turntable target point to the model coordinate system of the textureless 3D model to obtain the pose parameters of the target texture image.
2. The method of claim 1, wherein, The first transformation relationship between the coordinate system of the three-dimensional scanning device and the coordinate system of the target point on the rotating platform includes: Obtain a first device relationship between the first device target point coordinate system of the device target point on the 3D scanning device and the device coordinate system of the 3D scanning device; Obtain the second device relationship between the target point coordinate system of the first device and the tracker coordinate system of the tracker; Obtain the third device relationship between the tracker coordinate system and the turntable target point coordinate system; The first conversion relationship is obtained based on the first device relationship, the second device relationship, and the third device relationship.
3. The method of claim 2, wherein, The first device relationship between the first device target point coordinate system and the device coordinate system of the 3D scanning device for obtaining the device target point on the 3D scanning device includes: The tracker is used to obtain the coordinates of the calibration target point on the calibration plate in the tracker coordinate system, and the coordinates of the device target point on the three-dimensional scanning device in the tracker coordinate system. Based on the coordinates of the calibration target point and the coordinates of the device target point on the 3D scanning device, a fourth device relationship is determined between the first device target point coordinate system and the calibration plate coordinate system. Based on the fourth device relationship, the device target point on the three-dimensional scanning device is transformed from the first device target point coordinate system to the calibration plate coordinate system to obtain the transformed device target point on the three-dimensional scanning device. The coordinates of the calibration target points on the calibration plate are obtained using the three-dimensional scanning device, and the pose of the three-dimensional scanning device in the coordinate system of the calibration plate is determined. The first device relationship is determined based on the pose of the 3D scanning device in the coordinate system of the calibration plate and the device target point on the transformed 3D scanning device.
4. The method of claim 2, wherein, The step of obtaining the second device relationship between the first device target point coordinate system and the tracker coordinate system includes: Obtain the first target point coordinate group in the first device target point coordinate system and the second target point coordinate group in the tracker coordinate system; The second device relationship is determined based on the first target point coordinate group and the second target point coordinate group.
5. The method of claim 2, wherein, The step of obtaining the second transformation relationship between the texture acquisition device and the coordinate system of the turntable target point includes: Obtain the fifth device relationship between the second device target point coordinate system of the device target point on the texture acquisition device and the device coordinate system of the texture acquisition device; Obtain the sixth device relationship between the target point coordinate system of the second device and the tracker coordinate system of the tracker; The second conversion relationship is obtained based on the fifth device relationship, the sixth device relationship, and the third device relationship.
6. The method of claim 5, wherein, The fifth device relationship between the second device target point coordinate system and the device coordinate system of the texture acquisition device, which is used to obtain the device target point on the texture acquisition device, includes: The tracker is used to obtain the coordinates of the calibration target point on the calibration board in the tracker coordinate system, and the coordinates of the device target point on the texture acquisition device in the tracker coordinate system. Based on the coordinates of the calibration target point and the coordinates of the device target point on the texture acquisition device, determine the seventh device relationship between the second device target point coordinate system and the calibration board coordinate system; Based on the seventh device relationship, the device target point on the texture acquisition device is transformed from the coordinate system of the second device target point to the coordinate system of the calibration board to obtain the transformed device target point on the texture acquisition device. The texture acquisition device is used to obtain the coordinates of the calibration target points on the calibration board, and the pose of the texture acquisition device in the coordinate system of the calibration board is determined. The fifth device relationship is determined based on the pose of the texture acquisition device in the calibration board coordinate system and the device target point on the transformed texture acquisition device.
7. The method according to claim 5, characterized in that, The sixth device relationship between the second device target point coordinate system and the tracker coordinate system of the tracker includes: Obtain the third target point coordinate group in the second device target point coordinate system and the fourth target point coordinate group in the tracker coordinate system; The relationship of the sixth device is determined based on the coordinates of the third and fourth target points.
8. The method according to claim 1, characterized in that, The method further includes: Based on the pose parameters of the target texture image and the textureless 3D model, a textured 3D model of the target object is generated.
9. A computer device, characterized in that, include: The computer device includes a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the computer device is running, the processor communicates with the storage medium via the bus. The processor executes the program instructions to perform the steps of the mapping method between a two-dimensional texture and a three-dimensional model as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the steps of the mapping method between two-dimensional textures and three-dimensional models as described in any one of claims 1 to 8.