Panoramic image display methods, devices, electronic equipment and storage media
By replacing texture maps and merging layers in panoramic images, the problem of increased rendering resource consumption caused by texture replacement is solved, and rendering efficiency and image quality are improved.
Patent Information
- Application Number
- CN202110852833.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-27
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-07-27
AI Technical Summary
When replacing textures in panoramic images, as the number of materials and texture maps that need to be replaced increases, the resources consumed by offline rendering increase geometrically, resulting in low rendering efficiency.
By determining the material and target texture map of the texture to be replaced, find the corresponding diffuse reflection layer of the target texture map from the preset diffuse reflection layer collection, remove the light, and replace the material's texture map with the candidate texture map for offline rendering. , output the diffuse reflection layer set, intercept the corresponding area from the target diffuse reflection layer and cover it into the panoramic image, and merge the new diffuse reflection layer, global illumination layer and hybrid layer to generate the target panoramic image.
It reduces the resource consumption of offline rendering, improves the efficiency of texture replacement, and improves the rendering effect of processing similar materials while ensuring the quality of the image.
Smart Images

Figure CN113554738B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of image processing technology, and in particular to a panoramic image display method, device, electronic device and storage medium. Background Art
[0002] Currently, if it is necessary to replace the texture of certain specified materials in a panoramic image, it is necessary to specify corresponding texture maps for certain specified materials in the panoramic image and render the panoramic image offline, so that a new panoramic image can be obtained and displayed on the panoramic display end.
[0003] Once the number of materials that need to be replaced and the number of texture maps that need to be replaced increase, the number of combinations increases geometrically, and the number of times the panoramic image is rendered offline also increases geometrically, resulting in a large amount of rendering resources consumed by offline rendering. Summary of the invention
[0004] In order to solve the technical problem that once the number of materials that need texture replacement and the number of texture maps that need to be replaced increase, the number of combinations increases geometrically, and the corresponding number of offline rendering of panoramic images also increases geometrically, resulting in a large amount of rendering resources consumed by offline rendering, the embodiments of the present invention provide a panoramic image display method, device, electronic device and storage medium.
[0005] In a first aspect of an embodiment of the present invention, a panoramic image display method is first provided, the method comprising:
[0006] Determine the material of the texture to be replaced in the panoramic image, and the target texture map corresponding to the panoramic image;
[0007] Searching for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set;
[0008] wherein, removing lights from the panoramic image, replacing the texture map corresponding to the material with the candidate texture map and performing offline rendering, and outputting the diffuse reflection layer set;
[0009] Cutting out a corresponding area from the target diffuse reflection layer and covering it on the diffuse reflection layer of the panoramic image to obtain a new diffuse reflection layer;
[0010] The new diffuse reflection layer, the global illumination layer of the panoramic image and the mixed layer are merged to obtain a target panoramic image, and then displayed.
[0011] In an optional embodiment, the candidate texture map includes any candidate texture map among N candidate texture maps, where N is a positive integer, and a mapping relationship between the candidate texture map and a corresponding diffuse reflection layer in the diffuse reflection layer set is established;
[0012] The step of searching for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set includes:
[0013] According to the mapping relationship, a target diffuse reflection layer corresponding to the target texture map is searched from a preset diffuse reflection layer set.
[0014] In an optional implementation, the step of intercepting a corresponding area from the target diffuse reflection layer and covering the diffuse reflection layer of the panoramic image to obtain a new diffuse reflection layer includes:
[0015] Cutting out a corresponding area from the target diffuse reflection layer;
[0016] The target area is found from the diffuse reflection layer of the panoramic image, and the corresponding area is covered on the target area to obtain a new diffuse reflection layer.
[0017] In an optional implementation, the extracting a corresponding area from the target diffuse reflection layer includes:
[0018] According to the relative area of the material in the panoramic image, intercepting a corresponding area from the target diffuse reflection layer;
[0019] The step of searching the target area from the diffuse reflection layer of the panoramic image includes:
[0020] According to the relative area of the material in the panoramic image, a target area is found from the diffuse reflection layer of the panoramic image.
[0021] In an optional implementation, the relative area of the material in the panoramic image is specifically determined in the following manner:
[0022] Determining the output color of the material in the panoramic image, performing offline rendering, and outputting a material element layer corresponding to the panoramic image;
[0023] From the material element layer, a relative area of the material in the panoramic image is determined based on the output color of the material.
[0024] In an optional implementation, a global illumination layer, a diffuse reflection layer and other element layers corresponding to the panoramic image are output;
[0025] The remaining element layers are linearly faded and superimposed in sequence to obtain a mixed layer corresponding to the panoramic image.
[0026] In an optional implementation, merging the new diffuse reflection layer, the global illumination layer of the panoramic image, and the mixed layer to obtain a target panoramic image and displaying the image includes:
[0027] Perform positive superposition of the new diffuse reflection layer and the global illumination layer of the panoramic image to obtain a new global illumination layer;
[0028] The new global illumination layer is linearly faded and merged with the blending layer of the panoramic image to obtain a target panoramic image, which is then displayed.
[0029] In a second aspect of an embodiment of the present invention, a panoramic image display device is provided, the device comprising:
[0030] A material and texture determination module, used to determine the material of the texture to be replaced in the panoramic image, and the target texture map corresponding to the panoramic image;
[0031] A layer search module, used to search for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set;
[0032] A set creation module, used to remove lights in the panoramic image, replace the texture map corresponding to the material with the candidate texture map and perform offline rendering, and output the diffuse reflection layer set;
[0033] A layer covering module, used for intercepting a corresponding area from the target diffuse reflection layer, covering the diffuse reflection layer of the panoramic image, and obtaining a new diffuse reflection layer;
[0034] The layer merging module is used to merge the new diffuse reflection layer, the global illumination layer of the panoramic image and the mixed layer to obtain a target panoramic image and display it.
[0035] In a third aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0036] Memory, used to store computer programs;
[0037] The processor is used to implement the panoramic image display method described in the first aspect when executing the program stored in the memory.
[0038] In a fourth aspect of the embodiments of the present invention, a storage medium is further provided, wherein instructions are stored in the storage medium, and when the storage medium is run on a computer, the computer executes the panoramic image display method described in the first aspect above.
[0039] In a fifth aspect of the embodiments of the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the panoramic image display method described in the first aspect.
[0040] The technical solution provided by the embodiment of the present invention determines the material of the texture to be replaced in the panoramic image, and the target texture map corresponding to the panoramic image, and searches for the target diffuse reflection layer corresponding to the target texture map from the preset diffuse reflection layer set, wherein the lights in the panoramic image are removed, the texture map corresponding to the material is replaced with the candidate texture map and offline rendering is performed, the diffuse reflection layer set is output, the corresponding area is intercepted from the target diffuse reflection layer, and the diffuse reflection layer of the panoramic image is covered to obtain a new diffuse reflection layer, and the new diffuse reflection layer, the global illumination layer of the panoramic image, and the mixed layer are merged to obtain the target panoramic image, and then displayed. By removing the lights in the panoramic image, replacing the texture map corresponding to the material with the candidate texture map and performing offline rendering, a diffuse reflection layer set that does not depend on lighting is obtained, and the diffuse reflection layer is cropped and covered, and the layer merging technology is used to restore the rendering effect of the same material, the rendering resources consumed by offline rendering can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 It is a schematic diagram of an implementation flow of a panoramic image display method shown in an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of diffuse reflection layer area coverage shown in an embodiment of the present invention;
[0045] Figure 3 It is a schematic diagram of another diffuse reflection layer area coverage shown in an embodiment of the present invention;
[0046] Figure 4 A schematic diagram of layer merging shown in an embodiment of the present invention;
[0047] Figure 5 is a structural schematic diagram of a panoramic image display device shown in an embodiment of the present invention;
[0048] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0051] like Figure 1 FIG. 1 is a schematic diagram of an implementation flow of a panoramic image display method provided by an embodiment of the present invention. The method is applied to a processor and may specifically include the following steps:
[0052] S101, determining the material of the texture to be replaced in the panoramic image, and the target texture map corresponding to the panoramic image.
[0053] When displaying on the panoramic display terminal, the user can select the material of the texture to be replaced in the panoramic image, and the user can select the corresponding target texture map for this material, and the target texture map is used to replace the texture of the material with the target texture. For example, user A can select the wooden material of the texture to be replaced in the panoramic image, and user A can select the corresponding target texture map for this wooden material, and the target texture map is used to replace the horizontal grain of this wooden material with the vertical grain.
[0054] Thus, the embodiment of the present invention can determine the material of the texture to be replaced in the panoramic image selected by the user, and can determine the target texture map selected by the user for the material. For example, the embodiment of the present invention determines the wood material of the texture to be replaced in the panoramic image selected by user A, and determines the target texture map selected by user A for the wood material, and can replace the horizontal grain of the wood material with the vertical grain.
[0055] It should be noted that the panoramic image may be a panoramic image corresponding to a bedroom scene in the 3D design software, a panoramic image corresponding to a kitchen scene in the 3D design software, or a panoramic image corresponding to a living room scene in the 3D design software, and the embodiment of the present invention does not limit this. In addition, the material here may be a wooden material, a metal material, a plastic material, etc., and the embodiment of the present invention does not limit this.
[0056] S102, searching for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set.
[0057] In the embodiment of the present invention, the lights in the panoramic image are removed, the texture map corresponding to the material of the texture to be replaced in the panoramic image is replaced with the candidate texture map and offline rendering is performed to output a diffuse reflection layer set. In this way, a diffuse reflection layer set that does not depend on lighting is obtained through offline rendering, which can save a lot of rendering resources.
[0058] Here, the candidate texture map includes any candidate texture map among N candidate texture maps, where N is a positive integer, that is, N can be 1, 2, 3, 4, 5, etc., thereby establishing a mapping relationship between the candidate texture map and the corresponding diffuse reflection layer in the diffuse reflection layer set. Here, the diffuse reflection layer and the candidate texture map are mapped to each other. Figure 1 One to one correspondence.
[0059] For example, the lights in the panoramic image are removed, the horizontal grain map corresponding to the wood material in the panoramic image is replaced with the vertical grain map and rendered offline, the diffuse reflection layer A is output, and the mapping relationship between the vertical grain map and the diffuse reflection layer A is established;
[0060] The horizontal grain map corresponding to the wood material in the panoramic image is replaced with the cloud-like texture map and rendered offline, the diffuse reflection layer B is output, and a mapping relationship between the cloud-like texture map and the diffuse reflection layer B is established;
[0061] Replace the horizontal grain map corresponding to the wood material in the panoramic image with the tree texture map and perform offline rendering, output the diffuse reflection layer C, and establish a mapping relationship between the tree texture map and the diffuse reflection layer C;
[0062] After such a loop processing, the number of candidate texture maps is N, and N offline renderings are required to obtain N diffuse reflection layers. Since only N diffuse reflection layers are obtained by offline rendering, the rendering resources consumed by offline rendering can be saved. These N diffuse reflection layers can form a diffuse reflection layer set, and N mapping relationships are established accordingly.
[0063] It should be noted that the mapping relationship established here can be in the form of horizontal grain map-vertical grain map-diffuse reflection layer A corresponding to the wood material, horizontal grain map-cloudy texture map-diffuse reflection layer B corresponding to the wood material..., as shown in Table 1 below.
[0064]
[0065] Table 1
[0066] After the above steps, a diffuse reflection layer set can be output. The target diffuse reflection layer corresponding to the target texture map can be obtained by querying from the diffuse reflection layer set according to the mapping relationship established above.
[0067] For example, for a cloud-like texture map, according to the mapping relationship shown in Table 1 above, the target diffuse reflection layer corresponding to the cloud-like texture map is searched from the diffuse reflection layer set, that is, the diffuse reflection layer B shown in Table 1 above.
[0068] S103, intercepting a corresponding area from the target diffuse reflection layer, and covering the diffuse reflection layer of the panoramic image to obtain a new diffuse reflection layer.
[0069] For the target diffuse reflection layer, the embodiment of the present invention intercepts the corresponding area from the target diffuse reflection layer and covers the diffuse reflection layer of the panoramic image, so as to obtain a brand new diffuse reflection layer.
[0070] For example, for the diffuse reflection layer B corresponding to the cloud-like texture map, the embodiment of the present invention intercepts the corresponding area from the diffuse reflection layer B and covers it on the diffuse reflection layer (DIFFUSE) of the panoramic image, thereby obtaining a new diffuse reflection layer (DIFFUSE-REPLACE).
[0071] The corresponding area is intercepted from the target diffuse reflection layer, and the target area is found from the diffuse reflection layer of the panoramic image, and the corresponding area is covered on the target area, so that a new diffuse reflection layer can be obtained.
[0072] For example, a corresponding area is intercepted from the diffuse reflection layer B, and a target area is found from the diffuse reflection layer (DIFFUSE) of the panoramic image, and the corresponding area is covered on the target area, so that a new diffuse reflection layer (DIFFUSE-REPLACE) can be obtained.
[0073] Here, according to the relative area of the material of the texture to be replaced in the panoramic image, the corresponding area can be intercepted from the target diffuse reflection layer, and according to the relative area of the material of the texture to be replaced in the panoramic image, the target area can be found from the diffuse reflection layer of the panoramic image, and the corresponding area can be covered on the target area, so as to obtain a new diffuse reflection layer.
[0074] For example, Figure 2 As shown, according to the relative area of the wooden material in the panoramic image, the corresponding area is intercepted from the diffuse reflection layer B, and according to the relative area of the wooden material in the panoramic image, the target area is found from the diffuse reflection layer (DIFFUSE) of the panoramic image, and the corresponding area is covered on the target area, so that a new diffuse reflection layer (DIFFUSE-REPLACE) can be obtained.
[0075] It should be noted that the coordinates of the relative area, corresponding area, and target area are the same, but they correspond to different layers / images. Assuming that the relative area of the material to be replaced in the panoramic image is the central area in the panoramic image, the central area is also intercepted from the target diffuse reflection layer, and the central area is also found from the diffuse reflection layer (DIFFUSE) of the panoramic image. The coordinates and areas of the above three central areas are consistent.
[0076] The relative area of the material of the texture to be replaced in the panoramic image can be determined in the following way: determine the output color of the material of the texture to be replaced in the panoramic image, render it, output the material element layer corresponding to the panoramic image, and from the material element layer, determine the relative area of the above material in the panoramic image based on the output color of the above material.
[0077] For the material element layer (MATID), the layer can output the area of the specified material to the layer data according to the specified output color according to the preset mapping relationship between the material and the output color, so that the area information of the material in the panoramic image can be determined in the material element layer (MATID) according to the specified output color.
[0078] Based on this principle, for the material of the texture to be replaced in the panoramic image, the user can set the corresponding output color, which will be reflected in the material element layer (MATID), perform an offline rendering, and output the material element layer (MATID) corresponding to the panoramic image. From the material element layer (MATID), based on the output color of the material, the relative area of the material in the panoramic image can be determined.
[0079] For example, Figure 3 As shown, for the wooden material in the panoramic image, the user can set the corresponding output color, which will be reflected in the material element layer (MATID), perform an offline rendering, and output the material element layer (MATID) corresponding to the panoramic image. From the material element layer (MATID), based on the output color of the material, the relative area of the material in the panoramic image can be determined.
[0080] In addition, for the wooden material in the panoramic image, the user can set the corresponding output color, which will be reflected in the material element layer (MATID) and perform an offline rendering. The global illumination layer, diffuse reflection layer and other element layers corresponding to the panoramic image can also be output, and the other element layers can be linearly faded and superimposed in turn to obtain the mixed layer (MIX) corresponding to the panoramic image.
[0081] The remaining element layers here specifically include the following element layers: reflection layer (REFLECT), refraction layer (REFRACT), highlight layer (SPECULAR), scattering layer (SSS), caustics layer (CAUSTICS), fog layer (ATMOSPHERE), exterior layer (BACKGROUND), and self-illumination layer (SELFILLUM).
[0082] It should be noted that for the material of the texture to be replaced in the panoramic image, the user can set the corresponding output color, which will be reflected in the material element layer (MATID), perform an offline rendering, and output the material element layer (MATID), global illumination layer, diffuse reflection layer and other element layers corresponding to the panoramic image. In this way, the material texture area is divided by rendering the material element layer.
[0083] S104, merging the new diffuse reflection layer, the global illumination layer of the panoramic image, and the mixed layer to obtain a target panoramic image, and displaying the image.
[0084] The new diffuse layer (DIFFUSE-REPLACE), the global illumination layer of the panoramic image (RAWGI), and the mixed layer (MIX) are merged to obtain the target panoramic image (COLOR-REPLACE) and display it.
[0085] Specifically, the new diffuse reflection layer (DIFFUSE-REPLACE) is positively superimposed with the global illumination layer (RAWGI) of the panoramic image to obtain a new global illumination layer (GI) with diffuse reflection; then, the new global illumination layer (GI) is linearly faded and merged with the mixed layer (MIX) of the panoramic image to obtain the target panoramic image (COLOR-REPLACE), which is then displayed on the panoramic display end.
[0086] In this way, by cutting, overwriting, and merging the diffuse layer (new diffuse layer (DIFFUSE-REPLACE), global illumination layer of panoramic image (RAWGI), mixed layer (MIX), the rendering effect of the same material can be restored. In this way, the number of materials and texture maps that need to be replaced can be increased while ensuring the efficiency and quality of the output, and the rendering resources consumed by offline rendering can be reduced.
[0087] For example, Figure 4 As shown, for the reflection layer (REFLECT), refraction layer (REFRACT), highlight layer (SPECULAR), scattering layer (SSS), caustics layer (CAUSTICS), fog layer (ATMOSPHERE), exterior layer (BACKGROUND), and self-illumination layer (SELFILLUM), linear dodge and overlay are performed in sequence to obtain a mixed layer (MIX) corresponding to the panoramic image.
[0088] By performing positive superposition of the new diffuse reflection layer (DIFFUSE-REPLACE) and the global illumination layer (RAWGI) of the panoramic image, a new global illumination layer (GI) with diffuse reflection can be obtained; then, the new global illumination layer (GI) is linearly faded and merged with the mixed layer (MIX) of the panoramic image to obtain the target panoramic image (COLOR-REPLACE), which is then displayed on the panoramic display end.
[0089] Through the above description of the technical solution provided by the embodiment of the present invention, the material of the texture to be replaced in the panoramic image and the target texture map corresponding to the panoramic image are determined, and the target diffuse reflection layer corresponding to the target texture map is searched from the preset diffuse reflection layer set, wherein the lights in the panoramic image are removed, the texture map corresponding to the material is replaced with the candidate texture map and offline rendering is performed, the diffuse reflection layer set is output, the corresponding area is intercepted from the target diffuse reflection layer, and the diffuse reflection layer of the panoramic image is covered to obtain a new diffuse reflection layer, the new diffuse reflection layer, the global illumination layer of the panoramic image and the mixed layer are merged to obtain the target panoramic image, and then displayed.
[0090] In this way, the material texture area is identified and divided by rendering the material element layer, a large amount of rendering resources are saved by rendering the diffuse reflection layer that does not rely on light, and the rendering effect of the same material is restored by cutting and covering the diffuse reflection layer and merging the layer technology. Under the premise of ensuring the efficiency and quality of the output, the number of materials that need to be replaced and the number of texture maps that need to be replaced can be increased, and the rendering resources consumed by offline rendering can be reduced.
[0091] Corresponding to the above method embodiment, the embodiment of the present invention also provides a panoramic image display device, such as Figure 5 As shown, the device may include a material and map determination module 510 , a layer search module 520 , a collection creation module 530 , a layer coverage module 540 , and a layer merging module 550 .
[0092] A material and texture determination module 510 is used to determine the material of the texture to be replaced in the panoramic image, and the target texture texture corresponding to the panoramic image;
[0093] A layer search module 520 is used to search for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set;
[0094] A set creation module 530 is used to remove the lights in the panoramic image, replace the texture map corresponding to the material with the candidate texture map and perform offline rendering, and output the diffuse reflection layer set;
[0095] A layer covering module 540 is used to intercept a corresponding area from the target diffuse reflection layer and cover it on the diffuse reflection layer of the panoramic image to obtain a new diffuse reflection layer;
[0096] The layer merging module 550 is used to merge the new diffuse reflection layer, the global illumination layer of the panoramic image and the mixed layer to obtain a target panoramic image and display it.
[0097] The embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, it includes a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64.
[0098] Memory 63, used for storing computer programs;
[0099] The processor 61 is used to execute the program stored in the memory 63 to implement the following steps:
[0100] Determine the material of the texture to be replaced in the panoramic image, and the target texture map corresponding to the panoramic image; search for the target diffuse reflection layer corresponding to the target texture map from the preset diffuse reflection layer set; wherein, remove the lights in the panoramic image, replace the texture map corresponding to the material with the candidate texture map and perform offline rendering, and output the diffuse reflection layer set; intercept the corresponding area from the target diffuse reflection layer, cover the diffuse reflection layer of the panoramic image, and obtain a new diffuse reflection layer; merge the new diffuse reflection layer, the global illumination layer of the panoramic image, and the mixed layer to obtain the target panoramic image, and display it.
[0101] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0102] The communication interface is used for communication between the above electronic device and other devices.
[0103] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0104] The above-mentioned processor 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), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0105] In another embodiment of the present invention, a storage medium is provided, in which instructions are stored. When the storage medium is run on a computer, the computer executes the panoramic image display method described in any of the above embodiments.
[0106] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute the panoramic image display method described in any one of the above embodiments.
[0107] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium, or transmitted from one storage medium to another storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0108] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0109] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A panoramic image display method, characterized in that: The method comprises: Determine the material of the texture to be replaced in the panoramic image, and the target texture map corresponding to the panoramic image; Searching for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set; wherein, removing lights from the panoramic image, replacing the texture map corresponding to the material with the candidate texture map and performing offline rendering, and outputting the diffuse reflection layer set; The method comprises: intercepting a corresponding area from the target diffuse reflection layer, covering the corresponding area on the diffuse reflection layer of the panoramic image, and obtaining a new diffuse reflection layer, including: intercepting a corresponding area from the target diffuse reflection layer; searching for a target area from the diffuse reflection layer of the panoramic image, covering the corresponding area on the target area, and obtaining a new diffuse reflection layer; The extracting the corresponding area from the target diffuse reflection layer comprises: extracting the corresponding area from the target diffuse reflection layer according to the relative area of the material in the panoramic image; Merging the new diffuse reflection layer, the global illumination layer of the panoramic image, and the mixed layer to obtain a target panoramic image, and displaying the image; The searching for the target area from the diffuse reflection layer of the panoramic image comprises: searching for the target area from the diffuse reflection layer of the panoramic image according to the relative area of the material in the panoramic image; The relative area of the material in the panoramic image is specifically determined in the following manner: determining the output color of the material in the panoramic image, performing offline rendering, and outputting a material element layer corresponding to the panoramic image; from the material element layer, determining the relative area of the material in the panoramic image based on the output color of the material.
2. The method according to claim 1, characterized in that The candidate texture map includes any candidate texture map among N candidate texture maps, where N is a positive integer, and a mapping relationship between the candidate texture map and a corresponding diffuse reflection layer in the diffuse reflection layer set is established; The step of searching for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set includes: According to the mapping relationship, a target diffuse reflection layer corresponding to the target texture map is searched from a preset diffuse reflection layer set.
3. The method according to claim 1, characterized in that The method further comprises: Outputting the global illumination layer, diffuse reflection layer and other element layers corresponding to the panoramic image; The remaining element layers are linearly faded and superimposed in sequence to obtain a mixed layer corresponding to the panoramic image.
4. The method according to claim 1, characterized in that: The step of merging the new diffuse reflection layer, the global illumination layer of the panoramic image, and the mixed layer to obtain a target panoramic image and displaying the image comprises: Perform positive superposition of the new diffuse reflection layer and the global illumination layer of the panoramic image to obtain a new global illumination layer; The new global illumination layer is linearly faded and merged with the blending layer of the panoramic image to obtain a target panoramic image, which is then displayed.
5. A panoramic image display device, characterized in that: The device comprises: A material and texture determination module, used to determine the material of the texture to be replaced in the panoramic image, and the target texture map corresponding to the panoramic image; A layer search module, used to search for a target diffuse reflection layer corresponding to the target texture map from a preset diffuse reflection layer set; A set creation module, used to remove lights in the panoramic image, replace the texture map corresponding to the material with the candidate texture map and perform offline rendering, and output the diffuse reflection layer set; The layer covering module is used to intercept the corresponding area from the target diffuse reflection layer, cover it on the diffuse reflection layer of the panoramic image, and obtain a new diffuse reflection layer, including: intercepting the corresponding area from the target diffuse reflection layer; searching for the target area from the diffuse reflection layer of the panoramic image, covering the corresponding area with the target area, and obtaining a new diffuse reflection layer; The extracting the corresponding area from the target diffuse reflection layer comprises: extracting the corresponding area from the target diffuse reflection layer according to the relative area of the material in the panoramic image; A layer merging module, used for merging the new diffuse reflection layer, the global illumination layer of the panoramic image and the mixed layer to obtain a target panoramic image and display it; The searching for the target area from the diffuse reflection layer of the panoramic image comprises: searching for the target area from the diffuse reflection layer of the panoramic image according to the relative area of the material in the panoramic image; The relative area of the material in the panoramic image is specifically determined in the following manner: determining the output color of the material in the panoramic image, performing offline rendering, and outputting a material element layer corresponding to the panoramic image; from the material element layer, determining the relative area of the material in the panoramic image based on the output color of the material.
6. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 4 when executing a program stored in a memory.
7. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Image rendering method and apparatus
CN105678831A
Texture replacing method based on two dimension image
CN106600712A
Role light environment simulation method and device and VR equipment
CN108447112A
Graphics rendering pre-processing method and system
CN108986200A
Method and device for acquiring merged map, storage medium, processor and terminal
CN109603155A
