Texture image replacement methods, apparatus, electronic devices and storage media

By acquiring and matching low-resolution and high-resolution texture images in a 3D model, and automatically replacing them with high-resolution texture images, the problem of insufficient resolution in handheld 3D scanners is solved, improving processing efficiency and reducing costs.

CN119810389BActive Publication Date: 2025-11-14SHENZHEN JIMUYIDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411799499.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-11-14
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The color cameras of existing handheld 3D scanners have low resolution, which cannot meet the requirements of high texture, resulting in increased equipment costs and cumbersome use. Manual processing of low-resolution texture images is also costly.

Method used

By obtaining a set of low-resolution texture images from the 3D model of the target object, obtaining and detecting a set of high-resolution texture images, matching and determining the conversion relationship, and replacing the low-resolution texture images with high-resolution texture images, a new 3D model is formed.

Benefits of technology

It automatically replaces low-resolution texture maps with high-resolution texture maps, simplifying the model texture replacement process, improving processing efficiency and reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810389B_ABST
    Figure CN119810389B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology, providing a method, apparatus, electronic device, and storage medium for texture image replacement. The method involves acquiring a set of low-resolution texture images from a 3D model of a target object; acquiring a set of high-resolution texture images of the target object, and detecting the high-resolution texture images; determining the matching high-resolution texture image for each low-resolution texture image if the detection is successful; determining the conversion relationship between each low-resolution texture image and the matching high-resolution texture image; and performing image transformation on the matching high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching each low-resolution texture image; finally, replacing each low-resolution texture image in the 3D model with its matching new high-resolution texture image to obtain a new 3D model. This method automatically replaces low-resolution texture maps of a 3D model with high-resolution texture maps, improving processing efficiency and reducing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to a method, apparatus, electronic device, and storage medium for texture image replacement. Background Technology

[0002] When using a handheld 3D scanner, users acquire both geometric data and rich color information about the object's surface. During post-processing, this rich color information is applied as texture images to the geometric model's surface to enhance the clarity and realism of the 3D model's details. However, the integrated color cameras in current handheld 3D scanners often have low resolution, failing to meet the needs of some customers with high texture requirements. Two solutions exist to address this need: one is for the manufacturer to equip the device with a high-definition camera or to upgrade the hardware specifically for the user's needs. However, this increases equipment costs, and hardware upgrades require recalibration, leading to cumbersome and inefficient operation. The other solution involves manually processing each low-resolution texture image to obtain a corresponding high-resolution texture image. However, this requires professional personnel and incurs high labor costs. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a texture image replacement method, apparatus, electronic device and storage medium.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0005] In a first aspect, the present invention provides a texture image replacement method, the texture image replacement method comprising:

[0006] Obtain a set of low-resolution texture images from the 3D model of the target object;

[0007] Acquire a set of high-resolution texture images of the target object and perform detection on the set of high-resolution texture images;

[0008] If the high-definition texture image set passes the detection, the high-definition texture image set is matched with the low-definition texture image set to obtain a high-definition texture image that matches each low-definition texture image;

[0009] For each low-resolution texture image, a conversion relationship between the low-resolution texture image and the matching high-resolution texture image is determined, and an image transformation is performed on the matching high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching the low-resolution texture image;

[0010] The new 3D model is obtained by replacing each of the low-resolution texture images in the 3D model with a matching new high-resolution texture image.

[0011] In an optional implementation, the step of detecting the high-resolution texture image set includes:

[0012] The total number of images in the first set of high-definition texture images is compared with the total number of images in the second set of low-definition texture images;

[0013] When the total number of the first images is less than the total number of the second images, it is determined that the high-definition texture image set has failed the detection;

[0014] When the total number of the first images is greater than or equal to the total number of the second images, the detailed information of each high-definition texture image in the high-definition texture image set is checked.

[0015] If the detailed information of any high-resolution texture image does not include the shooting time, then the high-resolution texture image set is determined to have failed the detection.

[0016] If all high-resolution texture images include the shooting time in their detailed information, then the high-resolution texture image set is determined to have passed the detection.

[0017] In an optional implementation, the step of matching the high-resolution texture image set with the low-resolution texture image set to obtain a high-resolution texture image matching each low-resolution texture image includes:

[0018] For each low-resolution texture image in the low-resolution texture image set, according to the acquisition order of the low-resolution texture images, each candidate high-resolution texture image of the low-resolution texture image is selected from the high-resolution texture image set.

[0019] From all candidate high-resolution texture images, select the high-resolution texture image that matches the low-resolution texture image to obtain the high-resolution texture image that matches each low-resolution texture image.

[0020] In an optional implementation, all low-resolution texture images in the low-resolution texture image set are arranged according to shooting time and have a serial number, and all high-resolution texture images in the high-resolution texture image set are arranged according to shooting time and have a serial number.

[0021] The step of selecting each candidate high-definition texture image from the high-definition texture image set according to the acquisition order of the low-definition texture images includes:

[0022] Obtain the capture time and sequence number of the low-resolution texture image;

[0023] Based on the shooting time of the low-resolution texture image, each first high-resolution texture image is selected from the high-resolution texture image set; the time difference between the shooting time of the first high-resolution texture image and the shooting time of the low-resolution texture image is within a preset time range;

[0024] Based on the sequence number of the low-resolution texture image, each second high-resolution texture image is selected from the high-resolution texture image set; the difference between the sequence number of the second high-resolution texture image and the sequence number of the low-resolution texture image is within a preset sequence number range.

[0025] Each of the first high-definition texture image and each of the second high-definition texture image are used as candidate high-definition texture images to obtain each candidate high-definition texture image of the low-definition texture image.

[0026] In an optional implementation, the step of selecting a high-resolution texture image that matches the low-resolution texture image from all candidate high-resolution texture images includes:

[0027] Feature point detection is performed on each of the candidate high-definition texture images to obtain each first feature point set;

[0028] Feature point detection is performed on the low-resolution texture image to obtain a second feature point set;

[0029] Match each set of the first feature points with the set of the second feature points to obtain each set of points with the same name;

[0030] The candidate high-resolution texture image with the most corresponding point pairs in the set of corresponding point pairs is used as the high-resolution texture image to match the low-resolution texture image.

[0031] In an optional implementation, the step of determining the conversion relationship between the low-resolution texture image and the matching high-resolution texture image includes:

[0032] Obtain the set of corresponding point pairs between the low-resolution texture image and the matched high-resolution texture image to obtain the target set of corresponding point pairs;

[0033] In the i-th iteration, select k pairs of points from all other pairs of points in the target set of points of the same name except for the set of points of the same name;

[0034] Calculate the transformation matrix based on the set of interior point pairs and the k pairs of points with the same name;

[0035] From all other pairs of identical points in the target set of identical points, excluding the set of internal points and the k pairs of identical points, select m pairs of identical points as pairs of identical points to be processed.

[0036] Based on the transformation matrix, determine whether each pair of points with the same name to be processed is an interior point pair, and save each interior point pair to the interior point pair set;

[0037] If the current total number of interior point pairs in the interior point pair set does not reach n, after setting i+1 as the new i, the step of selecting k identical point pairs from all other identical point pairs in the target identical point pair set except for the interior point pair set is re-executed in the i-th time.

[0038] When the current total number of interior point pairs in the set of interior point pairs reaches n, determine whether the set of interior point pairs meets the set condition;

[0039] If not, when i is less than the preset number of iterations, i+1 is used as the new i, and the step of selecting k pairs of the same name from all other pairs of the same name in the target set of pairs of the same name except for the set of internal points is re-executed in the i-th iteration.

[0040] When i is greater than or equal to the number of iterations, the transformation matrix is ​​calculated based on all interior point pairs in the set of interior point pairs, and this transformation matrix is ​​used as the final transformation matrix.

[0041] If so, the transformation matrix is ​​calculated based on all interior point pairs in the set of interior point pairs, and this transformation matrix is ​​used as the final transformation matrix;

[0042] The final transformation matrix is ​​used as the transformation relationship between the low-resolution texture image and the matched high-resolution texture image; where k, m, and n are all positive integers and n>m>k.

[0043] In an optional implementation, the step of determining whether each pair of points to be processed is an interior point pair based on the transformation matrix includes:

[0044] For each pair of corresponding points to be processed, obtain the first corresponding point and the second corresponding point in the pair; the first corresponding point is a pixel in the low-resolution texture image, and the second corresponding point is a pixel in the matched high-resolution texture image.

[0045] Based on the transformation matrix, a transformation operation is performed on the first corresponding point to obtain the transformation result, and the deviation between the transformation result and the second corresponding point is calculated to obtain the deviation of the corresponding point pair to be processed.

[0046] Add up the deviations of all pairs of points with the same name to be processed to obtain the total deviation.

[0047] For each pair of corresponding points to be processed, the first ratio is obtained by calculating the ratio of the deviation of the pair of corresponding points to the sum of the deviations, and the confidence level of the pair of corresponding points to be processed is obtained by calculating the ratio of the preset parameter to the first ratio.

[0048] If the confidence level of the pair of identical points to be processed is greater than the preset confidence level threshold, then the pair of identical points to be processed is determined to be an interior point pair.

[0049] If the confidence level of the pair of identical points to be processed is less than or equal to a preset confidence threshold, then the pair of identical points to be processed is determined to be an interior point pair.

[0050] Secondly, the present invention provides a texture image replacement device, wherein the texture image replacement device:

[0051] The acquisition module is used to acquire a set of low-resolution texture images from the 3D model of the target object;

[0052] Acquire a set of high-resolution texture images of the target object and perform detection on the set of high-resolution texture images;

[0053] The transformation module is used to match the high-definition texture image set with the low-definition texture image set when the high-definition texture image set passes the detection, so as to obtain a high-definition texture image matching each low-definition texture image;

[0054] For each low-resolution texture image, a conversion relationship between the low-resolution texture image and the matching high-resolution texture image is determined, and an image transformation is performed on the matching high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching the low-resolution texture image;

[0055] The replacement module is used to replace each of the low-resolution texture images in the 3D model with a new high-resolution texture image that matches it to obtain a new 3D model.

[0056] Thirdly, the present invention provides an electronic device including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the texture image replacement method described in any of the foregoing embodiments.

[0057] Fourthly, the present invention provides a storage medium storing a computer program, which, when executed by a processor, implements the texture image replacement method described in any of the foregoing embodiments.

[0058] The texture image replacement method, apparatus, electronic device, and storage medium provided by this invention acquire a low-resolution texture image set from a 3D model of a target object; acquire a high-resolution texture image set of the target object, and detect the high-resolution texture image set; if the high-resolution texture image set passes the detection, match the high-resolution texture image set with the low-resolution texture image set to obtain a high-resolution texture image matching each low-resolution texture image; then determine the conversion relationship between each low-resolution texture image and the matched high-resolution texture image, and perform image transformation on the matched high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching each low-resolution texture image; finally, replace each low-resolution texture image in the 3D model with its matching new high-resolution texture image to obtain a new 3D model. This achieves automatic replacement of low-resolution texture maps of a 3D model with high-resolution texture maps, simplifies the model texture replacement process, improves processing efficiency, and reduces costs.

[0059] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0060] 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.

[0061] Figure 1 A block diagram of an electronic device provided in an embodiment of the present invention is shown;

[0062] Figure 2 This invention provides a schematic flowchart of a texture image replacement method according to an embodiment of the invention.

[0063] Figure 3 One example diagram of the texture image replacement method provided in an embodiment of the present invention is shown;

[0064] Figure 4 The second example diagram shows the texture image replacement method provided in the embodiment of the present invention;

[0065] Figure 5 A functional block diagram of the texture image replacement device provided in an embodiment of the present invention is shown.

[0066] Icons: 100 - Electronic device; 110 - Bus; 120 - Processor; 130 - Memory; 150 - I / O module; 170 - Communication interface; 300 - Texture image replacement device; 310 - Acquisition module; 330 - Transformation module; 350 - Replacement module. Detailed Implementation

[0067] 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 only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0068] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0069] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0070] Please see Figure 1 This is a block diagram of an electronic device provided in an embodiment of the present invention. The electronic device 100 includes a bus 110, a processor 120, a memory 130, an I / O module 150, and a communication interface 170.

[0071] Bus 110 is a circuit that connects the above-mentioned components to each other and transmits signals between the components.

[0072] The processor 120 can receive commands from the other components (such as memory 130, I / O module 150, communication interface 170, etc.) via bus 110, interpret the received commands, and perform calculations or data processing according to the interpreted commands.

[0073] The processor 120 can be an integrated circuit chip with signal processing capabilities. The processor 120 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0074] The memory 130 may store commands or data received from the processor 120 or other components (such as I / O module 150, communication interface 170, etc.) or commands or data generated by the processor 120 or other components.

[0075] The memory 130 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), or electrically erasable programmable read-only memory (EEPROM).

[0076] The I / O module 150 can receive commands or data input by the user via input-output means (e.g., sensors, keyboard, touch screen, etc.), and can transmit the received commands or data to the processor 120 or memory 130 via the bus 110. It is also used to display various information received, stored, and processed from the aforementioned components (e.g., multimedia data, text data), and can display video, images, data, etc., to the user.

[0077] The communication interface 170 can be used to communicate with other devices for signaling or data.

[0078] Understandable, Figure 1 The structure shown is only a schematic diagram of the electronic device 100. The electronic device 100 may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0079] It should be understood that the electronic device is equipped with three-dimensional model processing software, and the method provided in the embodiments of the present invention is implemented through the three-dimensional model processing software.

[0080] The above-mentioned electronic device will be used as the execution subject to execute the various steps of the methods provided in the embodiments of the present invention and achieve the corresponding technical effects.

[0081] Please see Figure 2 This is a flowchart illustrating a texture image replacement method provided in an embodiment of the present invention.

[0082] Step S202: Obtain a set of low-resolution texture images from the 3D model of the target object.

[0083] Step S204: Obtain a set of high-resolution texture images of the target object and perform detection on the set of high-resolution texture images.

[0084] In this embodiment, the user can acquire point cloud data and high-resolution texture image sets of the target object using two acquisition methods. The first method involves fixing the high-resolution imaging device and the handheld 3D scanning device together. While scanning the target object with the handheld 3D scanning device, the high-resolution imaging device simultaneously acquires the target object's high-resolution texture image set. The second method involves acquiring the target object's high-resolution texture image set using the high-resolution imaging device in the scanning sequence after scanning the target object with the handheld 3D scanning device.

[0085] The user then imports the collected point cloud data of the target object into 3D model processing software. This software performs 3D modeling on the point cloud data, including denoising, hole filling, simplification, and texture mapping, to obtain the 3D model of the target object. Since this 3D model contains low-resolution texture maps, a low-resolution texture image set can be obtained from it.

[0086] Furthermore, the user imports the high-resolution texture image set of the target object into the 3D model processing software. To ensure that the high-resolution texture image set can meet the subsequent processing requirements, the high-resolution texture image set will be inspected. It should be understood that low-resolution texture images refer to images with low resolution, low clarity, and low pixel density; high-resolution texture images refer to images with high resolution, high clarity, and high pixel density.

[0087] Step S206: If the high-definition texture image set passes the detection, match the high-definition texture image set with the low-definition texture image set to obtain a high-definition texture image that matches each low-definition texture image.

[0088] Step S208: For each low-resolution texture image, determine the conversion relationship between the low-resolution texture image and the matching high-resolution texture image, and perform image transformation on the matching high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching the low-resolution texture image.

[0089] In this embodiment, if the high-resolution texture image set passes the detection, it indicates that it meets the subsequent processing requirements. Then, the high-resolution texture image set can be matched with the low-resolution texture image set to obtain a high-resolution texture image matching each low-resolution texture image. Next, for each low-resolution texture image, the transformation relationship between it and the matched high-resolution texture image is determined, and an image transformation is performed on the matched high-resolution texture image according to this transformation relationship to obtain a new high-resolution texture image matching each low-resolution texture image.

[0090] This can be understood as follows: a low-resolution texture image is a texture image that matches the 3D model. In order to ensure that the high-resolution texture image can fit the 3D model, it is necessary to determine the high-resolution texture image that matches each low-resolution texture image. Then, by using the conversion relationship between the low-resolution texture image and the matching high-resolution texture image, the matching high-resolution texture image is transformed to improve the display effect of the 3D model after the texture is replaced.

[0091] Understandably, high-resolution texture images often have high resolution, while the target object may only occupy a portion of the image. To improve the processing speed of replacing texture images, users can also crop and compress high-resolution texture images within the high-resolution texture image set, provided the set passes detection.

[0092] For ease of understanding, an example diagram is provided in this embodiment of the invention. Please refer to... Figure 3 Users can drag the mouse and move the mask window to select a rectangular window that just covers the target object (i.e., the beverage box) to crop the high-resolution texture image. They can also check the compression box to compress the high-resolution texture image. It should be noted that users can choose whether to crop and compress the high-resolution texture image based on the hardware capabilities of their electronic device.

[0093] Step S210: Replace each low-resolution texture image in the 3D model with a matching new high-resolution texture image to obtain a new 3D model.

[0094] In this embodiment, based on the new high-resolution texture image matched by each obtained low-resolution texture image, each low-resolution texture image in the 3D model is replaced with its matching new high-resolution texture image, thus obtaining a new 3D model. This completes the texture image replacement of the 3D model, that is, replacing the original low-resolution texture map of the 3D model with a high-resolution texture map, improving the display effect of the 3D model.

[0095] As can be seen from the above steps, a low-resolution texture image set is obtained from the 3D model of the target object; a high-resolution texture image set of the target object is also obtained and detected; if the high-resolution texture image set passes the detection, it is matched with the low-resolution texture image set to obtain a high-resolution texture image matching each low-resolution texture image; then, the conversion relationship between each low-resolution texture image and the matched high-resolution texture image is determined, and image transformation is performed on the matched high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching each low-resolution texture image; finally, each low-resolution texture image in the 3D model is replaced with its matching new high-resolution texture image to obtain a new 3D model. This achieves automatic replacement of low-resolution texture maps of the 3D model with high-resolution texture maps, simplifying the model texture replacement process, improving processing efficiency, and reducing costs.

[0096] Optionally, for step S204, this embodiment of the invention provides a possible implementation.

[0097] S204-1 compares the total number of images in the first set of high-resolution texture images with the total number of images in the second set of low-resolution texture images.

[0098] S204-3, when the total number of the first images is less than the total number of the second images, the high-definition texture image set is determined to have failed the detection.

[0099] S204-5, when the total number of the first images is greater than or equal to the total number of the second images, check the detailed information of each high-definition texture image in the high-definition texture image set.

[0100] In this embodiment, after obtaining the high-definition texture image set and the low-definition texture image set, the total number of images in the high-definition texture image set is counted to obtain the first total number of images, and the total number of images in the low-definition texture image set is counted to obtain the second total number of images.

[0101] Then, the total number of the first image is compared with the total number of the second image. If the total number of the first image is less than the total number of the second image, that is, the number of high-resolution texture images is less than the number of low-resolution texture images, then in subsequent processing, some low-resolution texture images of the 3D model may not have corresponding high-resolution texture images to replace them, which will affect the display effect of the replaced 3D model. In other words, the high-resolution texture image set does not meet the requirements of subsequent processing, and it is determined that it has failed the detection.

[0102] If the total number of the first images is greater than or equal to the total number of the second images, that is, the number of high-definition texture images is greater than or equal to the number of low-definition texture images, then in subsequent processing, the texture replacement of the 3D model will not be affected by the mismatch between the number of high-definition texture images and low-definition texture images. In other words, the high-definition texture image set initially meets the requirements of subsequent processing. Then, the detailed information of each high-definition texture image in the high-definition texture image set is checked to further determine whether it meets the requirements of subsequent processing.

[0103] It should be understood that for objects with relatively regular shapes, such as spheres, other judgment criteria can also be set. For example, if the number of high-resolution texture images is N fewer than the number of low-resolution texture images (e.g., 3 images), the high-resolution texture image set is judged to have failed the detection; if the number of high-resolution texture images is N-1 fewer than the number of low-resolution texture images (e.g., 2 images), or if the number of high-resolution texture images is greater than or equal to the number of low-resolution texture images, the detailed information of each high-resolution texture image in the high-resolution texture image set is checked. The value of N can be set according to the actual situation.

[0104] S204-7A: If the detailed information of any high-resolution texture image does not include the shooting time, the high-resolution texture image set is deemed to have failed the detection.

[0105] S204-7B: If all high-resolution texture images include the shooting time in their detailed information, then the high-resolution texture image set is deemed to have passed the detection.

[0106] It is understandable that users may lose information from high-resolution texture images due to improper operation when importing them into 3D model processing software. For example, if a user first transfers the high-resolution texture image set from a high-resolution shooting device to a social media application such as WeChat on an electronic device, and then imports it from the social media application into the 3D model processing software, the resolution of the high-resolution texture image may be reduced or some information may be lost.

[0107] If users connect the high-definition imaging device to the electronic device via USB (Universal Serial Bus) or Bluetooth, and then import the data into 3D model processing software, the resolution reduction and partial information loss of the high-definition texture image can be avoided. Since the information in the high-definition texture image is crucial for matching high- and low-resolution texture images, this embodiment of the invention also checks the detailed information of the high-definition texture image.

[0108] In this embodiment, it is checked whether the detailed information of each high-resolution texture image in the high-resolution texture image set includes the shooting time. If the detailed information of any high-resolution texture image does not include the shooting time, it may affect the matching of the high-resolution texture image set with the low-resolution texture image set in subsequent processing. That is, the high-resolution texture image set does not meet the requirements of subsequent processing, and it is determined that it has failed the detection.

[0109] If all high-resolution texture images include the capture time, then the matching of the high-resolution texture image set and the low-resolution texture image set can be performed normally in subsequent processing. That is, if the high-resolution texture image set meets the requirements of subsequent processing, it is determined to pass the detection.

[0110] Optionally, for step S206, this embodiment of the invention provides a possible implementation.

[0111] Step S206-1: For each low-resolution texture image in the low-resolution texture image set, select each candidate high-resolution texture image from the high-resolution texture image set according to the acquisition order of the low-resolution texture images.

[0112] Step S206-3: Select the high-definition texture image that matches the low-definition texture image from all candidate high-definition texture images to obtain the high-definition texture image that matches each low-definition texture image.

[0113] It is understood that the processing method for each low-resolution texture image in the low-resolution texture image set is similar in the embodiments of the present invention. For the sake of brevity, the following description uses a low-resolution texture image as an example.

[0114] In this embodiment, based on the acquisition order of the low-resolution texture images, high-resolution texture images that are close to the acquisition order of the low-resolution texture images are selected from the high-resolution texture image set, thus obtaining each candidate high-resolution texture image of the low-resolution texture image; then, from all candidate high-resolution texture images, a high-resolution texture image matching the low-resolution texture image is selected.

[0115] By processing each low-resolution texture image in a similar manner, a high-resolution texture image matching each low-resolution texture image can be obtained.

[0116] Optionally, for step S206-1, this embodiment of the invention provides a possible implementation.

[0117] Step S206-1-1: Obtain the shooting time and sequence number of the low-resolution texture image.

[0118] Step S206-1-3: Select each first high-definition texture image from the high-definition texture image set according to the shooting time of the low-definition texture image; the time difference between the shooting time of the first high-definition texture image and the shooting time of the low-definition texture image is within a preset time range.

[0119] Step S206-1-5: Select each second high-definition texture image from the high-definition texture image set according to the sequence number of the low-definition texture image; the difference between the sequence number of the second high-definition texture image and the sequence number of the low-definition texture image is within a preset sequence number range.

[0120] Step S206-1-7: Each first high-definition texture image and each second high-definition texture image are used as candidate high-definition texture images to obtain each candidate high-definition texture image of the low-definition texture image.

[0121] It is understandable that all low-resolution texture images in the low-resolution texture image set are arranged according to their shooting time and have serial numbers, while all high-resolution texture images in the high-resolution texture image set are arranged according to their shooting time and have serial numbers.

[0122] In this embodiment, the shooting time and sequence number of the low-resolution texture image are first obtained, meaning the shooting time and sequence number reflect the acquisition order of a texture image. Then, since the user may acquire high-resolution texture images using the first acquisition method described above, a time range can be preset. Based on the shooting time of each candidate high-resolution texture image and the shooting time of the low-resolution texture image, the time difference corresponding to each candidate high-resolution texture image is calculated. Each candidate high-resolution texture image whose time difference falls within this time range is then used as a first high-resolution texture image.

[0123] Next, since users may acquire high-resolution texture images using the second acquisition method described above, a sequence range can be pre-set. Based on the sequence number of each candidate high-resolution texture image and the sequence number of the low-resolution texture image, the difference between each candidate high-resolution texture image and the low-resolution texture image is calculated. Each candidate high-resolution texture image whose difference falls within this sequence range is then used as a second high-resolution texture image. Finally, by using both the first and second high-resolution texture images as candidate high-resolution texture images, each candidate high-resolution texture image of the low-resolution texture image is obtained.

[0124] It should be noted that the time range and sequence number range can be set according to the actual situation, and the embodiments of the present invention are not limited in this regard.

[0125] Optionally, for step S206-3, this embodiment of the invention provides a possible implementation.

[0126] Step S206-3-1: Perform feature point detection on each candidate high-definition texture image to obtain each first feature point set.

[0127] Step S206-3-3: Perform feature point detection on the low-resolution texture image to obtain the second feature point set.

[0128] Step S206-3-5: Match each set of first feature points with the set of second feature points to obtain each set of points with the same name.

[0129] Step S206-3-7: Select the candidate high-resolution texture image with the most corresponding point pairs in the set of corresponding point pairs as the high-resolution texture image to match the low-resolution texture image.

[0130] Understandably, to improve the accuracy and efficiency of texture image matching, the low-resolution texture image and each of its candidate high-resolution texture images can be preprocessed. For example, the low-resolution texture image and each of its candidate high-resolution texture images can be corrected to rectify texture image distortion caused by handheld 3D scanning devices and high-resolution imaging devices capturing the target object. Furthermore, the low-resolution texture image and each of its candidate high-resolution texture images can be scaled to ensure that the difference in aspect ratio between the low-resolution texture image and each of its candidate high-resolution texture images is within a preset range.

[0131] In this embodiment, a preset feature detection algorithm, such as SIFT (Scale Invariant Feature Transform), can be used to detect feature points in each candidate high-resolution texture image to obtain a first feature point set, and to detect feature points in the low-resolution texture image to obtain a second feature point set.

[0132] Then, each set of first feature points is matched with the set of second feature points to obtain a set of points with the same name. For ease of understanding, the following explanation uses a set of first feature points as an example. For instance, the set of first feature points includes multiple first feature points and their feature descriptors, and the set of second feature points includes multiple second feature points and their feature descriptors.

[0133] For each second feature point, based on its feature descriptor and the feature descriptors of each first feature point, the distance between the second feature point and each first feature point is calculated. The ratio of the nearest neighbor distance to the second nearest neighbor distance is then calculated. If this ratio is less than or equal to a preset threshold, the second feature point and its nearest neighbor first feature point are considered a pair of corresponding points. Processing each second feature point in a similar manner yields a set of corresponding point pairs.

[0134] By processing each set of first feature points in a similar manner, we can obtain each set of corresponding point pairs. It should be understood that a pre-defined feature matching algorithm, such as AdaLAM (Adaptive Locally Affine Matching), can also be used to obtain each set of corresponding point pairs.

[0135] Finally, the candidate high-resolution texture image with the most corresponding point pairs in the set of corresponding point pairs is obtained. That is, the candidate high-resolution texture image has the most similar features to the low-resolution texture image. Then, the candidate high-resolution texture image is used as the high-resolution texture image to match the low-resolution texture image.

[0136] Optionally, for the process of determining the conversion relationship between the low-resolution texture image and the matching high-resolution texture image in step S208, the present invention provides a possible implementation method.

[0137] Step S208-1: Obtain the set of corresponding point pairs between the low-resolution texture image and the matching high-resolution texture image to obtain the target set of corresponding point pairs.

[0138] Step S208-2: At the i-th time, select k pairs of points from all other pairs of points of the same name in the target set of pairs of points of the same name except for the set of internal points of the same name.

[0139] Step S208-3: Calculate the transformation matrix based on the set of interior point pairs and k pairs of points with the same name.

[0140] Step S208-4: Select m pairs of identical points from all other identical point pairs in the target set of identical point pairs, excluding the set of internal point pairs and the k pairs of identical points.

[0141] Step S208-5: Based on the transformation matrix, determine whether each pair of points with the same name to be processed is an interior point pair, and save each interior point pair to the interior point pair set.

[0142] Step S208-6: If the current total number of interior pairs in the interior pair set has not reached n, then after setting i+1 as the new i, step S208-2 is executed again.

[0143] Step S208-7: When the current total number of interior pairs in the interior pair set reaches n, determine whether the interior pair set meets the set condition.

[0144] If not, in step S208-8, when i is less than the preset number of iterations, i+1 is used as the new i, and then step S208-2 is executed again.

[0145] In step S208-9, when i is greater than or equal to the number of iterations, calculate the transformation matrix based on all interior point pairs in the set of interior point pairs, and use this transformation matrix as the final transformation matrix.

[0146] Step S208-10: If yes, calculate the transformation matrix based on all interior point pairs in the interior point pair set, and use this transformation matrix as the final transformation matrix.

[0147] Step S208-11: The final transformation matrix is ​​used as the transformation relationship between the low-resolution texture image and the matching high-resolution texture image; where k, m, and n are all positive integers and n>m>k. In this embodiment, the set of corresponding point pairs between the low-resolution texture image and the matching high-resolution texture image is obtained to obtain the target set of corresponding point pairs.

[0148] In this embodiment, firstly, a set of corresponding point pairs between the low-resolution texture image and the matching high-resolution texture image is obtained to obtain the target set of corresponding point pairs. Then, through multiple iterations, corresponding point pairs that meet the requirements are selected from the target set of corresponding point pairs as interior point pairs to obtain the interior point pair set. Finally, the final transformation matrix is ​​calculated based on all interior point pairs in the interior point pair set, and this final transformation matrix is ​​used as the transformation relationship between the low-resolution texture image and the matching high-resolution texture image.

[0149] To facilitate understanding, the following explanation uses a single iteration as an example. In the i-th iteration, based on the set of interior point pairs and the target set of corresponding point pairs determined in the previous iteration, k corresponding point pairs are selected from all other corresponding point pairs in the target set excluding the interior point pair set. Then, the transformation matrix is ​​calculated based on the interior point pair set and these k corresponding point pairs.

[0150] Then, from all other pairs of corresponding points in the target set except for the set of interior points and the k pairs of corresponding points, select m pairs of corresponding points as pairs of corresponding points to be processed. Based on the transformation matrix, determine whether each pair of corresponding points to be processed meets the requirements. If it meets the requirements, then the pair of corresponding points to be processed is treated as an interior point pair and saved to the set of interior point pairs.

[0151] Next, the current total number of interior point pairs in the interior point pair set is counted, and it is determined whether the current total number has reached the set number, i.e., n. If the current total number has not reached n, it means that more pairs of points with the same name need to be selected as interior point pairs, so the process returns to step S208-2. If the current total number has reached n, it is further determined whether the interior point pair set meets the set conditions.

[0152] If the set of interior point pairs meets the set conditions, the transformation matrix is ​​calculated based on all interior point pairs in the set, and this transformation matrix is ​​used as the final transformation matrix, thus obtaining the conversion relationship between the low-resolution texture image and the matched high-resolution texture image.

[0153] If the set of interior point pairs does not meet the set conditions, the current iteration number i is compared with the preset total number of iterations d. If i < d, it means that the iteration termination condition has not been met, so the process returns to step S208-2. If i ≥ d, it means that the iteration termination condition has been met, so the transformation matrix is ​​calculated based on all interior point pairs in the set, and this transformation matrix is ​​used as the final transformation matrix, thus obtaining the conversion relationship between the low-resolution texture image and the matched high-resolution texture image.

[0154] Optionally, for step S208-5, this embodiment of the invention provides a possible implementation.

[0155] Step S208-5-1: For each pair of points to be processed, obtain the first and second points in the pair; the first point is a pixel in the low-resolution texture image, and the second point is a pixel in the matching high-resolution texture image.

[0156] Step S208-5-2: Based on the transformation matrix, perform a transformation operation on the first corresponding point to obtain the transformation result, and calculate the deviation between the transformation result and the second corresponding point to obtain the deviation of the corresponding point pair to be processed.

[0157] Step S208-5-3: Add up the deviations of all pairs of points with the same name to be processed to obtain the total deviation.

[0158] Step S208-5-4: For each pair of points to be processed, calculate the ratio of the deviation of the pair of points to be processed to the sum of the deviations to obtain the first ratio, and calculate the ratio of the preset parameter to the first ratio to obtain the confidence level of the pair of points to be processed.

[0159] Step S208-5-5: If the confidence level of the pair of identical points to be processed is greater than the preset confidence level threshold, then the pair of identical points to be processed is determined to be an interior pair.

[0160] Step S208-5-6: If the confidence level of the pair of points to be processed is less than or equal to the preset confidence level threshold, then it is determined that the pair of points to be processed is not an interior point pair.

[0161] It is understood that the processing method for each pair of points with the same name to be processed is similar in the embodiments of the present invention. For the sake of brevity, the following description will be based on a single pair of points with the same name to be processed.

[0162] In this embodiment, the first and second corresponding points in the pairs of corresponding points to be processed are obtained, where the first corresponding point is a pixel in the low-resolution texture image and the second corresponding point is a pixel in the matching high-resolution texture image. Then, based on the calculated transformation matrix, the rotation matrix and translation vector can be obtained from the transformation matrix through Singular Value Decomposition (SVD). For example, the transformation matrix can be represented as E = UΣVT, where E is the transformation matrix; Σ is a diagonal matrix with non-zero elements of 1; and U and V are orthogonal matrices. The rotation matrix R can be constructed from U and V, and the translation vector t can be obtained from the last column of U or V.

[0163] Based on the rotation matrix and translation vector obtained from the transformation matrix, perform a transformation operation (rotation and translation) on the first corresponding point in the pair of points to be processed, thus obtaining the transformation result. Then calculate the deviation between this transformation result and the second corresponding point in the same pair, thus obtaining the deviation of the entire pair. Similarly, process each pair of points to be processed in this way, obtaining the deviation for each pair. Finally, sum the deviations of all pairs of points to be processed to obtain the total deviation.

[0164] Next, for each pair of identical points to be processed, the ratio of the deviation of the pair to the sum of deviations is calculated to obtain a first ratio. Then, the ratio of a preset parameter to this first ratio is calculated to obtain the confidence level of the pair. If the confidence level of the pair is greater than a preset confidence threshold, it indicates that the pair meets the requirements, and the pair is determined to be an interior pair. If the confidence level is less than or equal to the preset confidence threshold, it indicates that the pair does not meet the requirements, and the pair is determined to be non-interior pair.

[0165] Optionally, for the process of determining whether the set of interior point pairs meets the set conditions in step S208-7, the present invention provides a possible implementation method, namely: obtaining the deviation of each interior point pair in the set of interior point pairs; calculating the standard deviation based on the deviation of all interior point pairs; if the standard deviation is greater than a preset threshold, it is determined that the set of interior point pairs has not met the set conditions; if the standard deviation is less than or equal to the preset threshold, it is determined that the set of interior point pairs has met the set conditions.

[0166] For ease of understanding, the embodiments of the present invention are based on the above. Figure 3 The example shown also includes an example diagram. Please refer to [link / reference]. Figure 4 It is an image of a new three-dimensional model obtained by replacing a high-resolution image with a low-resolution texture image of a three-dimensional model using the method of an embodiment of the present invention.

[0167] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a texture image replacement apparatus is given below. Please refer to... Figure 5 This is a functional block diagram of the texture image replacement device 300 provided in this embodiment of the invention. It should be noted that the basic principle and technical effects of the texture image replacement device 300 provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The texture image replacement device 300 includes:

[0168] The acquisition module 310 is used to acquire a low-resolution texture image set from the 3D model of the target object; acquire a high-resolution texture image set of the target object; and perform detection on the high-resolution texture image set.

[0169] The transformation module 330 is used to match the high-definition texture image set with the low-definition texture image set when the high-definition texture image set passes the detection, to obtain a high-definition texture image matched by each low-definition texture image; for each low-definition texture image, the transformation relationship between the low-definition texture image and the matched high-definition texture image is determined, and the image transformation of the matched high-definition texture image is performed according to the transformation relationship to obtain a new high-definition texture image matched by the low-definition texture image.

[0170] Replacement module 350 is used to replace each low-resolution texture image in the 3D model with a new high-resolution texture image that matches it to obtain a new 3D model.

[0171] Optionally, the acquisition module 310 is further configured to: compare the total number of images in the first high-definition texture image set with the total number of images in the second low-definition texture image set; when the total number of images in the first high-definition texture image set is less than the total number of images in the second high-definition texture image set, determine that the high-definition texture image set has failed the detection; when the total number of images in the first high-definition texture image set is greater than or equal to the total number of images in the second high-definition texture image set, check the detailed information of each high-definition texture image in the high-definition texture image set; if the detailed information of any high-definition texture image does not include the shooting time, determine that the high-definition texture image set has failed the detection; if the detailed information of all high-definition texture images includes the shooting time, determine that the high-definition texture image set has passed the detection.

[0172] Optionally, the transformation module 330 is further configured to: for each low-resolution texture image in the low-resolution texture image set, select each candidate high-resolution texture image from the high-resolution texture image set according to the acquisition order of the low-resolution texture images; select the high-resolution texture image matching the low-resolution texture image from all candidate high-resolution texture images to obtain the high-resolution texture image matching each low-resolution texture image.

[0173] Optionally, the transformation module 330 is further configured to: obtain the shooting time and sequence number of the low-resolution texture image; select each first high-resolution texture image from the high-resolution texture image set according to the shooting time of the low-resolution texture image; the time difference between the shooting time of the first high-resolution texture image and the shooting time of the low-resolution texture image is within a preset time range; select each second high-resolution texture image from the high-resolution texture image set according to the sequence number of the low-resolution texture image; the difference between the sequence number of the second high-resolution texture image and the sequence number of the low-resolution texture image is within a preset sequence number range; and use each first high-resolution texture image and each second high-resolution texture image as candidate high-resolution texture images to obtain each candidate high-resolution texture image of the low-resolution texture image.

[0174] Optionally, the transformation module 330 is further configured to: perform feature point detection on each candidate high-resolution texture image to obtain each first feature point set; perform feature point detection on the low-resolution texture image to obtain a second feature point set; match each first feature point set with the second feature point set to obtain each set of corresponding point pairs; and use the candidate high-resolution texture image with the most corresponding point pairs in the set of corresponding point pairs as the high-resolution texture image to be matched with the low-resolution texture image.

[0175] Optionally, the transformation module 330 is further configured to: obtain a set of corresponding point pairs between a low-resolution texture image and a matching high-resolution texture image, thereby obtaining a target set of corresponding point pairs; at the i-th iteration, select k corresponding point pairs from all other corresponding point pairs in the target set of corresponding point pairs except for the set of inner point pairs; calculate a transformation matrix based on the set of inner point pairs and the k corresponding point pairs; select m corresponding point pairs as to-be-processed corresponding point pairs from all other corresponding point pairs in the target set of corresponding point pairs except for the set of inner point pairs and the k corresponding point pairs; determine whether each to-be-processed corresponding point pair is an inner point pair based on the transformation matrix, and save each inner point pair to the inner point pair set; when the current total number of inner point pairs in the inner point pair set is less than n, after setting i+1 as the new i, re-execute at the i-th iteration, selecting m corresponding point pairs from all other corresponding point pairs in the target set of corresponding point pairs except for the set of inner point pairs. Among other pairs of points with the same name, select k pairs of points with the same name; when the current total number of points with the same name in the inner point pair set reaches n, determine whether the inner point pair set meets the set conditions; if not, when i is less than the preset number of iterations, take i+1 as the new i, and re-execute the process at the i-th iteration, select k pairs of points with the same name from all other pairs of points with the same name in the target pair of points with the same name except for the inner point pair set; when i is greater than or equal to the number of iterations, calculate the transformation matrix based on all inner point pairs in the inner point pair set, and use the transformation matrix as the final transformation matrix; if yes, calculate the transformation matrix based on all inner point pairs in the inner point pair set, and use the transformation matrix as the final transformation matrix; use the final transformation matrix as the conversion relationship between the low-resolution texture image and the matched high-resolution texture image; where k, m, and n are all positive integers and n>m>k.

[0176] Optionally, the transformation module 330 is further configured to: for each pair of corresponding points to be processed, obtain a first corresponding point and a second corresponding point in the pair; the first corresponding point is a pixel in a low-resolution texture image, and the second corresponding point is a pixel in a matching high-resolution texture image; perform a transformation operation on the first corresponding point according to the transformation matrix to obtain a transformation result, and calculate the deviation between the transformation result and the second corresponding point to obtain the deviation of the pair of corresponding points to be processed; and convert all pairs of corresponding points to be processed... The deviations are summed to obtain a total deviation. For each pair of identical points to be processed, the ratio of the deviation of the pair to the total deviation is calculated to obtain a first ratio. The ratio of the preset parameter to the first ratio is then calculated to obtain the confidence level of the pair. If the confidence level of the pair is greater than the preset confidence threshold, the pair is determined to be an interior pair. If the confidence level of the pair is less than or equal to the preset confidence threshold, the pair is determined not to be an interior pair.

[0177] This invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the texture image replacement method disclosed in this invention.

[0178] This invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the texture image replacement method disclosed in this invention.

[0179] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0180] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0181] If the aforementioned functions are implemented as software functional 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 this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this 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.

[0182] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A texture image replacement method, characterized in that, The texture image replacement method includes: Obtain a set of low-resolution texture images from the 3D model of the target object; Acquire a set of high-resolution texture images of the target object and perform detection on the set of high-resolution texture images; If the high-definition texture image set passes the detection, the high-definition texture image set is matched with the low-definition texture image set to obtain a high-definition texture image that matches each low-definition texture image; For each low-resolution texture image, a conversion relationship between the low-resolution texture image and the matching high-resolution texture image is determined, and an image transformation is performed on the matching high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching the low-resolution texture image; The new three-dimensional model is obtained by replacing each of the low-resolution texture images in the three-dimensional model with a matching new high-resolution texture image. The step of determining the conversion relationship between the low-resolution texture image and the matching high-resolution texture image includes: Obtain the set of corresponding point pairs between the low-resolution texture image and the matched high-resolution texture image to obtain the target set of corresponding point pairs; In the i-th iteration, select k pairs of points from all other pairs of points in the target set of points of the same name except for the set of points of the same name; Calculate the transformation matrix based on the set of interior point pairs and the k pairs of points with the same name; From all other pairs of identical points in the target set of identical points, excluding the set of internal points and the k pairs of identical points, select m pairs of identical points as pairs of identical points to be processed. Based on the transformation matrix, determine whether each pair of points with the same name to be processed is an interior point pair, and save each interior point pair to the interior point pair set; If the current total number of interior point pairs in the interior point pair set does not reach n, after setting i+1 as the new i, the step of selecting k identical point pairs from all other identical point pairs in the target identical point pair set except for the interior point pair set is re-executed in the i-th time. When the current total number of interior point pairs in the set of interior point pairs reaches n, determine whether the set of interior point pairs meets the set condition; If not, when i is less than the preset number of iterations, i+1 is used as the new i, and the step of selecting k pairs of the same name from all other pairs of the same name in the target set of pairs of the same name except for the set of internal points is re-executed in the i-th iteration. When i is greater than or equal to the number of iterations, the transformation matrix is ​​calculated based on all interior point pairs in the set of interior point pairs, and this transformation matrix is ​​used as the final transformation matrix. If so, the transformation matrix is ​​calculated based on all interior point pairs in the set of interior point pairs, and this transformation matrix is ​​used as the final transformation matrix; The final transformation matrix is ​​used as the transformation relationship between the low-resolution texture image and the matched high-resolution texture image; where k, m, and n are all positive integers and n>m>k.

2. The texture image replacement method according to claim 1, characterized in that, The step of detecting the high-definition texture image set includes: The total number of images in the first set of high-definition texture images is compared with the total number of images in the second set of low-definition texture images; When the total number of the first images is less than the total number of the second images, it is determined that the high-definition texture image set has failed the detection; When the total number of the first images is greater than or equal to the total number of the second images, the detailed information of each high-definition texture image in the high-definition texture image set is checked. If the detailed information of any high-resolution texture image does not include the shooting time, then the high-resolution texture image set is determined to have failed the detection. If all high-resolution texture images include the shooting time in their detailed information, then the high-resolution texture image set is determined to have passed the detection.

3. The texture image replacement method according to claim 1, characterized in that, The step of matching the high-resolution texture image set with the low-resolution texture image set to obtain a high-resolution texture image matching each low-resolution texture image includes: For each low-resolution texture image in the low-resolution texture image set, according to the acquisition order of the low-resolution texture images, each candidate high-resolution texture image of the low-resolution texture image is selected from the high-resolution texture image set. From all candidate high-resolution texture images, select the high-resolution texture image that matches the low-resolution texture image to obtain the high-resolution texture image that matches each low-resolution texture image.

4. The texture image replacement method according to claim 3, characterized in that, All low-resolution texture images in the low-resolution texture image set are arranged according to shooting time and have serial numbers, and all high-resolution texture images in the high-resolution texture image set are arranged according to shooting time and have serial numbers. The step of selecting each candidate high-definition texture image from the high-definition texture image set according to the acquisition order of the low-definition texture images includes: Obtain the capture time and sequence number of the low-resolution texture image; Based on the shooting time of the low-resolution texture image, each first high-resolution texture image is selected from the high-resolution texture image set; the time difference between the shooting time of the first high-resolution texture image and the shooting time of the low-resolution texture image is within a preset time range; Based on the sequence number of the low-resolution texture image, each second high-resolution texture image is selected from the high-resolution texture image set; the difference between the sequence number of the second high-resolution texture image and the sequence number of the low-resolution texture image is within a preset sequence number range. Each of the first high-definition texture image and each of the second high-definition texture image are used as candidate high-definition texture images to obtain each candidate high-definition texture image of the low-definition texture image.

5. The texture image replacement method according to claim 3, characterized in that, The step of selecting a high-resolution texture image that matches the low-resolution texture image from all candidate high-resolution texture images includes: Feature point detection is performed on each of the candidate high-definition texture images to obtain each first feature point set; Feature point detection is performed on the low-resolution texture image to obtain a second feature point set; Match each set of the first feature points with the set of the second feature points to obtain each set of points with the same name; The candidate high-resolution texture image with the most corresponding point pairs in the set of corresponding point pairs is used as the high-resolution texture image to match the low-resolution texture image.

6. The texture image replacement method according to claim 1, characterized in that, The step of determining whether each pair of points with the same name to be processed is an interior point pair based on the transformation matrix includes: For each pair of corresponding points to be processed, obtain the first corresponding point and the second corresponding point in the pair; the first corresponding point is a pixel in the low-resolution texture image, and the second corresponding point is a pixel in the matched high-resolution texture image. Based on the transformation matrix, a transformation operation is performed on the first corresponding point to obtain the transformation result, and the deviation between the transformation result and the second corresponding point is calculated to obtain the deviation of the corresponding point pair to be processed. Add up the deviations of all pairs of points with the same name to be processed to obtain the total deviation. For each pair of corresponding points to be processed, the first ratio is obtained by calculating the ratio of the deviation of the pair of corresponding points to the sum of the deviations, and the confidence level of the pair of corresponding points to be processed is obtained by calculating the ratio of the preset parameter to the first ratio. If the confidence level of the pair of identical points to be processed is greater than the preset confidence level threshold, then the pair of identical points to be processed is determined to be an interior point pair. If the confidence level of the pair of identical points to be processed is less than or equal to a preset confidence threshold, then the pair of identical points to be processed is determined to be an interior point pair.

7. A texture image replacement device, characterized in that, The texture image replacement device: The acquisition module is used to acquire a set of low-resolution texture images from the 3D model of the target object; Acquire a set of high-resolution texture images of the target object and perform detection on the set of high-resolution texture images; The transformation module is used to match the high-definition texture image set with the low-definition texture image set when the high-definition texture image set passes the detection, so as to obtain a high-definition texture image matching each low-definition texture image; For each low-resolution texture image, a conversion relationship between the low-resolution texture image and the matching high-resolution texture image is determined, and an image transformation is performed on the matching high-resolution texture image according to the conversion relationship to obtain a new high-resolution texture image matching the low-resolution texture image; The replacement module is used to replace each low-resolution texture image in the three-dimensional model with a new high-resolution texture image that matches it to obtain a new three-dimensional model. Specifically, when determining the conversion relationship between the low-resolution texture image and the matching high-resolution texture image, the transformation module is used for: Obtain the set of corresponding point pairs between the low-resolution texture image and the matched high-resolution texture image to obtain the target set of corresponding point pairs; In the i-th iteration, select k pairs of points from all other pairs of points in the target set of points of the same name except for the set of points of the same name; Calculate the transformation matrix based on the set of interior point pairs and the k pairs of points with the same name; From all other pairs of identical points in the target set of identical points, excluding the set of internal points and the k pairs of identical points, select m pairs of identical points as pairs of identical points to be processed. Based on the transformation matrix, determine whether each pair of points with the same name to be processed is an interior point pair, and save each interior point pair to the interior point pair set; If the current total number of interior point pairs in the interior point pair set does not reach n, after setting i+1 as the new i, the step of selecting k identical point pairs from all other identical point pairs in the target identical point pair set except for the interior point pair set is re-executed in the i-th time. When the current total number of interior point pairs in the set of interior point pairs reaches n, determine whether the set of interior point pairs meets the set condition; If not, when i is less than the preset number of iterations, i+1 is used as the new i, and the step of selecting k pairs of the same name from all other pairs of the same name in the target set of pairs of the same name except for the set of internal points is re-executed in the i-th iteration. When i is greater than or equal to the number of iterations, the transformation matrix is ​​calculated based on all interior point pairs in the set of interior point pairs, and this transformation matrix is ​​used as the final transformation matrix. If so, the transformation matrix is ​​calculated based on all interior point pairs in the set of interior point pairs, and this transformation matrix is ​​used as the final transformation matrix; The final transformation matrix is ​​used as the transformation relationship between the low-resolution texture image and the matched high-resolution texture image; where k, m, and n are all positive integers and n>m>k.

8. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program, and when the processor executes the computer program, it implements the texture image replacement method according to any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the texture image replacement method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image processing method and device, electronic equipment and readable storage medium

    CN108765272A

  • Texture mapping method and device of grid model and three-dimensional scanning system

    CN117974868A