Image processing method, device, computer equipment and storage medium

By splicing, expanding and pixel fusion processing of three-dimensional scene tiles, the problem of low accuracy of three-dimensional scene maps in the prior art is solved, and high-precision scene map generation is achieved.

CN112907451BActive Publication Date: 2025-01-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110326419.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2025-01-10
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

In the prior art, in order to improve efficiency, the accuracy of the scene map is usually reduced, resulting in the low accuracy of the scene map and cannot meet the high-precision requirements.

Method used

By splicing and expanding multiple initial scene tiles in a three-dimensional scene, combined with pixel fusion processing, a high-precision target scene map is generated to ensure the consistency of pixel values ​​at the joints between scene expansion tiles.

Benefits of technology

High-precision three-dimensional scene map generation is realized, which avoids pixel differences between the initial scene tiles and improves the overall accuracy and quality of the scene map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112907451B_ABST
    Figure CN112907451B_ABST
Patent Text Reader

Abstract

The present application relates to an image processing method, device, computer equipment and storage medium. The method comprises: splicing multiple initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene including each of the initial scene tiles; respectively expanding each of the initial scene tiles in the overall scene graph to obtain a scene expansion tile; each of the adjacent scene expansion tiles in the scene expansion tiles has an overlapping area; performing pixel fusion processing on the pixel values ​​belonging to different scene expansion tiles in each overlapping area to obtain a target pixel value corresponding to each overlapping area; based on the pixel values ​​of each of the initial scene tiles and the target pixel values ​​of each of the overlapping areas, performing tile fusion processing on each of the scene expansion tiles to generate a target scene graph corresponding to the three-dimensional scene. The present method can generate a high-precision scene graph in a three-dimensional scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, apparatus, computer device and storage medium. Background Art

[0002] In computer graphics, scene graphs can be used to organize and manage scene data of objects in a three-dimensional virtual scene. Scene graphs can include various maps required in a virtual scene, such as height maps, color maps, and normal maps. For example, the height values ​​in a three-dimensional scene can be stored through the pixel values ​​of the height map. Generally, the greater the brightness in the height map, the higher the height. Before rendering a three-dimensional scene, the required scene graph can be pre-generated through art tools.

[0003] In the related art, for a three-dimensional scene with a large area, the accuracy of the overall scene graph is usually reduced to generate the required scene graph. However, this method will result in a relatively low accuracy of the generated scene graph. Summary of the invention

[0004] Based on this, it is necessary to provide an image processing method, apparatus, computer device and storage medium that can effectively generate high-precision scene graphs in response to the above technical problems.

[0005] An image processing method, the method comprising:

[0006] Splicing a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles;

[0007] Expanding each of the initial scene blocks in the overall scene graph to obtain scene expansion blocks; adjacent scene expansion blocks in each of the scene expansion blocks have overlapping areas;

[0008] Performing pixel fusion processing on pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain target pixel values ​​corresponding to each of the overlapping areas;

[0009] Based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas, block fusion processing is performed on each of the scene expansion blocks to generate a target scene graph corresponding to the three-dimensional scene.

[0010] An image processing device, comprising:

[0011] A tile splicing module, used for splicing a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles;

[0012] A block expansion module, used for respectively expanding each of the initial scene blocks in the overall scene graph to obtain a scene expansion block; adjacent scene expansion blocks in each of the scene expansion blocks have an overlapping area;

[0013] A pixel fusion module, used to perform pixel fusion processing on pixel values ​​belonging to different scene expansion blocks in each overlapping area to obtain a target pixel value corresponding to each overlapping area;

[0014] The block fusion module is used to perform block fusion processing on each of the scene expansion blocks based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas to generate a target scene graph corresponding to the three-dimensional scene.

[0015] In one embodiment, the tile expansion module is also used to determine the expansion direction corresponding to each of the initial scene tiles according to the position of each of the initial scene tiles in the overall scene graph; and to expand each of the initial scene tiles according to the expansion direction to obtain a scene expansion tile corresponding to each of the initial scene tiles.

[0016] In one embodiment, the tile expansion module is also used to determine the offset distance corresponding to each initial scene tile based on the center point of the overall scene graph and the center point of each initial scene tile; expand each initial scene tile according to the expansion direction and offset distance corresponding to each initial scene tile to obtain the corresponding expansion area; and generate a scene expansion tile corresponding to each initial scene tile based on each initial scene tile and the expansion area corresponding to each initial scene tile.

[0017] In one embodiment, the tile expansion module is also used to offset in the expansion direction corresponding to each of the initial scene tiles according to the offset distance corresponding to each of the initial scene tiles, and determine the expansion area corresponding to each of the initial scene tiles according to the offset initial scene tiles; determine the pixel value of the expansion area according to the pixel value of the initial scene tiles after the offset; and obtain the scene expansion tiles corresponding to each of the initial scene tiles according to the pixel values ​​of each of the initial scene tiles and the pixel values ​​of the expansion area of ​​each of the initial scene tiles.

[0018] In one embodiment, the pixel fusion module is also used to determine the pixel fusion ratio corresponding to different scene extension blocks in each overlapping area according to the positional relationship corresponding to different scene extension blocks in each overlapping area; according to the pixel fusion ratio, pixel fusion processing is performed on the pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain the target pixel values ​​corresponding to each overlapping area.

[0019] In one embodiment, the pixel fusion module is also used to divide each of the overlapping areas into multiple sub-areas; for each sub-area, according to the positional relationship corresponding to different scene extension blocks in each of the overlapping areas, the pixel fusion ratio corresponding to the different scene extension blocks in the sub-areas of each of the overlapping areas is determined; according to the pixel fusion ratio and pixel value belonging to different scene extension blocks in each of the sub-areas, the target pixel value of each of the sub-areas is determined; according to the target pixel value corresponding to each of the sub-areas in each of the overlapping areas, the target pixel value corresponding to each of the overlapping areas is obtained.

[0020] In one embodiment, the pixel fusion module is also used to determine the pixel fusion ratio corresponding to different scene extension blocks in the sub-areas in each overlapping area according to the positional relationship between adjacent scene extension blocks in each overlapping area and the position of each sub-area in the corresponding overlapping area.

[0021] In one embodiment, the pixel fusion module is further used to perform step-by-step pixel fusion processing on adjacent pixel values ​​belonging to different scene expansion blocks in each overlapping area according to the position direction of each overlapping area, so as to obtain the target pixel value corresponding to each overlapping area.

[0022] In one embodiment, the position direction of the overlapping area includes a first direction and a second direction; the pixel fusion module is also used to perform pixel fusion processing on the pixel values ​​belonging to different scene extension blocks in each overlapping area in the first direction to obtain the target pixel value of the overlapping area in the first direction; for the overlapping area in the second direction, perform pixel fusion processing on the pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain the target pixel value of the overlapping area in the second direction.

[0023] In one embodiment, the tile fusion module is also used to perform tile fusion processing on each of the scene extension tiles in the first direction according to the pixel values ​​of each of the initial scene tiles in the first direction and the target pixel values ​​of the overlapping areas in the first direction to obtain the scene fusion tiles in the first direction; perform tile fusion processing on each of the scene extension tiles in the second direction according to the pixel values ​​of each of the initial scene tiles in the second direction and the target pixel values ​​of the overlapping areas of the first direction and the second direction to generate a target scene graph corresponding to the three-dimensional scene.

[0024] In one embodiment, the target scene graph is applied to a three-dimensional scene application corresponding to the three-dimensional scene; the image processing device under the above-mentioned three-dimensional scene also includes an image segmentation module, which is used to determine the number of scene graphs and the size of the scene graphs that match the three-dimensional scene application; according to the number of scene graphs and the size of the scene graph, the target scene graph is divided into multiple target scene graph sub-blocks, so that the three-dimensional scene application loads the corresponding target scene graph sub-block according to the scene picture to be displayed during runtime, and renders the scene picture based on the scene data of the target scene graph sub-block.

[0025] In one embodiment, the initial scene tile includes an initial terrain height map; the tile fusion module is also used to determine the target height value of each overlapping area according to the target pixel value of each overlapping area; determine the target height value of the area excluding the overlapping area in each initial terrain height map according to the pixel value of each initial terrain height map; based on the target height value of each overlapping area and the target height value of the area excluding the overlapping area in each initial terrain height map, perform tile fusion processing on each scene expansion tile to generate a target terrain height map corresponding to the three-dimensional scene.

[0026] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0027] Splicing a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles;

[0028] Expanding each of the initial scene blocks in the overall scene graph to obtain scene expansion blocks; adjacent scene expansion blocks in each of the scene expansion blocks have overlapping areas;

[0029] Performing pixel fusion processing on pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain target pixel values ​​corresponding to each of the overlapping areas;

[0030] Based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas, block fusion processing is performed on each of the scene expansion blocks to generate a target scene graph corresponding to the three-dimensional scene.

[0031] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0032] Splicing a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles;

[0033] Expanding each of the initial scene blocks in the overall scene graph to obtain scene expansion blocks; adjacent scene expansion blocks in each of the scene expansion blocks have overlapping areas;

[0034] Performing pixel fusion processing on pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain target pixel values ​​corresponding to each of the overlapping areas;

[0035] Based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas, block fusion processing is performed on each of the scene expansion blocks to generate a target scene graph corresponding to the three-dimensional scene.

[0036] A computer program product or a computer program, wherein the computer program product or the computer program comprises computer instructions, wherein the computer instructions are stored in a computer-readable storage medium; a processor of the computer device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, the following steps are implemented:

[0037] Splicing a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles;

[0038] Expanding each of the initial scene blocks in the overall scene graph to obtain scene expansion blocks; adjacent scene expansion blocks in each of the scene expansion blocks have overlapping areas;

[0039] Performing pixel fusion processing on pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain target pixel values ​​corresponding to each of the overlapping areas;

[0040] Based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas, block fusion processing is performed on each of the scene expansion blocks to generate a target scene graph corresponding to the three-dimensional scene.

[0041] The above-mentioned image processing method, device, computer equipment and storage medium can effectively obtain an overall scene graph corresponding to the three-dimensional scene including each initial scene block by splicing multiple initial scene blocks under the three-dimensional scene. Then, by respectively expanding each initial scene block in the overall scene graph, adjacent scene expansion blocks in each scene expansion block obtained have overlapping areas. Thus, by performing pixel fusion processing on the pixel values ​​belonging to different scene expansion blocks in each overlapping area, the pixel value transition between adjacent scene expansion blocks can be achieved, thereby obtaining a more accurate target pixel value corresponding to each overlapping area. Then, based on the pixel values ​​of each initial scene block and the target pixel value of each overlapping area, each scene expansion block is subjected to a block fusion processing to effectively fuse the seams between each scene expansion block, effectively avoiding the pixel difference defect at the seams between each initial scene block, making the target pixel value at the seams between each initial scene block more accurate, thereby effectively improving the accuracy of the target scene graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A diagram showing an application environment of an image processing method in an embodiment;

[0043] Figure 2 is a schematic flow chart of an image processing method in one embodiment;

[0044] Figure 3 is a schematic diagram of splicing multiple initial scene tiles in one embodiment;

[0045] Figure 4 is an overall scene diagram in one embodiment;

[0046] Figure 5 is an overall scene diagram in another embodiment;

[0047] Figure 6 is a schematic diagram of performing expansion processing on each initial scene block in one embodiment;

[0048] Figure 7 is a schematic diagram of expanding each initial scene block in one embodiment;

[0049] Figure 8 is a schematic diagram of performing pixel fusion processing on an overlapping area in one embodiment;

[0050] Fig. 9 is a schematic diagram of performing fusion processing on each initial scene block in another embodiment;

[0051] Fig.10 is a schematic diagram of processing each initial scene block in one embodiment;

[0052] Fig.11 is a terrain height map in one embodiment;

[0053] Fig.12 A flowchart of terrain height map processing in one embodiment;

[0054] Fig.13 is a structural block diagram of an image processing device in one embodiment;

[0055] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] The image processing method in a three-dimensional scene provided by the present application can be applied to a computer device. The computer device can be a terminal or a server. It is understandable that the image processing method in a three-dimensional scene provided by the present application can be applied to a terminal, can also be applied to a server, can also be applied to a system including a terminal and a server, and can be implemented through the interaction between the terminal and the server.

[0058] The image processing method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. Specifically, the terminal 102 can obtain multiple initial scene tiles from the server 104. The terminal 102 then splices the multiple initial scene tiles under the three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene including each initial scene tile; each initial scene tile in the overall scene graph is expanded respectively to obtain a scene expansion tile; there is an overlapping area between adjacent scene expansion tiles in each scene expansion tile; pixel values ​​belonging to different scene expansion tiles in each overlapping area are subjected to pixel fusion processing to obtain target pixel values ​​corresponding to each overlapping area; based on the pixel values ​​of each initial scene tile and the target pixel values ​​of each overlapping area, each scene expansion tile is subjected to tile fusion processing to generate a target scene graph corresponding to the three-dimensional scene.

[0059] Among them, the terminal 102 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected through wired or wireless communication, and this application does not limit this.

[0060] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0061] Computer Vision Technology (Computer Vision, CV) Computer vision is a science that studies how to make machines "see". To put it more concretely, it refers to the use of cameras and computers to replace human eyes to identify, follow and measure targets, and further perform graphics processing to make computer processing more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition. It can be understood that the image processing method in the three-dimensional scene of this application is based on computer vision technology to process the scene graph, so that a high-precision scene graph can be effectively generated.

[0062] In one embodiment, Figure 2As shown, an image processing method is provided, and the method is applied to a computer device as an example for explanation. The computer device may be Figure 1 It is understood that the method can also be applied to a system including a terminal and a server and implemented through the interaction between the terminal and the server. In this embodiment, the following steps are included:

[0063] S202, stitching together a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles.

[0064] It can be understood that a three-dimensional scene can represent various material forms, spatial relationships and other information of the real world simulated by virtualization technology. A three-dimensional scene can display the form of objects more beautifully and also display the virtual reality world more intuitively. For example, objects in a three-dimensional scene can include at least one of terrain, houses, trees, people, etc.

[0065] Through computer 3D graphics display, a 3D simulation environment can be displayed on the screen, and all objects in the environment can be described by 3D scene data. For example, 3D scene data can be loaded into a 3D scene to display a 3D simulation environment. For example, the 3D scene data includes at least one of scene graph, vector data, terrain data, model data, grid data, etc.

[0066] It can be understood that the scene graph refers to the scene data used to organize and manage objects in the three-dimensional virtual scene, and can also manage the scene data in the three-dimensional scene in the form of layers. For example, the scene graph may include at least one of the height map, color map, normal map, etc. required in the virtual scene.

[0067] Taking the height map as an example, the height values ​​in the three-dimensional scene can be stored through the pixel values ​​in the height map. The height map can be specifically in the form of a grayscale map. Generally, the greater the brightness in the height map, the higher the height. For example, a corresponding height map can be generated for the terrain in the three-dimensional scene. The more pixels per unit size and the richer the black and white color changes, the richer the terrain changes.

[0068] It is understandable that for a 3D scene with a large area, it is usually impossible to complete a large-scale scene graph at one time, so the number of scene graphs required is large. Before rendering the 3D scene, multiple scene graphs required for the 3D scene can be generated in advance. For example, the required scene graphs can be generated in advance using art tools.

[0069] Among them, the multiple initial scene tiles in the three-dimensional scene are the multiple scene graphs required for the pre-generated three-dimensional scene. Each initial scene tile is a scene graph corresponding to a part of the area under the three-dimensional scene, and multiple initial scene tiles can be combined into an overall scene graph corresponding to the three-dimensional scene. It can be understood that the overall scene graph refers to a scene graph covering the entire area of ​​the three-dimensional scene. Among them, multiple means at least two or more.

[0070] After the computer device obtains multiple initial scene tiles in the three-dimensional scene, it splices the multiple initial scene tiles in the three-dimensional scene to combine into an overall scene graph corresponding to the three-dimensional scene. The three-dimensional scene includes a preset overall center point, and each initial scene tile also includes a corresponding center point. The overall center point of the three-dimensional scene is the center point of the overall scene area in the three-dimensional scene. The center point of the initial scene tile is the center point of the scene area in the initial scene tile.

[0071] Specifically, the computer device can determine the position of each initial scene tile in the three-dimensional scene according to the overall center point of the three-dimensional scene and the center point corresponding to each initial scene tile. The computer device then splices multiple initial scene tiles according to the position of each initial scene tile in the three-dimensional scene, so as to accurately combine them into an overall scene graph corresponding to the three-dimensional scene. Among them, the overall scene graph formed by splicing still includes each initial scene tile.

[0072] For example, Figure 3 As shown, it is a schematic diagram of splicing multiple initial scene tiles in one embodiment. The multiple initial scene tiles in the three-dimensional scene include initial scene tile 31, initial scene tile 32, initial scene tile 33 and initial scene tile 34. By splicing the multiple initial scene tiles according to the position of each initial scene tile in the three-dimensional scene, the overall scene graph 35 corresponding to the three-dimensional scene can be combined.

[0073] S204, respectively expanding each initial scene block in the overall scene graph to obtain a scene expansion block; adjacent scene expansion blocks in each scene expansion block have an overlapping area.

[0074] The expansion refers to further expansion and increase on the original basis. The expansion process is performed on the initial scene block, that is, the area of ​​the original initial scene block is expanded. After the expansion, the initial scene block has a newly increased area compared with the original initial scene block.

[0075] It can be understood that the overlapping area refers to the common area between multiple images, that is, if two or more images have overlapping common areas, the common area is the overlapping area that overlaps each other.

[0076] Among them, the multiple initial scene tiles are spliced ​​together, and the initial scene tiles in the obtained overall scene graph are tightly fitted, and each initial scene tile in the overall scene graph has an adjacent initial scene tile.

[0077] After the computer device splices the overall scene graph, it expands each initial scene block in the overall scene graph. Specifically, the computer device can expand each initial scene block outward by a preset proportion of the area on the original basis according to a preset expansion ratio, thereby generating an expanded scene expansion block corresponding to each initial scene block.

[0078] For each initial scene block, the computer device may expand in the direction with adjacent initial scene blocks, and not expand in the direction where each initial scene block does not have adjacent initial scene blocks. That is, the outer edge of the overall scene graph is not expanded to ensure that after the initial scene blocks in the overall scene graph are expanded, the overall size of each scene expansion block does not exceed the range of the overall scene graph.

[0079] It can be understood that since the area of ​​each scene expansion block after expansion has an additional expansion area extending outward compared to each initial scene block before expansion, there is an overlapping area between adjacent scene expansion blocks in each scene expansion block.

[0080] S206, performing pixel fusion processing on the pixel values ​​belonging to different scene expansion blocks in each overlapping area to obtain a target pixel value corresponding to each overlapping area.

[0081] Among them, pixel is the smallest unit that can be displayed on a computer screen. Pixel value, also known as color value, is the specific value of the three components of RGB (Red, Green, Blue, i.e. the three primary colors of red, green and blue) that represent a specific pixel in an image. It is the value assigned by the computer when the image is digitized, and records the average brightness information or average reflection density information of a small square in the image. The pixel value usually ranges from 0 to 255.

[0082] For grayscale images, the pixel value is the grayscale value, and the RGB components of each pixel in the grayscale image have the same value. Grayscale images are obtained by the transition between pure black and pure white. Different grayscale values ​​are obtained by mixing pure black and pure white in different proportions.

[0083] It can be understood that each pixel point in the initial scene block includes a corresponding pixel value. After each initial scene block is expanded, the expanded area also includes the expanded pixel value, thereby effectively obtaining a scene expansion block corresponding to each initial scene block.

[0084] The overlapping area includes local areas corresponding to multiple extended image blocks of different scenes, and therefore, each overlapping area includes pixel values ​​belonging to multiple extended image blocks of different scenes. The computer device further performs pixel fusion processing on the pixel values ​​of the overlapping areas to determine the final target pixel values ​​corresponding to each overlapping area.

[0085] Specifically, the computer device can assign corresponding pixel fusion ratios to each different scene extension block in the overlapping area, and then perform pixel fusion on the pixel values ​​belonging to different scene extension blocks in each overlapping area according to the pixel fusion ratio corresponding to each scene extension block, and then obtain the target pixel values ​​corresponding to each overlapping area based on the fused pixel values.

[0086] S208, based on the pixel values ​​of each initial scene block and the target pixel values ​​of each overlapping area, perform block fusion processing on each scene expansion block to generate a target scene graph corresponding to the three-dimensional scene.

[0087] It can be understood that the tile fusion process may refer to fusing multiple tiles into a complete image. Among them, each initial scene tile in the overall scene graph is expanded, and after the corresponding scene expansion tile is obtained, the expanded overall scene graph is obtained. The expanded overall scene graph includes each overlapping area and non-overlapping area, and the non-overlapping area is the area other than the overlapping area in the original initial scene tile.

[0088] The computer device performs pixel fusion processing on the pixel values ​​of the overlapping areas belonging to different scene extension blocks to obtain the target pixel values ​​corresponding to each overlapping area, and then further performs block fusion processing on each scene extension block according to the target pixel values ​​of each overlapping area and the pixel values ​​of the areas other than the overlapping areas in the initial scene block.

[0089] Specifically, the computer device may first calculate the target pixel value corresponding to each overlapping area, and then perform block fusion processing on each scene expansion block respectively.

[0090] In other embodiments, the computer device can also perform pixel fusion processing and block fusion processing on two adjacent scene expansion blocks at the same time to fuse each scene expansion block in steps. Specifically, the computer device can determine the target pixel value of the overlapping area between adjacent scene expansion blocks for two adjacent scene expansion blocks, and then perform block fusion processing on the adjacent scene expansion blocks. Then the computer device continues to perform pixel fusion processing and block fusion processing on the fused block and its adjacent scene expansion blocks. Until a final complete image is fused, and then this complete image is used to generate a target scene map corresponding to the three-dimensional scene.

[0091] In the above-mentioned image processing method under the three-dimensional scene, the computer device first splices multiple initial scene tiles under the three-dimensional scene, so as to effectively obtain the overall scene graph corresponding to the three-dimensional scene including each initial scene tile. The computer device expands each initial scene tile in the overall scene graph respectively, and the adjacent scene expansion tiles in each scene expansion tile obtained have overlapping areas. Thus, by performing pixel fusion processing on the pixel values ​​belonging to different scene expansion tiles in each overlapping area, the pixel value transition between each adjacent scene expansion tile can be achieved, so as to obtain a more accurate target pixel value corresponding to each overlapping area. The computer device then performs tile fusion processing on each scene expansion tile based on the pixel value of each initial scene tile and the target pixel value of each overlapping area, so as to effectively fuse the seams between each scene expansion tile, so as to effectively generate a high-precision target scene graph corresponding to the three-dimensional scene.

[0092] In one embodiment, each initial scene block in the overall scene graph is expanded to obtain a scene expansion block, including: determining an expansion direction corresponding to each initial scene block according to the position of each initial scene block in the overall scene graph; and expanding each initial scene block according to the expansion direction to obtain a scene expansion block corresponding to each initial scene block.

[0093] The expansion direction may refer to a direction in which the edge of the original image is expanded and enlarged to increase the size of the original image.

[0094] It can be understood that each initial scene tile is generated according to the overall scene model corresponding to the scene object in the preset three-dimensional scene, and the overall scene model can be a scene grid model generated according to a preset overall scene size. For example, an overall terrain model. Specifically, each initial scene tile can be divided into multiple tile ranges according to the range of the overall terrain model, and then multiple corresponding initial scene tiles are generated based on the multiple tile ranges.

[0095] Specifically, when a computer device splices multiple initial scene tiles in a three-dimensional scene, it splices the initial scene tiles according to the positions corresponding to the initial scene tiles set in the overall scene model to combine them into an overall scene graph of the size of the overall scene.

[0096] The computer device then determines the position of each initial scene block in the overall scene graph based on the center point of the overall scene graph and the center point corresponding to each initial scene block. Then, based on the position of each initial scene block in the overall scene graph, the expansion direction corresponding to each initial scene block is determined. For example, when there are adjacent initial scene blocks around the initial scene block, the expansion direction of the initial scene block is determined to be the direction with the adjacent initial scene blocks. Among them, each initial scene block includes at least one expansion direction.

[0097] like Figure 4 FIG. 1 is a diagram showing an overall scene in one embodiment. Figure 4 The overall scene graph 42 includes four initial scene tiles, namely initial scene tile ①, initial scene tile ②, initial scene tile ③ and initial scene tile ④. The expansion directions of initial scene tile ①, initial scene tile ②, initial scene tile ③ and initial scene tile ④ are respectively indicated by arrows in each initial scene tile. Figure 5 FIG. 1 is an overall scene diagram of another embodiment. Figure 5 The overall scene graph 52 includes sixteen initial scene tiles 1-16. The expansion directions of the initial scene tile 1, the initial scene tile 3 and the initial scene tile 6 are shown by arrows.

[0098] The computer device then expands each initial scene block according to the expansion direction, that is, on the basis of each initial scene block, a preset proportion of area is added to the edge of the initial scene block according to the expansion direction, so as to effectively obtain the scene expansion blocks corresponding to each initial scene block.

[0099] In one embodiment, each initial scene block is expanded according to an expansion direction to obtain a scene expansion block corresponding to each initial scene block, including: determining an offset distance corresponding to each initial scene block according to a center point of the overall scene graph and a center point of each initial scene block; expanding each initial scene block according to an expansion direction and an offset distance corresponding to each initial scene block to obtain a corresponding expansion area; generating a scene expansion block corresponding to each initial scene block according to each initial scene block and the expansion area corresponding to each initial scene block.

[0100] The center point of the overall scene graph may be a pre-set center point corresponding to the overall scene model, that is, the center point of the region of the overall scene model. The center point of each initial scene block is the center point of the region corresponding to each initial scene block.

[0101] It can be understood that the offset may refer to the offset of the center point in each initial scene block. The offset distance may refer to the horizontal movement distance of the center point in each initial scene block on the image.

[0102] In the process of expanding each initial scene block, the computer device first determines the expansion direction and offset distance corresponding to each initial scene block. Specifically, the computer device can determine the position of each initial scene block in the overall scene graph based on the center point of the overall scene graph and the center point of each initial scene block, and then determine the expansion direction of each initial scene block in the overall scene graph. The computer device then determines the offset distance corresponding to each initial scene block based on the center point of the overall scene graph and the center point of each initial scene block, as well as the expansion direction of each initial scene block.

[0103] The computer device expands each initial scene block according to the expansion direction and offset distance corresponding to each initial scene block. Specifically, the computer device can determine the offset distance corresponding to each initial scene block according to a preset pixel ratio. In another embodiment, the computer device can also determine the offset distance corresponding to each initial scene block according to the area size of each initial scene block and the preset ratio.

[0104] The computer device expands each initial scene tile according to the expansion direction and the offset distance, and obtains the expansion area corresponding to each initial scene tile. It can be understood that the expansion area is the area after the expansion of each initial scene tile, which is the area increased compared to the original initial scene tile. The computer device then generates a scene expansion tile corresponding to each initial scene tile according to each initial scene tile and the expansion area corresponding to each initial scene tile.

[0105] In this embodiment, each initial scene block is expanded according to the expansion direction and the offset distance, so that the corresponding area on the edge of each initial scene block can be accurately expanded to further accurately merge the seams between the initial scene blocks.

[0106] In one embodiment, each initial scene block is expanded according to the expansion direction and offset distance corresponding to each initial scene block to obtain the corresponding expansion area, including: offsetting to the expansion direction corresponding to each initial scene block according to the offset distance corresponding to each initial scene block, and determining the expansion area corresponding to each initial scene block according to the offset initial scene block.

[0107] According to each initial scene tile and the extended area corresponding to each initial scene tile, a scene extended tile corresponding to each initial scene tile is generated, including: determining the pixel value of the extended area according to the pixel value of the offset initial scene tile; obtaining the scene extended tile corresponding to each initial scene tile according to the pixel value of each initial scene tile and the pixel value of the extended area of ​​each initial scene tile.

[0108] Each initial scene block includes a corresponding pixel value. After each initial scene block is expanded, the formed expanded area also has a corresponding pixel value. It can be understood that the pixel value of the expanded area is obtained based on the pixel value of the original initial scene block.

[0109] When the computer device expands each initial scene tile, it expands each initial scene tile according to the expansion direction and offset distance corresponding to each initial scene tile. Specifically, the computer device can offset the center point of each initial scene tile in the expansion direction based on the center point and offset distance of each initial scene tile, so that the offset initial scene tile can be obtained according to the offset center point. Among them, the offset initial scene tile has an additional area corresponding to the offset distance compared to the original initial scene tile, and this added area is the expansion area.

[0110] Since the expanded area is formed after offsetting the original initial scene tile, the pixel value of the expanded area is also determined based on the pixel value of the original initial scene tile. Specifically, after the computer device offsets the center point toward the expansion direction of each initial scene tile, the area at the edge of each original initial scene tile will move toward the expanded area, and the computer device can determine the pixel value of the area corresponding to the offset distance of the edge of the original initial scene tile as the pixel value of the expanded area. The computer device then generates a scene expansion tile corresponding to each initial scene tile based on the pixel value of each initial scene tile and the pixel value of the expanded area of ​​each initial scene tile.

[0111] In another embodiment, the computer device may also determine the pixel values ​​to be expanded corresponding to each edge corresponding to the expansion direction of each initial scene block according to a preset pixel ratio.

[0112] like Figure 6 FIG. 1 is a schematic diagram of an embodiment of an embodiment of an expansion process for each initial scene block. Figure 6 , the overall scene graph 62 includes each initial scene block ①-④. Among them, the center point of the overall scene graph is O. The preset pixel ratio is X, for example, the preset pixel ratio X can be 50 pixels or 100 pixels. Taking the initial scene block ① as an example, the original center point of the initial scene block ① is P, and the expansion direction corresponding to the initial scene block ① includes the expansion direction F1 and the expansion direction F2. The computer device expands the area of ​​the preset pixel ratio X to the right according to the expansion direction F1, and expands the area of ​​the preset pixel ratio X downward according to the expansion direction F2, thereby obtaining the expansion area corresponding to the initial scene block ①. Then the center point P of the initial scene block ① is moved by a distance of X / 2 in the expansion direction F1 and the expansion direction F2, respectively, and positioned to the updated center point P1.

[0113] like Figure 7 FIG. 1 is a schematic diagram of expanding each initial scene block in one embodiment. Figure 7 , for each initial scene block ①-④ in the overall scene graph 72, after the corresponding expansion area is expanded in the corresponding expansion direction according to the preset pixel ratio X, the corresponding scene expansion blocks are obtained respectively. The oblique line area in the overall scene graph 72 is the overlapping area 72a between adjacent scene expansion blocks in each scene expansion block. Among them, the overlapping area 72a includes pixel values ​​belonging to different scene expansion blocks.

[0114] In the present embodiment, each initial scene block is offset according to the offset distance in the expansion direction corresponding to each initial scene block, and the pixel value of the edge in each initial scene block is used as the pixel value of the corresponding expansion area, so that each initial scene block can be effectively expanded, so that the pixel value of the expansion area still belongs to the pixel value in the corresponding initial scene block.

[0115] In one embodiment, pixel fusion processing is performed on pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain target pixel values ​​corresponding to each overlapping area, including: determining the pixel fusion ratio corresponding to the different scene extension blocks in each overlapping area according to the positional relationship corresponding to the different scene extension blocks in each overlapping area; and performing pixel fusion processing on pixel values ​​belonging to the different scene extension blocks in each overlapping area according to the pixel fusion ratio to obtain target pixel values ​​corresponding to each overlapping area.

[0116] It can be understood that the positional relationship refers to the relative position of an object to a reference object, and the relative position of the object and the reference object has a positional relationship, such as front, back, top, bottom, left, right, etc. The positional relationship between the scene extension blocks can refer to the position distribution relationship of the scene extension blocks in the overall scene graph, such as the left-right relationship.

[0117] After the computer device performs expansion processing on each initial scene block in the overall scene graph and obtains the corresponding scene expansion block, there is an overlapping area between adjacent scene expansion blocks in each scene expansion block. Each overlapping area includes areas corresponding to multiple different scene expansion blocks. The computer device can determine the pixel fusion ratio corresponding to different scene expansion blocks in each overlapping area according to the position distribution relationship corresponding to different scene expansion blocks in the overlapping area and the size of the overlapping area.

[0118] Specifically, the computer device first determines the position distribution relationship, such as the left-right relationship, corresponding to different scene extension blocks in the overlapping area according to the center point of each scene extension block. Then, the pixel fusion ratio corresponding to different scene extension blocks in the overlapping area is determined in sequence according to the position distribution relationship. For example, the pixel fusion ratio corresponding to different scene extension blocks in each pixel unit area in the overlapping area can be determined in sequence according to the pixel unit.

[0119] The computer device then performs pixel fusion on the pixel values ​​of the extended image blocks of different scenes in each overlapping area according to the pixel fusion ratio. Specifically, the pixel values ​​of the extended image blocks of different scenes in the overlapping area can be multiplied by the corresponding pixel fusion ratio and then added to achieve pixel fusion of the overlapping area, thereby accurately calculating the target pixel value corresponding to each overlapping area.

[0120] In one embodiment, according to the positional relationship between the different scene extension blocks in each overlapping area, the pixel fusion ratio corresponding to the different scene extension blocks in each overlapping area is determined, including: dividing each overlapping area into a plurality of sub-areas; for each sub-area, according to the positional relationship between the different scene extension blocks in each overlapping area, determining the pixel fusion ratio corresponding to the different scene extension blocks in the sub-areas in each overlapping area.

[0121] According to the pixel fusion ratio, pixel fusion processing is performed on the pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain the target pixel values ​​corresponding to each overlapping area, including: determining the target pixel value of each sub-area according to the pixel fusion ratio and pixel value belonging to different scene extension blocks in each sub-area; obtaining the target pixel value corresponding to each overlapping area according to the target pixel value corresponding to each sub-area in each overlapping area.

[0122] The sub-region is a local region subdivided in the overlapping region, and each sub-region includes a corresponding pixel fusion ratio.

[0123] After the computer device expands each initial scene tile to obtain the corresponding scene expansion tile, it first divides each overlapping area into sub-areas, and divides each overlapping area into multiple sub-areas. Specifically, the computer device can divide each overlapping area into multiple sub-areas according to a preset pixel value ratio. For example, the overlapping area can be divided into multiple pixel columns according to pixel units, and each pixel column is a sub-area.

[0124] In another embodiment, the computer device may further divide each overlapping area into a corresponding number of sub-areas according to a preset value.

[0125] Then, the computer device sequentially determines the pixel fusion ratio corresponding to the different scene expansion blocks in each sub-area of ​​the overlapping area according to the position distribution relationship. For example, the pixel fusion ratio corresponding to the different scene expansion blocks in each pixel unit area of ​​the overlapping area can be sequentially determined according to the pixel unit.

[0126] The computer device then calculates the target pixel value corresponding to each sub-region according to the pixel fusion ratio and pixel value of the extended image blocks belonging to different scenes in each sub-region, and then generates the target pixel value corresponding to each overlapping region according to the target pixel value corresponding to each sub-region in each overlapping region.

[0127] For example, for two adjacent scene extension tiles, the adjacent scene extension tiles include overlapping areas. Then, the pixel fusion ratio of the left scene extension tile in the sub-area of ​​the overlapping area can be determined from left to right, and the pixel fusion ratio of each sub-area can be specifically decreased from left to right. Similarly, the pixel fusion ratio of the right scene extension tile in the sub-area of ​​the overlapping area can be specifically increased from left to right.

[0128] In this embodiment, the overlapping area is divided into multiple sub-areas, and the proportion values ​​corresponding to different blocks in each pixel column are determined in sequence according to the positional relationship of different blocks and the arrangement order. In this way, the pixels of different scene expansion blocks in the overlapping area can be over-fused effectively, so that the pixels belonging to different scene expansion blocks in the overlapping area can be accurately fused.

[0129] In one embodiment, according to the positional relationship between different scene extension blocks in each overlapping area, the pixel fusion ratio corresponding to different scene extension blocks in the sub-area of ​​each overlapping area is determined, including: according to the positional relationship between adjacent scene extension blocks in each overlapping area, and the position of each sub-area in the corresponding overlapping area, the pixel fusion ratio corresponding to different scene extension blocks in the sub-area of ​​each overlapping area is determined.

[0130] It can be understood that when each scene expansion block is divided into a plurality of sub-regions, each overlapping region can be equally divided according to a preset pixel value ratio, and each overlapping region can be divided into a plurality of equally divided sub-regions.

[0131] Specifically, when the computer device performs pixel fusion processing on the overlapping area, it first determines the position relationship of different scene expansion blocks in each overlapping area, and determines the position of each divided sub-area in the overlapping area. For example, it can be the ratio of the number of sorted columns of each sub-area to the total number of columns.

[0132] The computer device then calculates the pixel fusion ratio corresponding to different scene extension blocks in each sub-area in the overlapping area based on the positional relationship between adjacent scene extension blocks in each overlapping area and the position of each sub-area in the overlapping area to which it belongs, thereby further calculating the target pixel value corresponding to each sub-area.

[0133] like Figure 8 FIG. 1 is a schematic diagram of performing pixel fusion processing on an overlapping area in one embodiment. Figure 7 The following is an example of scene expansion block ① and scene expansion block ② after expansion. Figure 8 For the overlapping area 8a between the scene extension block ① and the scene extension block ②, the pixel values ​​corresponding to the scene extension block ① and the scene extension block ② in the overlapping area are fused according to the pixel fusion ratio to achieve the fusion of the scene extension block ① and the scene extension block ②.

[0134] Specifically, the pixel value fusion formula of the overlapping area can be:

[0135] S i =P1*(100-Q i ) / 100+P2*Q i / 100;

[0136] Among them, S i is the i-th sub-area of ​​the overlapping area; P1 is one of the scene extension blocks in the overlapping area, for example, scene extension block ①; P2 is one of the scene extension blocks in the overlapping area, for example, scene extension block ②; Q i is the position of the i-th sub-region in the overlapping area.

[0137] Specifically, it can be understood that the overlapping area includes the pixel values ​​of the underlying scene extension block and the pixel values ​​of the overlay scene extension block. The sub-area can be a pixel column, and the position of the sub-area in the overlapping area can be determined according to the pixel column corresponding to the sub-area.

[0138] That is, the final pixel value of the overlapping area=the pixel value of the bottom layer x (100-the number of superimposed pixel columns) / 100+the pixel value of the superimposed layer x the number of superimposed pixel columns / 100.

[0139] Reference Figure 8For example, the overlapping area 8a can be divided into 100 pixel columns, i.e., sub-areas. According to the above formula, at the first column of sub-areas at the beginning of the overlapping area 8a, the target pixel value of the first column of sub-areas can be calculated as: 99% of the scene expansion block ① pixel value and 1% of the scene expansion block ② pixel value, i.e., this target pixel value is represented by 99% of the scene expansion block ① scene information and 1% of the scene expansion block ② scene information.

[0140] Similarly, in the second column of sub-areas, the target pixel value can be obtained as: 98% of the pixel value of scene extension block ① and 2% of the pixel value of scene extension block ②. By analogy, in the last 100th column of sub-areas, the target pixel value can be obtained as: 100% of the pixel value of scene extension block ②, that is, the pixel value transition from scene extension block ① to scene extension block ② is completed. Therefore, the target pixel of each sub-area in the overlapping area is a fusion of the pixel information of the two images, and gradually transitions from scene extension block ① to scene extension block ② as the number of columns increases, thereby effectively avoiding the appearance of seams, thereby achieving accurate pixel scene fusion in the overlapping area.

[0141] In one embodiment, pixel fusion processing is performed on pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain target pixel values ​​corresponding to each overlapping area, including: according to the position direction of each overlapping area, pixel values ​​belonging to different scene extension blocks in adjacent overlapping areas are subjected to step-by-step pixel fusion processing to obtain target pixel values ​​corresponding to each overlapping area.

[0142] The position direction may indicate the position distribution direction of the overlapping areas between the scene expansion blocks in the overall scene, for example, the position direction may include horizontal direction, vertical direction, etc. The step-by-step pixel fusion processing may indicate performing pixel fusion processing on each scene expansion block in multiple steps. For example, the distribution of each scene expansion block may be subjected to a pairwise fusion processing.

[0143] Specifically, when the computer device performs pixel fusion processing on the pixel values ​​belonging to different scene expansion blocks in each overlapping area, it can also perform step-by-step pixel fusion processing on each overlapping area according to different position directions according to the position direction corresponding to each overlapping area. For example, the computer device can first perform step-by-step pixel fusion processing on each overlapping area with the same position direction, and then further perform step-by-step pixel fusion processing on each overlapping area with different position directions to obtain the target pixel value corresponding to each overlapping area. Then, each scene expansion block is fused into the final target scene graph, thereby realizing efficient and accurate fusion of the scene expansion blocks.

[0144] In one embodiment, the position direction of the overlapping areas includes a first direction and a second direction; according to the position direction of each overlapping area, pixel values ​​of adjacent pixels in each overlapping area belonging to different scene extension blocks are respectively subjected to step-by-step pixel fusion processing to obtain target pixel values ​​corresponding to each overlapping area, including: for the overlapping areas in the first direction, pixel fusion processing is performed on the pixel values ​​in each overlapping area belonging to different scene extension blocks to obtain the target pixel values ​​of the overlapping areas in the first direction; for the overlapping areas in the second direction, pixel fusion processing is performed on the pixel values ​​in each overlapping area belonging to different scene extension blocks to obtain the target pixel values ​​of the overlapping areas in the second direction.

[0145] It is understandable that the position direction of the overlapping area may include multiple directions. For example, if the overlapping area is a rectangle, the position direction of the overlapping area may include horizontal and vertical directions. The position direction of the overlapping area may specifically include a first direction and a second direction. Among them, the first direction and the second direction may refer to two directions with different position distributions between the scene expansion blocks in the overall scene. For example, the first direction may be horizontal, and the second direction may be vertical.

[0146] When the position direction of the overlapping area includes a first direction and a second direction, the computer device performs step-by-step pixel fusion processing on each overlapping area according to the first direction and the second direction. The computer device may first perform step-by-step pixel fusion processing on each overlapping area in the first direction, and then further perform step-by-step pixel fusion processing on each overlapping area in the second direction.

[0147] Specifically, first, for the overlapping areas in the first direction, the computer device performs pixel fusion processing on the pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain the target pixel value of the overlapping area in the first direction. Then, for the overlapping areas in the second direction, the computer device further performs pixel fusion processing on the pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain the target pixel value of the overlapping area in the second direction.

[0148] In this embodiment, by performing step-by-step fusion according to each position direction for the first direction and the second direction of the overlapping area, it is possible to more accurately perform pixel fusion on the overlapping area in each scene expansion block and perform block fusion on each scene expansion block.

[0149] In one embodiment, based on the pixel values ​​of each initial scene tile and the target pixel values ​​of each overlapping area, a tile fusion process is performed on each scene extension tile to generate a target scene graph corresponding to the three-dimensional scene, including: according to the pixel values ​​of each initial scene tile in a first direction and the target pixel values ​​of the overlapping area in the first direction, a tile fusion process is performed on each scene extension tile in a first direction to obtain a scene fusion tile in the first direction; according to the pixel values ​​of each initial scene tile in the second direction and the target pixel values ​​of the overlapping area between the first direction and the second direction, a tile fusion process is performed on each scene extension tile in the second direction to generate a target scene graph corresponding to the three-dimensional scene.

[0150] Among them, for each scene expansion block in the first direction, it includes each overlapping area in the first direction and each initial scene block corresponding to each scene expansion block; similarly, for each scene expansion block in the second direction, it includes each overlapping area in the second direction and each initial scene block corresponding to each scene expansion block.

[0151] The computer device performs step-by-step pixel fusion processing on each overlapping area according to the first direction and the second direction respectively, and after obtaining the target pixel values ​​of each overlapping area corresponding to the first direction and the second direction, further fuses the pixel values ​​of each scene expansion block corresponding to the first direction and the second direction to perform block fusion processing.

[0152] Specifically, the computer device may first perform a block fusion process on each scene expansion block in the first direction according to the pixel values ​​of each initial scene block in the first direction and the target pixel values ​​of the overlapping areas in the first direction, so as to obtain a scene fusion block in the first direction. The target pixel values ​​of multiple overlapping areas in the first direction may be calculated synchronously, and the multiple scene expansion blocks in the first direction may also be subjected to a block fusion process synchronously.

[0153] Then, the computer device performs block fusion processing on each scene expansion block in the second direction according to the pixel values ​​of each initial scene block in the second direction and the target pixel values ​​of the overlapping areas of the first direction and the second direction, so as to generate a target scene graph corresponding to the three-dimensional scene.

[0154] In another embodiment, the computer device may also perform pixel fusion processing and block fusion processing in steps on the overlapping areas of the first direction and the second direction, that is, first perform pixel fusion processing and block fusion processing on the overlapping areas of the first direction and each scene expansion block, and then perform pixel fusion processing and block fusion processing on the overlapping areas of the second direction and each scene expansion block, so as to fuse each scene expansion block into the final target scene graph.

[0155] like Fig. 9 As shown, it is a schematic diagram of the fusion processing of each initial scene tile in one embodiment. Among them, the initial scene tile ① and the initial scene tile ② can be vertically fused to form a fused scene tile ⑤, the initial scene tile ③ and the initial scene tile ④ can be vertically fused to form a fused scene tile ⑥, and then the fused scene tile ⑤ and the fused scene tile ⑥ can be horizontally fused. Among them, the vertical fusion of each initial scene tile can be processed synchronously. In this way, the entire target terrain map height can be more accurately and effectively fused. Fig. 9 a.

[0156] In one embodiment, the target scene graph is applied to a three-dimensional scene application corresponding to the three-dimensional scene; the method also includes: determining the number of scene graphs and the size of the scene graph that match the three-dimensional scene application; dividing the target scene graph into multiple target scene graph sub-blocks according to the number of scene graphs and the size of the scene graph, so that the three-dimensional scene application loads the corresponding target scene graph sub-block according to the scene picture to be displayed during runtime, and renders the scene picture based on the scene data of the target scene graph sub-block.

[0157] The scene graph size refers to the size of the preset overall scene graph, which can be determined according to project requirements. The number of scene graphs can also be preset. For example, it can be determined according to the scene graph size, or it can be determined according to the maximum area range of a single initial scene graph block that matches the performance of the computer device.

[0158] It can be understood that the target scene graph is applied to the 3D scene application corresponding to the 3D scene. By running the 3D scene application, these 3D scenes can be animated or observed from different angles and positions to display simulated 3D scene effects.

[0159] After the computer device generates the overall target scene graph corresponding to the three-dimensional scene, it can also divide the target scene graph into multiple target scene graph sub-blocks according to the implementation requirements of the three-dimensional scene application at runtime.

[0160] Specifically, the computer device may determine the number of scene graphs matching the three-dimensional scene application and the scene graph size of each target scene graph sub-block according to the implementation requirements of the three-dimensional scene application at runtime.

[0161] In another embodiment, the computer device may also determine the number and size of scene graphs that match the three-dimensional scene application according to a preset fixed number and size of scene graphs.

[0162] The computer device further divides the target scene graph into a plurality of target scene graph sub-blocks according to the number and size of the scene graphs. Thus, when the 3D scene application is running, only the required part of the target scene graph sub-blocks need to be loaded to render the scene screen based on the scene data of the target scene graph sub-blocks.

[0163] Specifically, the computer device may be a terminal, in which a 3D scene application capable of providing a 3D scene is running. When the terminal runs the 3D application, the current scene picture to be displayed is determined according to the state during the running process, and then the corresponding target scene graph sub-block is loaded according to the scene picture to be displayed, so as to further render the scene picture to be displayed according to the scene data corresponding to the loaded target scene graph sub-block.

[0164] like Fig.10 FIG. 1 is a schematic diagram of processing each initial scene block in an embodiment. First, multiple initial scene blocks in a three-dimensional scene, namely, initial scene blocks 10a1-10a4, are spliced ​​together to obtain an overall scene corresponding to the three-dimensional scene including each initial scene block. Fig.10 b. Then, for the overall scene Fig.10 The initial scene blocks in b are expanded to obtain scene expansion blocks, and the overlapping areas between the scene expansion blocks are subjected to pixel fusion processing, and the initial scene blocks are subjected to block fusion processing to generate the target scene corresponding to the three-dimensional scene. Fig.10 c. Finally, the computer device divides the target scene graph into a plurality of target scene graph sub-blocks 10d according to the number and size of scene graphs matching the 3D scene application. This allows efficient loading of the required target scene graph sub-blocks when the 3D scene application is running, thereby improving rendering processing efficiency.

[0165] In one embodiment, the initial scene tiles include an initial terrain height map; based on the pixel values ​​of each initial scene tile and the target pixel values ​​of each overlapping area, tile fusion processing is performed on each scene extension tile to generate a target scene map corresponding to the three-dimensional scene, including: determining the target height value of each overlapping area according to the target pixel value of each overlapping area; determining the target height value of the area excluding the overlapping area in each initial terrain height map according to the pixel value of each initial terrain height map; based on the target height value of each overlapping area and the target height value of the area excluding the overlapping area in each initial terrain height map, tile fusion processing is performed on each scene extension tile to generate a target terrain height map corresponding to the three-dimensional scene.

[0166] The terrain height map may refer to an image used to store the height data of the terrain in the three-dimensional scene. For example, the terrain may include land, ocean, plateau, mountains, rivers, lakes, and seas. The terrain height map may specifically be a grayscale map. In the height map, the ratio of pixel value to height value may be preset, and the height value in the three-dimensional scene may be stored through the pixel value of the height map.

[0167] For example, the black degree of the pixel in the terrain height map represents the lower the terrain height in the three-dimensional scene, and vice versa. White means higher. Each pixel records the height ratio value of the ground surface represented by the current pixel position. A single pixel can be set to represent the height of the terrain in the three-dimensional scene at any size such as 1 meter, 5 meters or 10 meters. The more pixels in a unit size, the richer the black and white degree changes, which means the terrain changes are richer. For example, the pixel value in the range of 0-225 can be used to record the height value of the terrain. Usually, if the pixel value is 0, the pixel in the height map is pure black, which is the minimum value of the terrain height. Usually, if the pixel value is 0, the pixel in the height map is pure white, which is the maximum value of the terrain height. For example Fig.11 FIG. 1 shows a terrain height map in an embodiment, which includes an ocean area 11a, a land area 11b and a plateau area 11c. Fig.11 It can be seen that the pixel value of each ocean area 11a is the darkest, and the terrain height at the corresponding position is the lowest. The pixel value of each land area 11b is brighter than the pixel value of the ocean area 11a, and the height of the corresponding terrain position is higher. The pixel value of the plateau area 11c is the brightest, close to white, indicating that the terrain height at the corresponding position is the highest.

[0168] It can be understood that the initial scene image block in this embodiment includes an initial terrain height map. The initial terrain height map can be generated in advance according to a terrain model in the three-dimensional scene.

[0169] Specifically, the computer device first splices multiple initial terrain height maps in the three-dimensional scene to obtain an overall terrain height map corresponding to the terrain model in the three-dimensional scene, and the overall terrain height map includes each initial terrain height map. The computer device then performs expansion processing on each initial terrain height map in the overall terrain height map to obtain a corresponding height map expansion block; there is an overlapping area between adjacent height map expansion blocks in each height map expansion block. The computer device then performs pixel fusion processing on the pixel values ​​belonging to different field height map expansion blocks in the overlapping area to obtain the target pixel values ​​corresponding to each overlapping area.

[0170] The computer device then performs block fusion processing on each height map expansion block according to the pixel values ​​in each initial terrain height map and the target pixel values ​​in each overlapping area to obtain a complete target terrain height map. Specifically, after the computer device obtains the target pixel values ​​of each overlapping area, it can determine the target height value corresponding to the overlapping area according to the preset height ratio value. At the same time, the computer device also determines the target height value of the area other than the overlapping area in the initial terrain height map according to the preset height ratio value based on the pixel values ​​in each initial terrain height map. Then, according to the target height value of each overlapping area and the target height value of the area other than the overlapping area in each initial terrain height map, the block fusion is performed on each height map expansion block, thereby generating a high-precision target terrain height map corresponding to the three-dimensional scene.

[0171] In this embodiment, a plurality of local initial terrain height maps are generated based on the overall terrain in the three-dimensional scene, and then the initial terrain height maps are integrated into an overall terrain height map, and then pixel fusion is continued on the seams between the initial terrain height maps, so that a high-precision target terrain height map corresponding to the three-dimensional scene can be effectively generated.

[0172] In a specific embodiment, Fig.12 As shown, it is a flow chart of terrain height map processing in a three-dimensional scene in one embodiment. The computer device can generate the required height map according to the processing flow of division-total-division. First, multiple initial terrain height maps corresponding to the terrain model in the three-dimensional scene are generated according to a preset method. That is, multiple large-block height maps of the local area under the terrain model are pre-generated. Then, the multiple initial terrain height maps are synthesized into a whole terrain height map, and the seams between the initial terrain height maps are further processed to fuse the target terrain height map corresponding to the three-dimensional scene. The computer device further divides the target scene map into multiple target scene map sub-blocks according to the required number of height maps according to the implementation needs of the three-dimensional scene application at runtime.

[0173] It is understandable that for a 3D scene with a larger area, the number of scene graphs required is larger. If you directly use image processing tools, such as Houdini, to bake out the height map of the size required for the actual project, the efficiency will be very low due to the large number of height maps. Baking can refer to the process of recording some information in the 3D model on a 2D plane map. Baking the height map means recording the height information of the terrain model into the height map.

[0174] Due to force majeure factors such as the limitations of image processing tools, if the entire terrain height map is directly segmented, the final segments may not be well connected to each other, and defects may appear between the seams on the 3D scene model.

[0175] In this embodiment, the number of segments can be determined in advance in the image processing tool according to the size of the terrain. For example, the number of segments can be determined according to the maximum area of ​​a single terrain block that the computer can bear. If the number is too large, it will take too long to output the image; if the number is too small, the amount of data of the divided image will still be large, and the efficiency of output will be low due to the limitation of computer performance. In a specific embodiment, the number of segments is determined to be 2x2, and the baking state of the height map can be better through repeated tests.

[0176] Specifically, the size of the overall terrain range can be pre-set, and then the size of each required terrain block, that is, the size of each initial terrain height map, is determined. Then, a corresponding terrain model is generated on each terrain block, and the corresponding initial terrain height map is baked out on each terrain block according to the generation rules of the terrain model. These initial terrain height maps can still be pieced together to form the size of the initial overall terrain range, so as to be further merged into a complete terrain height map.

[0177] Among them, the center point of the overall terrain range and the corresponding position will not change, and each terrain block also has a corresponding center point. Therefore, the terrain model can be generated on this range based on the center point of each terrain block, and then baked into a height map. Since the generation rules of the terrain model do not change, the overall terrain model will not change when each block is generated, that is, each terrain block can still form the original complete terrain range after being spliced.

[0178] Furthermore, the positions of the terrain blocks are determined according to the center points of the terrain blocks, so as to splice the multiple initial terrain height maps under the three-dimensional scene, and obtain the overall height map corresponding to the three-dimensional scene including the initial terrain height maps. Then, each initial terrain height map in the overall height map is expanded, and then the height maps corresponding to the expanded terrain blocks are baked out respectively, and the height map expansion blocks corresponding to the initial terrain height maps are obtained.

[0179] Specifically, the center point of each initial terrain height map can be moved to the center point of the overall height map by a distance of X / 2 on the horizontal axis and the vertical axis, and finally form an overlapping height map expansion block. Adjacent height map expansion blocks in each height map expansion block have an overlapping area. For example, each initial terrain height map is extended outward by a preset distance X, wherein the preset distance X can be no less than the last 50 pixels on the edge of each initial terrain height map.

[0180] Among them, the overlapping areas between the height map expansion blocks cover the seams between the initial terrain height maps. The overlapping areas between the height map expansion blocks are further subjected to pixel fusion processing to repair the seams between the initial terrain height maps. Specifically, for each overlapping area, taking the height map expansion blocks corresponding to the bottom layer and the overlay layer in the overlapping area as an example, each overlapping area is divided into multiple pixel columns in units of pixels. The target pixel value of each pixel column in the overlapping area = bottom layer pixel value * (100-number of superimposed pixel columns) / 100 + superimposed layer pixel value * number of superimposed pixel columns / 100.

[0181] That is, the pixel values ​​of the height map expansion blocks of the bottom layer are transitioned to the height map expansion blocks of the overlay layer. Therefore, the target pixels of each pixel column in the overlapping area are the pixel information of the two height map expansion blocks, and gradually transition from the height map expansion blocks of the bottom layer to the height map expansion blocks of the overlay layer as the number of columns increases, which can effectively avoid the appearance of seams and achieve accurate pixel scene fusion in the overlapping area.

[0182] Then, according to the position direction of each height map extension block, each height map extension block is merged step by step to merge each scene extension block into a final target height map. The final target height map can be stored, read, etc. in an image format.

[0183] Finally, the heightmap is segmented according to the number and size of heightmaps required by the 3D scene, and the target heightmap is divided into multiple target heightmap sub-blocks. The number and size of heightmaps can be determined based on the requirements of the engine program corresponding to the 3D scene application. For example, when the overall terrain range in the 3D scene exceeds 40000x36000 pixels, the overall terrain range can be converted to a terrain area of ​​about 40km 2 x40km 2 , finally the height map can be divided into about 1500 small height maps.

[0184] Since such a huge terrain cannot be loaded at one time in a 3D scene application, the target height map corresponding to the entire terrain is divided into small blocks for block loading, which can effectively improve the processing efficiency of the 3D scene application.

[0185] Compared with the traditional height map production method, in this embodiment, by integrating multiple pre-generated local initial terrain height maps in the three-dimensional scene into an overall terrain height map, and then performing pixel fusion on the seams between the initial terrain height maps, a high-precision target terrain height map can be effectively generated. In this way, the accuracy of the map height map can be improved while the required height map can be generated quickly and efficiently, and the final merging and re-splitting steps can be completed within tens of seconds. The total process reduces the time by more than 60% compared to the previous baking process, effectively improving the iteration efficiency of the terrain height map in the three-dimensional scene.

[0186] The present application also provides an application scenario, which is a three-dimensional environment demonstration scenario, such as a tourism environment demonstration scenario, a building demonstration scenario, etc. The three-dimensional environment demonstration scenario applies the above-mentioned image processing method in the three-dimensional scene. For the three-dimensional environment demonstration scenes in various environments, multiple initial scene blocks in the three-dimensional scene can be generated in advance.

[0187] The computer device first obtains multiple initial scene tiles in the three-dimensional scene, and then splices the multiple initial scene tiles in the three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene including each initial scene tile. Then, each initial scene tile in the overall scene graph is expanded to obtain a scene expansion tile, and pixel fusion processing is performed on the overlapping areas between each scene expansion tile, and tile fusion processing is performed on each initial scene tile to generate a high-precision target scene graph corresponding to the three-dimensional scene. Finally, the computer device divides the target scene graph into multiple target scene graph sub-blocks according to the number of scene graphs and the size of the scene graphs that match the three-dimensional scene application.

[0188] The application corresponding to the three-dimensional environment demonstration scene can be deployed on the terminal. When the terminal runs the application corresponding to the three-dimensional environment demonstration scene, it obtains the matching target scene graph sub-block according to the scene picture to be displayed. Then the corresponding scene data is obtained from the matching target scene graph sub-block, and the terminal renders the scene picture to be displayed based on the read scene data. In this way, the required high-precision target scene graph sub-block can be efficiently loaded, thereby effectively improving the rendering processing efficiency.

[0189] The present application also provides an application scenario, which is an open world type three-dimensional game scene, and the game scene applies the above-mentioned image processing method. Specifically, the open world type three-dimensional game scene includes an open world terrain, wherein the open world terrain is an open world task space, and usually includes an ultra-large-scale world map corresponding to the open world terrain. Among them, multiple initial scene tiles in the three-dimensional scene can be pre-generated. The initial scene tile is specifically an initial terrain height map corresponding to the open world terrain in the three-dimensional game scene, and the initial terrain height map can be specifically pre-produced and generated according to the open world terrain model.

[0190] After the computer device obtains multiple initial terrain height maps corresponding to the open world terrain in the three-dimensional game scene, it first splices the multiple initial terrain height maps in the three-dimensional scene to obtain an overall terrain height map corresponding to the terrain model in the three-dimensional scene. Then, each initial terrain height map in the overall terrain height map is expanded, and there is an overlapping area between adjacent height map expansion blocks in each expanded height map expansion block. Then, pixel fusion processing is performed on the pixel values ​​belonging to different field height map expansion blocks in the overlapping area to obtain the target pixel values ​​corresponding to each overlapping area.

[0191] The computer device then determines the target height value corresponding to the overlapping area and the target height value of the area other than the overlapping area in the initial terrain height map according to the preset height ratio value. Then, the extended blocks of each height map are fused according to the corresponding target height value, thereby generating a high-precision target terrain height map corresponding to the three-dimensional scene.

[0192] Furthermore, a game application corresponding to a three-dimensional game scene is deployed in the terminal. When the game application in the terminal is running, a matching target height map sub-block is obtained according to the game scene screen to be displayed and the position in the game scene. Then the corresponding terrain height data is obtained from the matching target height map sub-block, and the terminal renders the scene screen to be displayed based on the read terrain height data and other required scene data. In this way, the required high-precision target height map sub-blocks can be efficiently loaded in the game scene, thereby effectively improving the processing efficiency and rendering efficiency of the game application.

[0193] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0194] In one embodiment, Fig.13 As shown, an image processing device 1300 is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: a tile splicing module 1302, a tile expansion module 1304, a pixel fusion module 1306 and a tile fusion module 1308, wherein:

[0195] The tile stitching module 1302 is used to stitch multiple initial scene tiles in the three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene including the initial scene tiles.

[0196] The block expansion module 1304 is used to expand each initial scene block in the overall scene graph to obtain a scene expansion block; there is an overlapping area between adjacent scene expansion blocks in each scene expansion block.

[0197] The pixel fusion module 1306 is used to perform pixel fusion processing on the pixel values ​​belonging to different scene expansion blocks in each overlapping area to obtain the target pixel value corresponding to each overlapping area.

[0198] The block fusion module 1308 is used to perform block fusion processing on each scene expansion block based on the pixel value of each initial scene block and the target pixel value of each overlapping area to generate a target scene graph corresponding to the three-dimensional scene.

[0199] In one embodiment, the tile expansion module 1304 is also used to determine the expansion direction corresponding to each initial scene tile according to the position of each initial scene tile in the overall scene graph; and to expand each initial scene tile according to the expansion direction to obtain a scene expansion tile corresponding to each initial scene tile.

[0200] In one embodiment, the tile expansion module 1304 is also used to determine the offset distance corresponding to each initial scene tile based on the center point of the overall scene graph and the center point of each initial scene tile; expand each initial scene tile according to the expansion direction and offset distance corresponding to each initial scene tile to obtain the corresponding expansion area; generate a scene expansion tile corresponding to each initial scene tile based on each initial scene tile and the expansion area corresponding to each initial scene tile.

[0201] In one embodiment, the tile expansion module 1304 is also used to offset each initial scene tile in an expansion direction corresponding to each initial scene tile according to an offset distance corresponding to each initial scene tile, and determine an expansion area corresponding to each initial scene tile according to the offset initial scene tile; determine the pixel value of the expansion area according to the pixel value of the offset initial scene tile; and obtain a scene expansion tile corresponding to each initial scene tile according to the pixel value of each initial scene tile and the pixel value of the expansion area of ​​each initial scene tile.

[0202] In one embodiment, the pixel fusion module 1306 is also used to determine the pixel fusion ratio corresponding to the different scene extension blocks in each overlapping area according to the positional relationship corresponding to the different scene extension blocks in each overlapping area; according to the pixel fusion ratio, pixel fusion processing is performed on the pixel values ​​belonging to the different scene extension blocks in each overlapping area to obtain the target pixel values ​​corresponding to each overlapping area.

[0203] In one embodiment, the pixel fusion module 1306 is also used to divide each overlapping area into multiple sub-areas; for each sub-area, according to the positional relationship corresponding to the different scene extension blocks in each overlapping area, the pixel fusion ratio corresponding to the different scene extension blocks in the sub-area of ​​each overlapping area is determined; according to the pixel fusion ratio and pixel value belonging to the different scene extension blocks in each sub-area, the target pixel value of each sub-area is determined; according to the target pixel value corresponding to each sub-area in each overlapping area, the target pixel value corresponding to each overlapping area is obtained.

[0204] In one embodiment, the pixel fusion module 1306 is further used to determine the pixel fusion ratio corresponding to different scene extension blocks in the sub-areas in each overlapping area according to the positional relationship between adjacent scene extension blocks in each overlapping area and the position of each sub-area in the corresponding overlapping area.

[0205] In one embodiment, the pixel fusion module 1306 is further used to perform step-by-step pixel fusion processing on adjacent pixel values ​​belonging to different scene expansion blocks in each overlapping area according to the position direction of each overlapping area, so as to obtain the target pixel value corresponding to each overlapping area.

[0206] In one embodiment, the position direction of the overlapping area includes a first direction and a second direction; the pixel fusion module 1306 is also used to perform pixel fusion processing on the pixel values ​​belonging to different scene extension blocks in each overlapping area in the first direction to obtain the target pixel value of the overlapping area in the first direction; for the overlapping area in the second direction, perform pixel fusion processing on the pixel values ​​belonging to different scene extension blocks in each overlapping area to obtain the target pixel value of the overlapping area in the second direction.

[0207] In one embodiment, the tile fusion module 1308 is also used to perform tile fusion processing on each scene extension tile in the first direction according to the pixel values ​​of each initial scene tile in the first direction and the target pixel value of the overlapping area in the first direction to obtain the scene fusion tile in the first direction; perform tile fusion processing on each scene extension tile in the second direction according to the pixel values ​​of each initial scene tile in the second direction and the target pixel value of the overlapping area between the first direction and the second direction to generate a target scene graph corresponding to the three-dimensional scene.

[0208] In one embodiment, the target scene graph is applied to a three-dimensional scene application corresponding to the three-dimensional scene; the image processing device under the above-mentioned three-dimensional scene also includes an image segmentation module, which is used to determine the number and size of scene graphs matching the three-dimensional scene application; according to the number and size of scene graphs, the target scene graph is divided into multiple target scene graph sub-blocks, so that the three-dimensional scene application loads the corresponding target scene graph sub-block according to the scene picture to be displayed during runtime, and renders the scene picture based on the scene data of the target scene graph sub-block.

[0209] In one embodiment, the initial scene tile includes an initial terrain height map; the tile fusion module 1308 is further used to determine the target height value of each overlapping area according to the target pixel value of each overlapping area; determine the target height value of the area excluding the overlapping areas in each initial terrain height map according to the pixel value of each initial terrain height map; based on the target height value of each overlapping area and the target height value of the area excluding the overlapping areas in each initial terrain height map, perform tile fusion processing on each scene expansion tile to generate a target terrain height map corresponding to the three-dimensional scene.

[0210] For the specific definition of the image processing device in the three-dimensional scene, please refer to the definition of the image processing method in the three-dimensional scene above, which will not be repeated here. Each module in the above-mentioned image processing device in the three-dimensional scene can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0211] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.14As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image processing method in a three-dimensional scene is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0212] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0213] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0214] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0215] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0216] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0217] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0218] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An image processing method, characterized in that: The method comprises: Splicing a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles; Expanding each of the initial scene blocks in the overall scene graph to obtain scene expansion blocks; adjacent scene expansion blocks in each of the scene expansion blocks have overlapping areas; Determining pixel fusion ratios corresponding to different scene expansion blocks in each overlapping area according to positional relationships corresponding to different scene expansion blocks in each overlapping area; According to the pixel fusion ratio, pixel fusion processing is performed on pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain target pixel values ​​corresponding to each of the overlapping areas; Based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas, block fusion processing is performed on each of the scene expansion blocks to generate a target scene graph corresponding to the three-dimensional scene.

2. The method according to claim 1, characterized in that: The step of respectively expanding each of the initial scene blocks in the overall scene graph to obtain a scene expansion block comprises: Determine the expansion direction corresponding to each of the initial scene blocks according to the position of each of the initial scene blocks in the overall scene graph; The initial scene blocks are expanded respectively according to the expansion direction to obtain scene expansion blocks corresponding to the initial scene blocks.

3. The method according to claim 2, characterized in that The step of performing expansion processing on each of the initial scene blocks according to the expansion direction to obtain a scene expansion block corresponding to each of the initial scene blocks includes: Determining the offset distance corresponding to each of the initial scene blocks according to the center point of the overall scene graph and the center point of each of the initial scene blocks; According to the expansion direction and offset distance corresponding to each of the initial scene blocks, each of the initial scene blocks is expanded to obtain a corresponding expansion area; According to each of the initial scene tiles and the expansion area corresponding to each of the initial scene tiles, a scene expansion tile corresponding to each of the initial scene tiles is generated.

4. The method according to claim 3, characterized in that: The method of expanding each of the initial scene blocks according to the expansion direction and offset distance corresponding to each of the initial scene blocks to obtain a corresponding expansion area includes: According to the offset distance corresponding to each of the initial scene blocks, offsets are respectively made in the expansion directions corresponding to each of the initial scene blocks, and the expansion areas corresponding to each of the initial scene blocks are determined according to the offset initial scene blocks; The step of generating a scene extension block corresponding to each of the initial scene blocks according to each of the initial scene blocks and the extension area corresponding to each of the initial scene blocks comprises: Determining the pixel value of the expanded area according to the pixel value of the initial scene block after the shift; According to the pixel values ​​of each of the initial scene blocks and the pixel values ​​of the extended areas of each of the initial scene blocks, the scene extended blocks corresponding to each of the initial scene blocks are obtained.

5. The method according to claim 1, characterized in that The determining, according to the positional relationship between the different scene extension blocks in the overlapping areas, the pixel fusion ratio corresponding to the different scene extension blocks in the overlapping areas comprises: Dividing each of the overlapping regions into a plurality of sub-regions; For each sub-region, according to the positional relationship between the extended image blocks of different scenes in each overlapping region, the pixel fusion ratio corresponding to the extended image blocks of different scenes in the sub-regions of each overlapping region is determined; The pixel fusion processing is performed on the pixel values ​​of the extended image blocks of different scenes in each overlapping area according to the pixel fusion ratio to obtain the target pixel value corresponding to each overlapping area, including: Determining a target pixel value of each of the sub-regions according to pixel fusion ratios and pixel values ​​of extended image blocks belonging to different scenes in each of the sub-regions; The target pixel value corresponding to each of the overlapping regions is obtained according to the target pixel value corresponding to each of the sub-regions in each of the overlapping regions.

6. The method according to claim 5, characterized in that Determining the pixel fusion ratios corresponding to the different scene extension blocks in the sub-areas in each of the overlapping areas according to the positional relationship of the different scene extension blocks in each of the overlapping areas includes: According to the positional relationship between adjacent scene extension blocks in each overlapping area and the position of each sub-area in the corresponding overlapping area, the pixel fusion ratio corresponding to different scene extension blocks in the sub-area in each overlapping area is determined.

7. The method according to claim 1, characterized in that The performing pixel fusion processing on the pixel values ​​of the extended image blocks of different scenes in the overlapping areas to obtain the target pixel values ​​corresponding to the overlapping areas includes: According to the position direction of each overlapping area, pixel values ​​of adjacent pixel extension blocks belonging to different scenes in each overlapping area are respectively subjected to step-by-step pixel fusion processing to obtain target pixel values ​​corresponding to each overlapping area.

8. The method according to claim 7, characterized in that The position direction of the overlapping area includes a first direction and a second direction; and the stepwise pixel fusion processing is performed on adjacent pixel values ​​belonging to different scene extension blocks in each overlapping area according to the position direction of each overlapping area to obtain a target pixel value corresponding to each overlapping area, including: For the overlapping areas in the first direction, performing pixel fusion processing on the pixel values ​​of the pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain the target pixel values ​​of the overlapping areas in the first direction; For the overlapping areas in the second direction, pixel fusion processing is performed on the pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain the target pixel values ​​of the overlapping areas in the second direction.

9. The method according to claim 8, characterized in that The step of performing a block fusion process on each of the scene expansion blocks based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas to generate a target scene graph corresponding to the three-dimensional scene includes: According to the pixel values ​​of the initial scene blocks in the first direction and the target pixel value of the overlapping area in the first direction, performing block fusion processing on the scene expansion blocks in the first direction to obtain the scene fusion block in the first direction; According to the pixel values ​​of each of the initial scene blocks in the second direction and the target pixel values ​​of the overlapping area of ​​the first direction and the second direction, block fusion processing is performed on each of the scene expansion blocks in the second direction to generate a target scene graph corresponding to the three-dimensional scene.

10. The method according to any one of claims 1 to 9, characterized in that: The target scene graph is applied to a three-dimensional scene application corresponding to the three-dimensional scene; the method further comprises: Determining the number and size of scene graphs matching the three-dimensional scene application; According to the number of scene graphs and the size of the scene graphs, the target scene graph is divided into multiple target scene graph sub-blocks, so that the three-dimensional scene application loads the corresponding target scene graph sub-blocks according to the scene picture to be displayed during runtime, and renders the scene picture based on the scene data of the target scene graph sub-blocks.

11. The method according to any one of claims 1 to 9, characterized in that: The initial scene block includes an initial terrain height map; the block fusion processing is performed on each of the scene expansion blocks based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas to generate a target scene map corresponding to the three-dimensional scene, including: Determining a target height value of each overlapping area according to a target pixel value of each overlapping area; Determining target height values ​​of areas in each of the initial terrain height maps except for each of the overlapping areas according to pixel values ​​of each of the initial terrain height maps; Based on the target height values ​​of the overlapping areas and the target height values ​​of the areas other than the overlapping areas in the initial terrain height maps, each scene expansion block is subjected to block fusion processing to generate a target terrain height map corresponding to the three-dimensional scene.

12. An image processing device, characterized in that: The device comprises: A tile splicing module, used for splicing a plurality of initial scene tiles in a three-dimensional scene to obtain an overall scene graph corresponding to the three-dimensional scene and including the initial scene tiles; A block expansion module, used for respectively expanding each of the initial scene blocks in the overall scene graph to obtain a scene expansion block; adjacent scene expansion blocks in each of the scene expansion blocks have an overlapping area; A pixel fusion module is used to determine the pixel fusion ratio corresponding to the different scene extension blocks in each overlapping area according to the positional relationship corresponding to the different scene extension blocks in each overlapping area; and perform pixel fusion processing on the pixel values ​​belonging to the different scene extension blocks in each overlapping area according to the pixel fusion ratio to obtain the target pixel value corresponding to each overlapping area; The block fusion module is used to perform block fusion processing on each of the scene expansion blocks based on the pixel values ​​of each of the initial scene blocks and the target pixel values ​​of each of the overlapping areas to generate a target scene graph corresponding to the three-dimensional scene.

13. The device according to claim 12, characterized in that The tile expansion module is also used to determine the expansion direction corresponding to each of the initial scene tiles according to the position of each of the initial scene tiles in the overall scene graph; and to expand each of the initial scene tiles according to the expansion direction to obtain a scene expansion tile corresponding to each of the initial scene tiles.

14. The device according to claim 13, characterized in that The tile expansion module is also used to determine the offset distance corresponding to each initial scene tile based on the center point of the overall scene graph and the center point of each initial scene tile; expand each initial scene tile according to the expansion direction and offset distance corresponding to each initial scene tile to obtain the corresponding expansion area; and generate a scene expansion tile corresponding to each initial scene tile based on each initial scene tile and the expansion area corresponding to each initial scene tile.

15. The device according to claim 14, characterized in that The tile expansion module is also used to offset each initial scene tile in an expansion direction corresponding to each initial scene tile according to an offset distance corresponding to each initial scene tile, and determine an expansion area corresponding to each initial scene tile according to the offset initial scene tile; determine a pixel value of the expansion area according to the pixel value of the offset initial scene tile; and obtain a scene expansion tile corresponding to each initial scene tile according to the pixel value of each initial scene tile and the pixel value of the expansion area of ​​each initial scene tile.

16. The device according to claim 12, characterized in that The pixel fusion module is also used to divide each overlapping area into multiple sub-areas; for each sub-area, according to the positional relationship corresponding to different scene extension blocks in each overlapping area, determine the pixel fusion ratio corresponding to different scene extension blocks in the sub-area of ​​each overlapping area; according to the pixel fusion ratio and pixel value belonging to different scene extension blocks in each sub-area, determine the target pixel value of each sub-area; according to the target pixel value corresponding to each sub-area in each overlapping area, obtain the target pixel value corresponding to each overlapping area.

17. The device according to claim 16, characterized in that The pixel fusion module is also used to determine the pixel fusion ratio corresponding to different scene extension blocks in the sub-areas in each overlapping area according to the positional relationship between adjacent scene extension blocks in each overlapping area and the position of each sub-area in the corresponding overlapping area.

18. The device according to claim 12, characterized in that The pixel fusion module is also used to perform step-by-step pixel fusion processing on adjacent pixel values ​​belonging to different scene expansion blocks in each overlapping area according to the position direction of each overlapping area, so as to obtain the target pixel value corresponding to each overlapping area.

19. The device according to claim 18, characterized in that The position direction of the overlapping area includes a first direction and a second direction; the pixel fusion module is further used to perform pixel fusion processing on the pixel values ​​of the overlapping areas belonging to different scene expansion blocks in each of the overlapping areas in the first direction to obtain the target pixel value of the overlapping area in the first direction; For the overlapping areas in the second direction, pixel fusion processing is performed on the pixel values ​​belonging to different scene expansion blocks in each of the overlapping areas to obtain the target pixel values ​​of the overlapping areas in the second direction.

20. The device according to claim 19, characterized in that The block fusion module is further used to perform block fusion processing on each of the scene expansion blocks in the first direction according to the pixel values ​​of each of the initial scene blocks in the first direction and the target pixel value of the overlapping area in the first direction to obtain the scene fusion block in the first direction; According to the pixel values ​​of each of the initial scene blocks in the second direction and the target pixel values ​​of the overlapping area of ​​the first direction and the second direction, block fusion processing is performed on each of the scene expansion blocks in the second direction to generate a target scene graph corresponding to the three-dimensional scene.

21. The device according to any one of claims 12 to 20, characterized in that The target scene graph is applied to a three-dimensional scene application corresponding to the three-dimensional scene; the device further comprises: An image segmentation module is used to determine the number and size of scene graphs that match the three-dimensional scene application; according to the number and size of the scene graphs, the target scene graph is divided into a plurality of target scene graph sub-blocks, so that the three-dimensional scene application loads the corresponding target scene graph sub-blocks according to the scene picture to be displayed at runtime, and renders the scene picture based on the scene data of the target scene graph sub-blocks.

22. The device according to any one of claims 12 to 20, characterized in that The initial scene tile includes an initial terrain height map; the tile fusion module is further used to determine the target height value of each overlapping area according to the target pixel value of each overlapping area; determine the target height value of the area excluding the overlapping area in each initial terrain height map according to the pixel value of each initial terrain height map; based on the target height value of each overlapping area and the target height value of the area excluding the overlapping area in each initial terrain height map, perform tile fusion processing on each scene expansion tile to generate a target terrain height map corresponding to the three-dimensional scene.

23. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

24. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

25. A computer program product comprising computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Generation method of panoramic image and generation device

    CN107993276A