Texture image processing method, device and electronic equipment

Through point cloud matching and adjustment technology, texture images are adapted to 3D models with different contours, which solves the problem of fitting texture images between different 3D models and achieves accurate fitting effects.

CN114004958BActive Publication Date: 2025-01-21GUANGZHOU HUYA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111286648.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-02
Publication Date
2025-01-21
Estimated Expiration
2041-11-02

AI Technical Summary

Technical Problem

It is difficult for the prior art to directly apply texture images drawn based on one 3D model to other 3D models to achieve accurate fit, especially in scenes where texture fit contour accuracy is required.

Method used

By obtaining the surface point cloud data of the target 3D model and the point cloud data corresponding to the texture image to be processed, point cloud matching processing is performed to determine the matching point pairs, and the texture image is adjusted based on these matching point pairs to achieve the target 3D Accurate fit of the model.

Benefits of technology

The automatic migration of texture images to 3D models with different contours is realized, and accurate fitting is achieved, solving the problem of adapting texture images between different 3D models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114004958B_ABST
    Figure CN114004958B_ABST
Patent Text Reader

Abstract

The present application provides a texture image processing method, device and electronic device, which obtains the first surface point cloud data of the target 3D model, the texture image to be processed and the second surface point cloud data corresponding to the texture image, and performs point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain multiple matching point pairs. Then, the multiple matching point pairs are adjusted, and the texture image is adjusted accordingly according to the adjustment of the matching point pairs. In this way, the texture image can be automatically migrated to a 3D model with different contours and the contour can be accurately fitted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a texture image processing method, device and electronic device. Background Art

[0002] In some 3D special effects synthesis, it is necessary to display the texture image on the surface of the 3D model. For scenes where the accuracy of the texture fitting contour is not high, the texture image can be driven to follow the transformation only according to the 3D model's rotation and translation (RT) matrix. However, for scenes with high requirements for the accuracy of the texture fitting contour, the texture image needs to be displayed on the surface of a 3D model with a more complex contour. In addition to relying on the RT matrix, the texture image also needs to be adjusted according to the 3D model data corresponding to the texture image itself. In this scenario, different texture images may be drawn based on different 3D models, and there are differences in the circumcenter contours between different 3D models. Therefore, a texture image drawn based on a 3D model is usually difficult to directly apply to other 3D models to achieve accurate fitting. Summary of the invention

[0003] In order to overcome the above-mentioned deficiencies in the prior art, one of the purposes of the present application is to provide a texture image processing method, characterized in that the method comprises:

[0004] Acquire first surface point cloud data of a target 3D model, a texture image to be processed, and second surface point cloud data corresponding to the texture image;

[0005] Performing point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain a plurality of matching point pairs; wherein one of the matching point pairs includes a first matching point in the first surface point cloud data and a second matching point in the second surface point cloud data, and the spatial distance between the first matching point and the second matching point is less than a preset distance threshold;

[0006] For each of the matching point pairs, the second matching point in the matching point pair is adjusted to a position of the first matching point corresponding to the second matching point, and the texture image is adjusted according to the adjustment of the second matching point.

[0007] In some possible implementations, the target 3D model is a face model, and the texture image is a face surface texture image;

[0008] Before the step of adjusting, for each of the matching point pairs, the second matching point in the matching point pair to the position of the first matching point corresponding to the second matching point, and adjusting the texture image according to the adjustment of the second matching point, the method further includes:

[0009] Performing 2D expansion on the first surface point cloud data to obtain first point cloud expansion data;

[0010] Performing 2D expansion on the second surface point cloud data to obtain second point cloud expansion data;

[0011] The step of adjusting, for each of the matching point pairs, the second matching point in the matching point pair to the position of the first matching point corresponding to the second matching point, and adjusting the texture image according to the adjustment of the second matching point comprises:

[0012] For each of the matching point pairs, based on the correspondence between the second matching point and the first matching point in the matching point pair, the second matching point in the second point cloud expansion data is adjusted to the position corresponding to the first matching point in the first point cloud expansion data through affine transformation, and the texture image is adjusted based on the adjustment of the second matching point.

[0013] In some possible implementations, the method further includes:

[0014] Determine a preset number of first boundary positioning points of the first point cloud expansion data, and determine the preset number of second boundary positioning points of the second point cloud expansion data;

[0015] The first boundary positioning point and the second boundary positioning point corresponding to positions are determined as a matching point pair.

[0016] In some possible implementations, the method further includes:

[0017] The texture image is displayed on the surface of the target 3D model according to the adjusted texture image and the first point cloud expansion data.

[0018] In some possible implementations, the step of performing point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain a plurality of matching point pairs includes:

[0019] Point cloud matching processing is performed on the first surface point cloud data and the second surface point cloud data by using an iterative closest point algorithm, and a plurality of matching point pairs are determined according to the point cloud matching results.

[0020] In some possible implementations, the step of determining a plurality of matching point pairs according to the point cloud matching result includes:

[0021] For each first candidate point in the first surface point cloud data, check whether there is a second candidate point among the plurality of second candidate points in the second surface point cloud data whose spatial distance with the first candidate point does not exceed the preset distance threshold; if there is a second candidate point, determine the first candidate point as the first matching point, and determine the second candidate point closest to the first matching point as the second matching point corresponding to the first matching point, to obtain a matching point pair consisting of the first matching point and the second matching point;

[0022] or,

[0023] For each second candidate point in the second surface point cloud data, check whether there is a first candidate point whose spatial distance with the second candidate point does not exceed the preset distance threshold among the multiple first candidate points of the first surface point cloud data; if there is, determine the second candidate point as the second matching point, and determine the first candidate point closest to the second matching point as the first matching point corresponding to the second matching point, so as to obtain a matching point pair consisting of the first matching point and the second matching point.

[0024] In some possible implementations, the needle performs point cloud matching processing on the first surface point cloud data and the second surface point cloud data by an iterative closest point algorithm, and determines a plurality of matching point pairs according to the point cloud matching results, including:

[0025] The Warpaffine interface of the OpenCV database is called to adjust the second matching point in each matching point pair to the position of the corresponding first matching point, and the texture image is adjusted according to the adjustment of the second matching point.

[0026] Another object of the present application is to provide a texture image processing device, the device comprising:

[0027] A data acquisition module, used to acquire first surface point cloud data of a target 3D model, a texture image to be processed, and second surface point cloud data corresponding to the texture image;

[0028] A point cloud matching module, configured to perform point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain a plurality of matching point pairs; wherein one matching point pair includes a first matching point in the first surface point cloud data and a second matching point in the second surface point cloud data, and the spatial distance between the first matching point and the second matching point is less than a preset distance threshold;

[0029] The image adjustment module is used to adjust the second matching point in each matching point pair to the position of the first matching point corresponding to the second matching point, and adjust the texture image according to the adjustment of the second matching point.

[0030] Another object of the present application is to provide an electronic device, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by the processor, the texture image processing method provided in the present application is implemented.

[0031] Another object of the present application is to provide a machine-readable storage medium, characterized in that the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by one or more processors, the texture image processing method provided by the present application is implemented.

[0032] Compared with the prior art, this application has the following beneficial effects:

[0033] The texture image processing method, device and electronic device provided in the embodiments of the present application perform point cloud matching between the second surface point cloud data corresponding to the texture image to be processed and the first surface point cloud data of the target 3D model, determine multiple matching point pairs, then adjust the multiple matching point pairs, and adjust the texture image accordingly according to the adjustment of the matching point pairs. In this way, the texture image can be automatically transferred to a 3D model with different contours and accurately fit. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A schematic diagram of a texture image processing method provided in an embodiment of the present application;

[0036] Figure 2 A schematic diagram of a texture image provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of second point cloud expansion data provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of first point cloud expansion data provided in an embodiment of the present application;

[0039] Figure 5A schematic diagram of first surface point cloud data provided in an embodiment of the present application;

[0040] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application;

[0041] Figure 7 A schematic diagram of the functional modules of the texture image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0043] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0044] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0045] In the description of the present application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0046] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0047] See also Figure 1 , Figure 1 A schematic diagram of a texture image processing method provided in this embodiment is shown below. Each step of the method is described in detail below.

[0048] Step S110, obtaining first surface point cloud data of a target 3D (three-dimensional) model, a texture image to be processed, and second surface point cloud data corresponding to the texture image.

[0049] Please refer to Figure 2 The texture image may be a 2D (two-dimensional) plane image, and the second surface point cloud data may be 3D data matching the texture image. The texture image may be displayed in 3D according to the second surface point cloud data. Usually, the texture image may be a 2D image obtained by converting a 3D model after drawing it. When obtaining the texture image, the OBJ format data of the 3D model may be obtained. The second surface point cloud data may be obtained according to the OBJ format data.

[0050] The first surface point cloud data and the second surface point cloud data may have at least a portion of substantially similar external contours. For example, the first surface point cloud data may be 3D point cloud data of a human face or a human head. The texture image may be a texture image of a human face surface, such as skin texture, tattoos, makeup, etc., and the second surface point cloud data may be 3D point cloud data of a human face or a human head. It should be noted that, in some examples, the first surface point cloud data and the second surface point cloud data may also be surface point cloud data of other objects having substantially the same external contours, which are not specifically limited here.

[0051] Step S120, performing point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain a plurality of matching point pairs, wherein one matching point pair includes a first matching point in the first surface point cloud data and a second matching point in the second surface point cloud data, and the spatial distance between the first matching point and the second matching point is less than a preset distance threshold.

[0052] In this embodiment, since the first surface point cloud data and the second surface point cloud data have at least a partially similar external contour, the first surface point cloud data and / or the second surface point cloud data can be rotated, translated and / or pulled up through point cloud matching processing to convert the first surface point cloud data and the second surface point cloud data into the same coordinate system, and make the positions of the first surface point cloud data and the second surface point cloud data with similar external contours overlap or tend to overlap as much as possible.

[0053] After performing the point cloud matching process, some points in the first surface point cloud data may be extremely close to some points in the second surface point cloud data. These points are usually points corresponding to areas with similar outlines in the first surface point cloud data and the second surface point cloud data. For example, points corresponding to the corners of the eyes, auricles, etc. in the 3D point cloud data of the face surface. Therefore, in this embodiment, the first matching point and the second matching point whose spatial distance is less than the preset distance threshold can be respectively selected from the first surface point cloud data and the second surface point cloud data to form a matching point pair, and the image is subsequently adjusted according to each matching point pair.

[0054] Step S130: for each of the matching point pairs, adjust the second matching point in the matching point pair to the position of the first matching point corresponding to the second matching point, and adjust the texture image according to the adjustment of the second matching point.

[0055] In this embodiment, since the first matching point and the second matching point in the matching point pair are the points with the most similar position characteristics in the two point cloud data, adjusting the second matching point to the position of the first matching point can ensure that the overall shape structure of the second surface point cloud data is maintained as much as possible. At the same time, points in the point cloud data are usually associated, especially points with adjacent positions. Therefore, according to the adjustment of the second matching point, other points in the second surface point cloud data are adjusted to adjust the entire texture image, and the texture image can be adjusted to fit the shape contour of the first surface point cloud data while maintaining the original pattern effect of the texture image as much as possible.

[0056] Based on the above design, the texture image processing method provided in this embodiment performs point cloud matching between the second surface point cloud data corresponding to the texture image to be processed and the first surface point cloud data of the target 3D model, determines multiple matching point pairs, then adjusts the multiple matching point pairs, and adjusts the texture image accordingly according to the adjustment of the matching point pairs. In this way, even if the outer contours of the second surface point cloud data corresponding to the texture image and the first surface point cloud data of the target 3D model are different or the number of points in the point cloud is different, the texture image can be automatically migrated to the target 3D model and accurately fit.

[0057] In some possible implementations, in step S120, the first surface point cloud data and the second surface point cloud data can be matched by an iterative closest point (ICP) algorithm, and a plurality of matching point pairs can be determined according to the point cloud matching results. The ICP algorithm can be used to repeatedly and iteratively rotate and translate the two point clouds, and check the distance relationship between the points of the two point clouds until the optimal solution is determined based on the least squares method to make the two point cloud data overlap as much as possible. Optionally, in step S120, the normal iterative closest point (NICP) can be used for point cloud matching.

[0058] Furthermore, in this embodiment, after performing the point cloud matching process, the matching point pairs may be determined according to the result of the point cloud matching.

[0059] Specifically, in one example, for each first candidate point in the first surface point cloud data, it can be checked whether there is a second candidate point among the multiple second candidate points in the second surface point cloud data whose spatial distance with the first candidate point does not exceed the preset distance threshold; if there is, the first candidate point is determined as the first matching point, and the second candidate point closest to the first matching point is determined as the second matching point corresponding to the first matching point, so as to obtain a matching point pair consisting of the first matching point and the second matching point. In this way, the matching point pair can be determined by traversing each point in the first surface point cloud data.

[0060] Alternatively, in another example, for each second candidate point in the second surface point cloud data, it can be checked whether there is a first candidate point among the multiple first candidate points of the first surface point cloud data whose spatial distance with the second candidate point does not exceed the preset distance threshold; if so, the second candidate point is determined as the second matching point, and the first candidate point closest to the second matching point is determined as the first matching point corresponding to the second matching point, to obtain a matching point pair consisting of the first matching point and the second matching point. In this way, the matching point pair can be determined by traversing each point in the second surface point cloud data.

[0061] In some possible implementations, the target 3D model is a face model, and the texture image is a face surface texture image. Before step S130, the first surface point cloud data may be expanded in 2D to obtain first point cloud expansion data. The second surface point cloud data may be expanded in 2D to obtain second point cloud expansion data. The second point cloud expansion data is matched with the texture image. For example, please refer to Figure 2 and Figure 3 ,in, Figure 2 is the texture image, Figure 3 The second point cloud expansion data is obtained by expanding the second surface point cloud data corresponding to the texture image, the number of points in the second point cloud expansion data is the same as the number of points in the second surface point cloud data, and the size of the distribution area of ​​each point in the second point cloud expansion data matches the size of the texture image. Figure 4 , Figure 4 is the first point cloud unfolding data obtained after the first surface point cloud data is unfolded, Figure 4 Each vertex of the triangular facet corresponds to a point in the first surface point cloud data. Since the first surface point cloud data and the second surface point cloud data may have different outlines, the distribution and number of points in the first point cloud data and the second point cloud data after expansion may be different.

[0062] Then, in step S130, for each of the matching point pairs, according to the corresponding relationship between the second matching point and the first matching point in the matching point pair, the second matching point in the second point cloud expansion data can be adjusted to the position corresponding to the first matching point in the first point cloud expansion data through affine transformation, and the texture image can be adjusted according to the adjustment of the second matching point. That is, after the first surface point cloud data and the second surface point cloud data are expanded into 2D data, the affine transformation is performed. Since the second point cloud expansion data matches the texture image, when the position of each point in the second surface point cloud data is adjusted, the texture image will also be adjusted accordingly.

[0063] Optionally, in order to improve the accuracy of the affine transformation, in this embodiment, after the first surface point cloud data and the second surface point cloud data are expanded into the second point cloud expanded data, a preset number of first boundary positioning points of the first point cloud expanded data and a preset number of second boundary positioning points of the second point cloud expanded data may be determined. Then, the first boundary positioning points and the second boundary positioning points corresponding to the positions are determined as a matching point pair.

[0064] For example, the first surface point cloud data and the second surface point cloud data can both be expanded into points distributed in a rectangular plane, and the four vertices of the rectangular plane after the first surface point cloud data is expanded can be used as the first boundary positioning points, and the four vertices of the rectangular plane after the second surface point cloud data is expanded can be used as the second boundary positioning points. Then, the first boundary positioning points and the second boundary positioning points corresponding to the positions are determined as a matching point pair, and these matching point pairs are subjected to affine transformation together with the matching point pairs determined in step S120.

[0065] Specifically, in step S130, the Warpaffine interface of the OpenCV database can be called to adjust the second matching point in each matching point pair to the position of the corresponding first matching point, and the texture image is adjusted accordingly according to the adjustment of the second matching point. That is, the determined matching point pair is used as an input parameter to call the Warpaffine interface to process the texture image. By calling the Warpaffine interface, when the position of the second matching point is adjusted to the position corresponding to the corresponding first matching point, other points in the second surface point cloud data will also be adjusted in position following the corresponding affine matrix.

[0066] In some possible implementations, after the adjustment of the texture image is completed, the texture image can be displayed on the surface of the target 3D model according to the adjusted texture image and the first point cloud expansion data. For example, a 2D triangular facet image can be determined according to the first point cloud expansion data. Figure 5 , a 3D triangular patch image corresponding to the target 3D model can be generated according to the first surface point cloud data. Because each point in the first point cloud expansion data corresponds to each point in the first surface point cloud data, each triangular patch in the triangular patch image determined according to the first point cloud expansion data corresponds to each other one by one. And because the texture image after adjustment matches the size of the first point cloud expansion data, the texture image can be divided into multiple texture blocks by determining the triangular patch image according to the first point cloud expansion data. Based on the correspondence between the triangular patches of the first point cloud expansion data and the first surface point cloud data, the texture blocks can be displayed on the surface of the target 3D model.

[0067] Based on the same inventive concept, this embodiment also provides an implementation Figure 1 The electronic device of the texture image processing method shown. Please refer to Figure 6 , Figure 6 1 is a block diagram of the electronic device 100. The electronic device 100 includes a texture image processing device 110, a machine-readable storage medium 120 and a processor 130.

[0068] The components of the machine-readable storage medium 120 and the processor 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The texture image processing device 110 includes at least one software function module that can be stored in the machine-readable storage medium 120 in the form of software or firmware or solidified in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the machine-readable storage medium 120, such as the software function modules and computer programs included in the texture image processing device 110.

[0069] The machine-readable storage medium 120 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The machine-readable storage medium 120 is used to store a program, and the processor 130 executes the program after receiving an execution instruction.

[0070] The processor 130 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0071] See also Figure 7This embodiment further provides a texture image processing device 110, which includes at least one functional module that can be stored in a machine-readable storage medium 120 in the form of software. From a functional perspective, the texture image processing device 110 may include a data acquisition module 111,

[0072] The data acquisition module 111 is used to acquire first surface point cloud data of a target 3D model, a texture image to be processed, and second surface point cloud data corresponding to the texture image.

[0073] In this embodiment, the data acquisition module 111 can be used to execute Figure 1 As shown in step S110 , for a detailed description of the data acquisition module 111 , please refer to the description of step S110 .

[0074] The point cloud matching module 112 is used to perform point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain multiple matching point pairs; wherein, one matching point pair includes a first matching point in the first surface point cloud data and a second matching point in the second surface point cloud data, and the spatial distance between the first matching point and the second matching point is less than a preset distance threshold.

[0075] In this embodiment, the point cloud matching module 112 can be used to perform Figure 1 As shown in step S120 , for a detailed description of the point cloud matching module 112 , please refer to the description of step S120 .

[0076] The image adjustment module 113 is used to adjust the second matching point in each matching point pair to the position of the first matching point corresponding to the second matching point, and adjust the texture image according to the adjustment of the second matching point.

[0077] In this embodiment, the image adjustment module 113 can be used to perform Figure 1 As shown in step S130 , for a detailed description of the image adjustment module 113 , please refer to the description of step S130 .

[0078] In summary, the texture image processing method, device and electronic device provided in the embodiments of the present application perform point cloud matching between the second surface point cloud data corresponding to the texture image to be processed and the first surface point cloud data of the target 3D model, determine multiple matching point pairs, then adjust the multiple matching point pairs, and adjust the texture image accordingly according to the adjustment of the matching point pairs. In this way, the texture image can be automatically migrated to a 3D model with different contours and the contours can be accurately fitted.

[0079] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0080] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0081] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0082] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0083] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A texture image processing method, characterized in that: The method comprises: Acquire first surface point cloud data of a target 3D model, a texture image to be processed, and second surface point cloud data corresponding to the texture image; the texture image is a 2D plane image; Performing point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain a plurality of matching point pairs; wherein one of the matching point pairs includes a first matching point in the first surface point cloud data and a second matching point in the second surface point cloud data, and the spatial distance between the first matching point and the second matching point is less than a preset distance threshold; For each of the matching point pairs, the second matching point in the matching point pair is adjusted to a position of the first matching point corresponding to the second matching point, and the texture image is adjusted according to the adjustment of the second matching point.

2. The method according to claim 1, characterized in that The target 3D model is a human face model, and the texture image is a human face surface texture image; Before the step of adjusting, for each of the matching point pairs, the second matching point in the matching point pair to the position of the first matching point corresponding to the second matching point, and adjusting the texture image according to the adjustment of the second matching point, the method further includes: Performing 2D expansion on the first surface point cloud data to obtain first point cloud expansion data; Performing 2D expansion on the second surface point cloud data to obtain second point cloud expansion data; The step of adjusting, for each of the matching point pairs, the second matching point in the matching point pair to the position of the first matching point corresponding to the second matching point, and adjusting the texture image according to the adjustment of the second matching point comprises: For each of the matching point pairs, based on the correspondence between the second matching point and the first matching point in the matching point pair, the second matching point in the second point cloud expansion data is adjusted to the position corresponding to the first matching point in the first point cloud expansion data through affine transformation, and the texture image is adjusted based on the adjustment of the second matching point.

3. The method according to claim 2, characterized in that The method further comprises: Determine a preset number of first boundary positioning points of the first point cloud expansion data, and determine the preset number of second boundary positioning points of the second point cloud expansion data; The first boundary positioning point and the second boundary positioning point corresponding to positions are determined as a matching point pair.

4. The method according to claim 3, characterized in that The method further comprises: The texture image is displayed on the surface of the target 3D model according to the adjusted texture image and the first point cloud expansion data.

5. The method according to claim 1, characterized in that The step of performing point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain a plurality of matching point pairs comprises: Point cloud matching processing is performed on the first surface point cloud data and the second surface point cloud data by using an iterative closest point algorithm, and a plurality of matching point pairs are determined according to the point cloud matching results.

6. The method according to claim 5, characterized in that The step of determining a plurality of matching point pairs according to the point cloud matching result comprises: For each first candidate point in the first surface point cloud data, check whether there is a second candidate point among the plurality of second candidate points in the second surface point cloud data whose spatial distance with the first candidate point does not exceed the preset distance threshold; if there is a second candidate point, determine the first candidate point as the first matching point, and determine the second candidate point closest to the first matching point as the second matching point corresponding to the first matching point, to obtain a matching point pair consisting of the first matching point and the second matching point; or, For each second candidate point in the second surface point cloud data, check whether there is a first candidate point among the multiple first candidate points of the first surface point cloud data whose spatial distance with the second candidate point does not exceed the preset distance threshold; if so, determine the second candidate point as the second matching point, and determine the first candidate point closest to the second matching point as the first matching point corresponding to the second matching point, so as to obtain a matching point pair consisting of the first matching point and the second matching point.

7. The method according to claim 1, characterized in that The step of adjusting, for each of the matching point pairs, the second matching point in the matching point pair to the position of the first matching point corresponding to the second matching point, and adjusting the texture image according to the adjustment of the second matching point comprises: The Warpaffine interface of the OpenCV database is called to adjust the second matching point in each matching point pair to the position of the corresponding first matching point, and the texture image is adjusted accordingly according to the adjustment of the second matching point.

8. A texture image processing device, characterized in that: The device comprises: A data acquisition module, used to acquire first surface point cloud data of a target 3D model, a texture image to be processed, and second surface point cloud data corresponding to the texture image; the texture image is a 2D plane image; A point cloud matching module, configured to perform point cloud matching processing on the first surface point cloud data and the second surface point cloud data to obtain a plurality of matching point pairs; wherein one matching point pair includes a first matching point in the first surface point cloud data and a second matching point in the second surface point cloud data, and the spatial distance between the first matching point and the second matching point is less than a preset distance threshold; The image adjustment module is used to adjust the second matching point in each matching point pair to the position of the first matching point corresponding to the second matching point, and adjust the texture image according to the adjustment of the second matching point.

9. An electronic device, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by one or more processors, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Multi-view high-resolution texture image and binocular three-dimensional point cloud mapping method

    CN111009030A

  • Point cloud data matching method and device, electronic equipment and computer storage medium

    CN112862874A