Augmented reality texture processing method, device, electronic device and storage medium

Through noise texture sampling and model unit texture mapping technology, the problem of poor real-time texture loading in augmented reality models is solved, fast and efficient texture loading is achieved, and the calculation cost is reduced.

CN111862342BActive Publication Date: 2024-08-27DOUYIN VISION CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010688589.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-16
Publication Date
2024-08-27
Estimated Expiration
2040-08-27

AI Technical Summary

Technical Problem

In the augmented reality model, the existing technology needs to calculate the pixel value of each pixel, resulting in poor real-time performance and high computational cost, and cannot effectively load the texture of the building exterior wall.

Method used

The texture image of the target object surface is obtained through noise texture sampling, and applied to the surface of the model unit. The texture map of the model unit is used to achieve fast loading, reduce calculation costs, and improve real-time performance.

Benefits of technology

It realizes the rapid completion of texture loading in the augmented reality model, reduces the occupation of computing resources, and improves real-time performance and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111862342B
    Figure CN111862342B
Patent Text Reader

Abstract

The present invention discloses a texture processing method, device, electronic device and storage medium for augmented reality. Applied to a shader, the method comprises: sampling noise texture according to an image of a target object to obtain a texture image of the surface of the target object; when displaying an augmented reality model of the target object, determining a texture map on the surface of a model unit according to the texture image, the augmented reality model comprises a plurality of model units; and outputting the model unit according to the texture map. The texture image can be intercepted from the surface of the target object, and the texture image can be applied to the surface of the model unit, so that a texture map can be configured for each model unit. Since the augmented reality model is composed of model units, the texture map of the model unit is set to realize rapid completion of texture loading on the outer surface of the augmented reality model, without calculating the pixel value of each pixel point separately, which can reduce the computational cost and improve real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to virtual reality technology, and in particular to a texture processing method, device, electronic device and storage medium for augmented reality. Background Art

[0002] Augmented Reality (AR) is a technology that superimposes real information with virtual information. First, the computer system processes the real information and generates virtual information that matches the real information and contains virtual objects, sounds or texts; then, the virtual information is superimposed on the human-computer interaction interface that displays the real information, thereby enhancing the user's perception of the real world.

[0003] At present, when outputting an augmented reality model, there is a need to load the surface texture of the object being photographed onto the surface of the augmented reality model. For example, the texture of the exterior wall of a building is loaded onto the surface of the augmented reality model of the building. In this process, it is necessary to calculate the pixel value of each pixel point in each augmented reality picture, and then complete the loading of the texture of the augmented reality model of the building. This process requires a large amount of computing resources, has poor real-time performance, and has a high computing cost. Summary of the invention

[0004] The present invention provides an augmented reality texture processing method, device, electronic device and storage medium, so as to improve the real-time performance of augmented reality model texture loading and reduce the calculation cost.

[0005] In a first aspect, an embodiment of the present invention provides a texture processing method for augmented reality, comprising:

[0006] Noise texture sampling is performed according to the image of the target object to obtain a texture image of the surface of the target object;

[0007] When displaying an augmented reality model of a target object, determining a texture map of a surface of a model unit according to the texture image, the augmented reality model including a plurality of model units;

[0008] Outputs model units based on texture maps.

[0009] In a second aspect, an embodiment of the present invention further provides a texture processing device for augmented reality, comprising:

[0010] A sampling module is used to perform noise texture sampling according to the image of the target object to obtain a texture image of the surface of the target object;

[0011] A texture determination module, used to determine a texture map on a surface of a model unit according to a texture image when displaying an augmented reality model of a target object, wherein the augmented reality model includes a plurality of model units;

[0012] The output module is used to output the model unit according to the texture map.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When one or more programs are executed by one or more processors, the one or more processors implement the texture processing method for augmented reality as shown in the embodiment of the present disclosure.

[0017] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the texture processing method for augmented reality as shown in the embodiment of the present disclosure.

[0018] The texture processing scheme for augmented reality disclosed in the embodiment of the present disclosure can perform noise texture sampling based on the image of the target object to obtain a texture image of the surface of the target object; when displaying the augmented reality model of the target object, determine the texture map of the surface of the model unit based on the texture image, and the augmented reality model includes multiple model units; output the model unit based on the texture map. Compared with the current need to calculate the pixel value of each pixel point, which has poor real-time performance and high computational cost, the embodiment of the present disclosure can intercept the texture image from the surface of the target object and apply the texture image to the surface of the model unit, so as to configure a texture map for each model unit. Since the augmented reality model is composed of model units, setting the texture map of the model unit can realize the rapid completion of texture loading on the outer surface of the augmented reality model, without calculating the pixel value of each pixel point separately, which can reduce the computational cost and improve the real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flowchart of a texture processing method for augmented reality in Embodiment 1 of the present invention;

[0020] Figure 2 is a schematic diagram of the structure of a texture processing device for augmented reality in Embodiment 2 of the present invention;

[0021] Figure 3 It is a schematic diagram of the structure of an electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0023] Augmented Reality (AR) is a technology that superimposes real information with virtual information. Exemplarily, virtual information can be an augmented reality model of a pre-built landmark building, and real information can be a landmark building (shot object) obtained by a camera of an electronic device. The texture of the outer surface of the shot may change over time or the external environment (such as light, weather, etc.), so the outer surface texture of the augmented reality model cannot be completely integrated with the actual information. Therefore, it is necessary to load the current texture of the landmark building into the augmented reality model. Usually, texture is also called noise. Noise is often used to create visual effects, such as simplex noise, Perlin noise, etc. At present, when calculating noise (also known as texture) in real time, the noise value corresponding to each pixel is calculated in the fragment shader. However, the above process has a large amount of calculation, and if it is applied to some low-end mobile phones, a high frame rate cannot be guaranteed. In order to solve this technical problem, an embodiment of the present application provides a texture processing solution for augmented reality, as shown below.

[0024] Embodiment 1

[0025] Figure 1 This is a flowchart of an augmented reality texture processing method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where the texture of a photographed object is loaded in real time in an augmented reality model. The method can be executed by an electronic device that displays the augmented reality model, and the device can be a terminal such as a smart phone or a tablet computer. Specifically, the method includes the following steps:

[0026] Step 110: Perform noise texture sampling based on the image of the target object to obtain a texture image of the surface of the target object.

[0027] The target object is the object photographed by the camera of the electronic device. The embodiment of the present application is applied to an augmented reality scene. The user can start the augmented reality function in a preset application, and the preset application can be a camera application of the electronic device, or an application with an augmented reality function. The camera of the electronic device acquires the current image, and the electronic device displays the acquired current image in a preview page. If it is recognized that a corresponding augmented reality model exists for the object in the current image, the augmented reality model is mapped to the building image. The object can be a landmark building, or it can be an entity corresponding to other pre-made augmented display models such as vehicles.

[0028] When the user starts the augmented reality function in the preset application, it is determined whether the currently photographed object is a target object with a corresponding augmented reality model. The overall image of the target object can be obtained for noise texture sampling, or the local image of the target object can be obtained for noise texture sampling.

[0029] In one implementation, first, an appearance image of the target object is acquired; then, noise texture sampling is performed on the appearance image according to a preset division unit to obtain a sampling result; finally, rendering and splicing are performed according to the sampling result to obtain a texture image of the surface of the target object.

[0030] The appearance image is an image containing the surface of the target object. When the target object is a building, if the user is close to the building, the appearance image may be a partial image of the building. As the distance between the user and the building increases, more and more target images may be captured until the appearance image can represent the overall outline of the target object. Since the texture of the outer surface of the building has certain regularities, such as glass, concrete walls, etc., which have relatively fixed textures. Therefore, the appearance image may be subjected to noise texture sampling according to a preset division unit. The preset division unit may be a fixed size, such as a square with a preset number of pixels as the side length. After intercepting a graphic in the appearance image using the preset division unit, a sampling result is obtained. The image size of the sampling result is the same as the preset division unit. The sampling position may be any position in the appearance image. After obtaining the sampling result, the sampling result is spliced ​​to obtain a texture image sequence frame as a texture map. The texture image sequence frame is spliced ​​by multiple sampling results. By using the preset division unit to perform noise texture sampling on the appearance image, it is possible to quickly determine the texture image from the appearance image and improve the speed of generating the texture image.

[0031] Furthermore, the texture of the outer surface of the target object may not be completely consistent. For example, the outer surface is composed of glass and concrete. In this case, this step can be implemented in the following manner: obtaining texture distribution characteristics in the image of the target object; dividing the image of the target object according to the texture distribution characteristics to obtain multiple texture regions, each texture region having the same texture characteristics; performing noise texture sampling in the texture region to obtain a texture image of the target object surface.

[0032] Texture distribution features refer to the texture characteristics corresponding to each region in multiple regions of the target object. Texture characteristics include glass texture, concrete texture, etc. After dividing the image of the target object based on the texture distribution characteristics, multiple texture regions can be obtained, and the image in each texture region corresponds to a texture characteristic. In the subsequent steps, the model unit in the augmented reality model can be mapped to a certain texture region, and the texture image of the texture region is used as the texture map of the model unit. In this way, the effect of generating a responsive texture image for a target object with multiple texture features is achieved, thereby improving the accuracy of texture noise while improving the efficiency of texture image generation.

[0033] Step 120: When displaying the augmented reality model of the target object, determine the texture map of the surface of the model unit according to the texture image, and the augmented reality model includes multiple model units.

[0034] When the electronic device camera acquires the target object, the electronic device can prompt the user to display the augmented reality model of the target object. When the user confirms the display, the electronic device overlays the augmented reality model on the image of the target object in the preview screen, completing the loading of the augmented reality model of the target object.

[0035] The technical solution provided by the embodiment of the present application sets a texture map with the model unit as a processing object. The texture map is determined according to the sampling result of the image of the target object captured by the camera, so that the texture map on the surface of the model unit is consistent with the current texture of the target object, and the current texture of the target object is loaded into the map on the surface of the model unit. The number of model units is much smaller than the number of pixels, so it is possible to quickly apply the current texture of the target object to the augmented reality model.

[0036] Exemplarily, determining the texture map corresponding to the surface of the model unit according to the texture image can be implemented by the following steps:

[0037] Step 121: determine a mapping area according to vertex coordinates of a plurality of vertices of the model unit located on the outer surface of the augmented reality model.

[0038] The model unit is a unit that constitutes the augmented reality model. The model unit is configured with multiple vertices and vertex coordinates, and the vertex coordinates are three-dimensional coordinates. Exemplarily, the target object is a building, and the model unit is a cube unit. If the model unit is a cube unit, the cube unit is composed of eight vertices, and the position of the cube unit in the augmented reality model can be determined according to the vertex coordinates. For the model unit located on the surface of the augmented reality model, the corresponding point position of the model unit in the texture image can be determined according to the coordinates of the four vertices of the model unit located on the surface of the augmented reality model.

[0039] Exemplarily, the three-dimensional coordinates of the vertices of the model unit are obtained; multiple vertices located on the outer surface of the augmented reality model are determined based on the three-dimensional coordinates; the three-dimensional coordinates of the multiple vertices are mapped into two-dimensional coordinates (UV coordinates); and a mapping area is determined in the texture image based on the two-dimensional coordinates.

[0040] The texture image is a two-dimensional image, and the coordinates of the vertices in the model unit are a three-dimensional image. The three-dimensional image is mapped onto the outer surface where the model unit is located to obtain two-dimensional coordinates. The four vertices are used to determine the mapping area in the two-dimensional coordinate system.

[0041] Step 122: extract the texture map of the surface of the model unit from the texture image of the surface of the target object according to the map area.

[0042] After the mapping area is determined in the texture image using the vertex coordinates of the model unit, the texture map corresponding to the mapping area is used as the texture map on the outer surface of the model unit.

[0043] Step 130: Output the model unit according to the texture map.

[0044] For the model units located on the outer surface of the augmented reality model, each model unit can be processed in parallel by a shader, and a texture map is loaded on the surface of the model unit located on the outer surface of the augmented reality model.

[0045] Furthermore, after the augmented reality model is loaded into the target object, the user can trigger some model changes. Model changes such as the model unit flipping in a certain direction or the model unit jumping. At this time, if only the outer surface located on the outer surface is configured to load the texture map, then when the model unit flips or jumps, the surface without the texture map loaded is the initial screen, and the new surface after the model unit flips is located on the outer surface of the augmented reality model, and the visual effect is not good. In order to solve this problem, the texture map is used as a map of the first surface of the model unit, and the first surface is the surface corresponding to the outer surface of the augmented reality model. When the model unit rotates or jumps, the texture map is used as a map of the second surface of the model unit. In addition to loading the texture map on the first surface, the texture map can also be loaded on the second surface, and the second surface is the surface outside the first surface. By loading texture maps on multiple surfaces of the model unit, the stability of the texture of the outer surface of the target object can be maintained when the model unit triggers flipping or jumping.

[0046] The texture processing method of augmented reality disclosed in the embodiment of the present disclosure can perform noise texture sampling according to the image of the target object to obtain the texture image of the surface of the target object; when displaying the augmented reality model of the target object, determine the texture map of the surface of the model unit according to the texture image, and the augmented reality model includes multiple model units; output the model unit according to the texture map. Compared with the current need to calculate the pixel value of each pixel point, which has poor real-time performance and high computational cost, the embodiment of the present disclosure can intercept the texture image from the surface of the target object and apply the texture image to the surface of the model unit, so as to configure the texture map for each model unit. Since the augmented reality model is composed of model units, the texture map of the model unit is set to realize the rapid completion of the texture loading on the outer surface of the augmented reality model, without the need to calculate the pixel value of each pixel point separately, which can reduce the computational cost and improve the real-time performance.

[0047] Embodiment 2

[0048] Figure 2 This is a schematic diagram of the structure of an augmented reality texture processing device provided in the second embodiment of the present disclosure. This embodiment can be applied to the case where the texture of the photographed object is loaded in real time in the augmented reality model. The method can be executed by an electronic device that displays the augmented reality model. The device can be a smart phone, a tablet computer, etc. The device includes: a sampling module 210, a texture determination module 220 and an output module 230, wherein:

[0049] The sampling module 210 is used to perform noise texture sampling according to the image of the target object to obtain a texture image of the surface of the target object;

[0050] A texture determination module 220, for determining a texture map of a surface of a model unit according to a texture image when displaying an augmented reality model of a target object, wherein the augmented reality model includes a plurality of model units;

[0051] The output module 230 is used to output the model unit according to the texture map.

[0052] Furthermore, the sampling module 210 is used to:

[0053] Acquire an appearance image of a target object;

[0054] Perform noise texture sampling on the appearance image according to the preset division unit to obtain a sampling result;

[0055] Rendering and splicing are performed according to the sampling results to obtain the texture image of the target object surface.

[0056] Furthermore, the texture determination module 220 is used to:

[0057] Determine a mapping area according to vertex coordinates of a plurality of vertices of the model unit located on the outer surface of the augmented reality model;

[0058] The texture map of the surface of the model unit is intercepted from the texture image of the surface of the target object according to the mapping area.

[0059] Furthermore, the texture determination module 220 is used to:

[0060] Get the three-dimensional coordinates of the vertices of the model unit;

[0061] Determine a plurality of vertices located on the outer surface of the augmented reality model according to the three-dimensional coordinates;

[0062] Map the three-dimensional coordinates of multiple vertices into two-dimensional coordinates;

[0063] Determine the mapping area in the texture image based on the two-dimensional coordinates.

[0064] Furthermore, the sampling module 210 is used to:

[0065] Obtaining texture distribution features in the image of the target object;

[0066] The image of the target object is divided according to the texture distribution characteristics to obtain multiple texture regions, each of which has the same texture characteristics;

[0067] Noise texture sampling is performed in the texture area to obtain a texture image of the target object surface.

[0068] Furthermore, the output module 230 is used to:

[0069] Using the texture map as a map of the first surface of the model unit, the first surface being a surface corresponding to the outer surface of the augmented reality model;

[0070] When the model unit rotates or jumps, the texture map is used as the map of the second surface of the model unit.

[0071] Furthermore, the target object is a building, and the model unit is a cube unit.

[0072] In the texture processing method for augmented reality disclosed in the embodiment of the present disclosure, the sampling module 210 performs noise texture sampling according to the image of the target object to obtain the texture image of the surface of the target object; when the augmented reality model of the target object is displayed, the texture determination module 220 determines the texture map of the surface of the model unit according to the texture image, and the augmented reality model includes multiple model units; the output module 230 outputs the model unit according to the texture map. Compared with the current need to calculate the pixel value of each pixel point, the real-time performance is poor and the calculation cost is high, the embodiment of the present disclosure can intercept the texture image from the surface of the target object, and apply the texture image to the surface of the model unit, so as to configure the texture map for each model unit. Since the augmented reality model is composed of model units, the texture map of the model unit is set to realize the rapid completion of the texture loading on the outer surface of the augmented reality model, without the need to calculate the pixel value of each pixel point separately, which can reduce the calculation cost and improve the real-time performance.

[0073] The augmented reality texture processing device provided in the embodiment of the present invention can execute the augmented reality texture processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0074] Embodiment 3

[0075] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the third embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0076] like Figure 3 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0077] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

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

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

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

[0081] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains at least two Internet Protocol addresses; sends a node evaluation request including the at least two Internet Protocol addresses to a node evaluation device, wherein the node evaluation device selects an Internet Protocol address from the at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein the obtained Internet Protocol address indicates an edge node in a content distribution network.

[0082] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet Protocol addresses; selects an Internet Protocol address from the at least two Internet Protocol addresses; and returns the selected Internet Protocol address; wherein the received Internet Protocol address indicates an edge node in a content distribution network.

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

[0084] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0085] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0086] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

Claims

1. A texture processing method for augmented reality, characterized in that: include: Noise texture sampling is performed according to the image of the target object to obtain a texture image of the surface of the target object; When displaying an augmented reality model of a target object, determining a texture map of a surface of a model unit according to the texture image, the augmented reality model comprising a plurality of model units; Outputting the model unit according to the texture map; The texture image is a two-dimensional image, and the model unit is a three-dimensional image; Determining a texture map corresponding to the surface of the model unit according to the texture image includes: Acquire the three-dimensional coordinates of the vertices of the model unit; determine a plurality of vertices located on the outer surface of the augmented reality model according to the three-dimensional coordinates; map the three-dimensional coordinates of the plurality of vertices into two-dimensional coordinates; determine a mapping area in the texture image according to the two-dimensional coordinates; Extracting the texture map of the surface of the model unit from the texture image of the surface of the target object according to the map area; Outputting the model unit according to the texture map comprises: Using the texture map as a map of a first surface of the model unit, the first surface being a surface corresponding to an outer surface of the augmented reality model; When the model unit rotates or jumps, the texture map is used as a map of a second surface of the model unit, where the second surface is a surface other than the first surface.

2. The method according to claim 1, characterized in that The step of performing noise texture sampling according to the image of the target object to obtain a texture image of the surface of the target object includes: Acquire an appearance image of a target object; Performing noise texture sampling on the appearance image according to a preset division unit to obtain a sampling result; Rendering and splicing are performed according to the sampling results to obtain a texture image of the surface of the target object.

3. The method according to claim 1, characterized in that: The step of performing noise texture sampling according to the image of the target object to obtain a texture image of the surface of the target object includes: Obtaining texture distribution features in the image of the target object; Dividing the image of the target object according to the texture distribution characteristics to obtain a plurality of texture regions, each of which has the same texture characteristics; Noise texture sampling is performed in the texture area to obtain a texture image of the surface of the target object.

4. The method according to any one of claims 1 to 3, characterized in that The target object is a building, and the model unit is a cube unit.

5. A texture processing device for augmented reality, characterized in that: include: A sampling module is used to perform noise texture sampling according to the image of the target object to obtain a texture image of the surface of the target object; A texture determination module, used to determine a texture map of a surface of a model unit according to the texture image when displaying an augmented reality model of a target object, wherein the augmented reality model includes a plurality of model units; An output module, used for outputting the model unit according to the texture map; wherein the texture image is a two-dimensional image and the model unit is a three-dimensional image; The texture determination module is used to obtain the three-dimensional coordinates of the vertices of the model unit; determine multiple vertices located on the outer surface of the augmented reality model according to the three-dimensional coordinates; map the three-dimensional coordinates of the multiple vertices into two-dimensional coordinates; determine a mapping area in the texture image according to the two-dimensional coordinates; and intercept the texture map of the surface of the model unit from the texture image of the surface of the target object according to the mapping area; The output module is specifically used for: The texture map is used as a map of the first surface of the model unit, and the first surface is a surface corresponding to the outer surface of the augmented reality model; when the model unit rotates or jumps, the texture map is used as a map of the second surface of the model unit, and the second surface is a surface other than the first surface.

6. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the texture processing method for augmented reality as described in any one of claims 1 to 4.

7. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the texture processing method for augmented reality as claimed in any one of claims 1 to 4 when executed by a computer processor.

Citation Information

Patent Citations

  • Image processing method and device, and computer equipment

    CN108876886A

  • Three-dimensional object color adjusting method and device, computer equipment and computer readable storage medium

    CN108876931A

  • 3D model reconstruction method and device and electronic equipment

    CN110363860A

  • Image processing method, device and system, storage medium and image scanning equipment

    CN110458932A

  • Texture map generation method and system based on face grid model and electronic equipment

    CN110782507A