WO2023160487A1 - 一种地形区域的拼接方法、装置、计算机设备及存储介质 - Google Patents
一种地形区域的拼接方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2023160487A1 WO2023160487A1 PCT/CN2023/077070 CN2023077070W WO2023160487A1 WO 2023160487 A1 WO2023160487 A1 WO 2023160487A1 CN 2023077070 W CN2023077070 W CN 2023077070W WO 2023160487 A1 WO2023160487 A1 WO 2023160487A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- area
- frequency
- target
- splicing
- terrain data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/60—Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/60—Methods for processing data by generating or executing the game program
- A63F2300/6009—Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Definitions
- the present disclosure relates to the field of computer technology, in particular, to a method, device, computer equipment and storage medium for splicing terrain regions.
- the construction requirement for the game scene there is a requirement for the construction of the scene, such as the construction requirement for the game scene. Since the scene is generally large, it is usually determined to divide the scene into multiple areas based on the preset size of the scene. After performing terrain design on each area, the multiple areas are spliced to obtain the final scene for rendering and display.
- Embodiments of the present disclosure at least provide a method, device, computer equipment, and storage medium for splicing terrain regions.
- the embodiment of the present disclosure provides a stitching method of a terrain area, which is applied to the stitching of the first area and the second area in the target terrain area; the stitching method includes: combining the first area and the Perform pre-splicing processing on the second area to obtain an original splicing area including a splicing line; perform frequency division processing on the original splicing area to obtain low-frequency terrain data characterizing the height variation characteristics of the original splicing area, and characterize the original splicing area
- the first high-frequency terrain data of the current surface characteristics of the area obtain the second high-frequency terrain data representing the surface characteristics corresponding to the stitching line, and compare the first high-frequency terrain data and the second high-frequency terrain data performing interpolation processing to obtain target high-frequency topographic data; fusing the low-frequency topographic data with the target high-frequency topographic data to obtain a first target splicing area after splicing the first area and the second area .
- the performing pre-splicing processing on the first area and the second area to obtain the original splicing area including the splicing line includes: based on the first boundary information of the first area , and the second boundary information of the second area, to determine the stitching line that joins the first area and the second area; the first boundary information includes each first boundary on the first boundary of the first area The first height value corresponding to the pixel point, the second boundary information includes the second height value corresponding to each second pixel point on the second boundary of the second area; based on the correspondence between each third pixel point on the splicing line The height value of the first pixel point and the second pixel point are respectively mapped to obtain the original stitching area including the stitching line.
- the first pixel and the second pixel are respectively mapped based on the height value corresponding to each third pixel on the splicing line to obtain the
- the original stitching area of the stitching line includes: for any pixel point in the first pixel point and the second pixel point, based on the distance information between the pixel point and each of the third pixel points, determine the The target third pixel point corresponding to the pixel point; based on the distance information between the pixel point and the corresponding target third pixel point, determine the corresponding mapping coefficient when the pixel point is mapped; the mapping coefficient is used to determine the The influence degree of the height value corresponding to the third pixel point of the target when the pixel point is mapped; based on the height value corresponding to each third pixel point on the splicing line, and the first pixel point and Mapping coefficients corresponding to the second pixels are respectively used for mapping processing on the first pixel and the second pixel to obtain an original stitching area including the stitching line.
- the acquiring the second high-frequency topographic data characterizing the surface features corresponding to the stitching line includes: determining a third area consistent with the surface features of the first area, and A fourth area with the same surface characteristics of the second area; performing frequency division processing on the third area to obtain third high-frequency terrain data, and performing frequency division processing on the fourth area to obtain fourth high-frequency terrain data; Perform cross-mapping processing on the high-frequency data corresponding to the same pixel in the third high-frequency terrain data and the fourth high-frequency terrain data to obtain the second high-frequency terrain data.
- the interpolation processing of the first high-frequency terrain data and the second high-frequency terrain data to obtain target high-frequency terrain data includes: performing an interpolation process on the first high-frequency terrain data performing data alignment processing on the data and the second high-frequency terrain data, and determining sub-pixels corresponding to each third pixel point on the stitching line on the first high-frequency terrain data and the second high-frequency terrain data High-frequency terrain data; using the sub-high-frequency terrain data as the reference data for the interpolation process, performing interpolation processing on the first high-frequency terrain data and the second high-frequency terrain data after data alignment processing, to obtain The target high-frequency terrain data.
- the method further includes: in response to the target terrain area including multiple areas, determining at least one group of area pairs to be spliced from the multiple areas; Including adjacent first target areas and second target areas; for each group of area pairs to be spliced in the at least one group of area pairs to be spliced, the first target area and the second target area in the group of area pairs to be spliced Perform splicing processing on the two target areas to obtain the corresponding second target splicing areas of the group of areas to be spliced; based on the second target splicing areas corresponding to the at least one group of areas to be spliced respectively, determine the first corresponding to the target terrain area Three target stitching regions.
- the method further includes: rendering and displaying the third target splicing area based on area model information corresponding to the third target splicing area.
- the embodiment of the present disclosure also provides a terrain region splicing device, which is applied to the rendering and display of the target scene;
- the target scene includes at least one virtual object to be displayed;
- the rendering and display device includes: a first A processing module, configured to perform pre-splicing processing on the first area and the second area to obtain an original splicing area including a splicing line;
- a second processing module to perform frequency division processing on the original splicing area to obtain Low-frequency terrain data characterizing the height change characteristics of the original stitching area, and first high-frequency terrain data characterizing the current surface characteristics of the original stitching area;
- a third processing module configured to acquire the land surface corresponding to the stitching line characteristic second high-frequency terrain data, and perform interpolation processing on the first high-frequency terrain data and the second high-frequency terrain data to obtain target high-frequency terrain data;
- the fourth processing module is used to convert the low-frequency The terrain data is fused with the target high-frequency terrain data to obtain a first target splice
- the first processing module when it performs pre-stitching processing on the first area and the second area to obtain an original stitching area including stitching lines, it is configured to: based on the first The first boundary information of an area and the second boundary information of the second area determine the stitching line joining the first area and the second area; the first boundary information includes the first area The first height value corresponding to each first pixel point on the first boundary, the second boundary information includes the second height value corresponding to each second pixel point on the second boundary of the second region; based on the stitching line Mapping is performed on the first pixel and the second pixel to obtain the original splicing area including the splicing line.
- the first processing module is based on the correspondence between each third pixel point on the splicing line
- the first processing module is used to: for the first pixel point and the second pixel point
- For any pixel point in the pixel point based on the distance information between the pixel point and each of the third pixel points, determine the target third pixel point corresponding to the pixel point; based on the pixel point and the corresponding target third pixel point
- the distance information between points determines the corresponding mapping coefficient when the pixel is mapped; the mapping coefficient is used to determine the degree of influence of the height value corresponding to the third pixel of the target when the pixel is mapped ;
- the points are mapped separately to
- the third processing module when it acquires the second high-frequency terrain data characterizing the surface features corresponding to the stitching line, it is used to: determine the terrain consistent with the surface features of the first region The third area, and the fourth area consistent with the surface characteristics of the second area; performing frequency division processing on the third area to obtain third high-frequency terrain data, and performing frequency division processing on the fourth area to obtain Fourth high-frequency terrain data: performing cross-map processing on the third high-frequency terrain data and the high-frequency data corresponding to the same pixel in the fourth high-frequency terrain data to obtain the second high-frequency terrain data.
- the third processing module when the third processing module performs interpolation processing on the first high-frequency terrain data and the second high-frequency terrain data to obtain target high-frequency terrain data, it is configured to: Perform data alignment processing on the first high-frequency terrain data and the second high-frequency terrain data, and determine whether each third pixel point on the splicing line is in the first high-frequency terrain data and the second high-frequency terrain data Sub-high-frequency terrain data corresponding to the terrain data; using the sub-high-frequency terrain data as the reference data for the interpolation process, aligning the data with the first high-frequency terrain data and the second high-frequency terrain data Interpolation processing is performed on the terrain data to obtain the target high-frequency terrain data.
- the stitching device further includes a fifth processing module, configured to: determine at least one group of regions to be stitched from the plurality of regions in response to the target terrain region including multiple regions pair; the pair of regions to be spliced includes adjacent first target regions and second target regions; for each group of regions to be spliced in the at least one group of region pairs to be spliced, the group of regions to be spliced is centered The first target region and the second target region are spliced to obtain the corresponding second target splicing regions of the group of regions to be spliced; based on the second target splicing regions respectively corresponding to the at least one set of regions to be spliced, A third target splicing area corresponding to the target terrain area is determined.
- a fifth processing module configured to: determine at least one group of regions to be stitched from the plurality of regions in response to the target terrain region including multiple regions pair; the pair of regions to be spliced includes adjacent first target regions and
- the fifth processing module is further configured to: render and display the third target splicing area based on the area model information corresponding to the third target splicing area.
- an optional implementation manner of the present disclosure further provides a computer device, a processor, and a memory, the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the instructions stored in the memory. machine-readable instructions, when the machine-readable instructions are executed by the processor, when the machine-readable instructions are executed by the processor, the above-mentioned first aspect is executed, or any possible implementation of the first aspect steps in the method.
- an optional implementation manner of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the above-mentioned first aspect, or any one of the first aspects in the first aspect, may be executed. Steps in one possible implementation.
- the splicing method, device, computer equipment and storage medium of the terrain area provided by the embodiments of the present disclosure, for the first After the pre-splicing process of the region and the second region, the high-frequency terrain data in the original spliced region is adjusted for the terrain data at the splicing line, so that the obtained target high-frequency data can better reflect the splicing Therefore, the first target stitching area obtained after stitching the low-frequency terrain data of the original stitching area and the above-mentioned target high-frequency data can better transition the different terrain features of the first area and the second area Convergence, so that the first target splicing area obtained after splicing is more real and natural.
- FIG. 1 shows a flow chart of a method for stitching terrain regions provided by an embodiment of the present disclosure
- FIG. 2 shows a schematic diagram of multiple areas constituting a target terrain area provided by an embodiment of the present disclosure
- Fig. 3 shows a schematic diagram of a first area and a second area provided by an embodiment of the present disclosure
- FIG. 4 shows an original stitching area including a stitching line provided by an embodiment of the present disclosure
- FIG. 5 shows a schematic diagram of low-frequency terrain data provided by an embodiment of the present disclosure
- FIG. 6 shows a schematic diagram of a first high-frequency terrain data provided by an embodiment of the present disclosure
- FIG. 7 shows a schematic diagram of a second high-frequency terrain data provided by an embodiment of the present disclosure
- FIG. 8 shows a schematic diagram of a first target splicing area provided by an embodiment of the present disclosure
- FIG. 9 shows a schematic diagram of splicing multiple regions in a target terrain region according to an embodiment of the present disclosure
- FIG. 10 shows a schematic diagram of a splicing device for a terrain area provided by an embodiment of the present disclosure
- Fig. 11 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.
- the terrain design will be performed on multiple areas divided under the scene, and then the multiple areas after the terrain design will be loaded to form a large-scale image, and then use the method of boundary blurring between regions to realize the splicing of regions.
- the way of blurring the boundary will lead to unclear expression of some terrain features on the boundary between regions, for example, the definition of the boundary part is low, or the two adjacent areas with different terrain characteristics cannot be separated. There is a better transition at the border, which will make the spell Subsequent terrain areas are distorted at their borders.
- the present disclosure provides a stitching method of terrain areas.
- the original stitching area including the stitching line can be obtained through pre-stitching processing. Due to the frequency division processing of the region, the terrain characteristics of the region can be determined in the obtained high-frequency region. Therefore, when the terrain characteristics at the stitching line are reserved for the original stitching area, the first one that can characterize the surface features corresponding to the stitching line is specifically obtained.
- the first target stitching area obtained after stitching the low-frequency terrain data of the original stitching area and the above-mentioned target high-frequency data can better transition the different terrain features of the first area and the second area, so that after stitching The obtained first target splicing area is more realistic and natural.
- the stitching method provided by the embodiment of the present disclosure is specific for stitching the first area and the second area in which there is a need for splicing, compared to the need to stitch all the terrain in the target terrain area
- the amount of data to be processed is less, so the amount of calculation during splicing is also small, and it is more suitable for computer equipment with general computing power.
- the subject of the method for stitching terrain regions provided by the embodiments of the present disclosure is generally a computer with certain computing power equipment
- the computer equipment includes, for example: terminal equipment or server or other processing equipment
- the terminal equipment can be user equipment (User Equipment, UE), mobile equipment, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant) Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
- the method for mosaicing terrain regions may be implemented by a processor invoking computer-readable instructions stored in a memory.
- the splicing method of the terrain area provided by the embodiments of the present disclosure can be applied to the game field, animation film and television production and other scenes, for example, in the game field, it can be applied to the production of game scenes, or in the animation film and television production scene, it can be applied to the production of animation scenes.
- a game scene or an animation scene is used as the target terrain area described in the embodiments of the present disclosure. Since the target terrain area is generally large, for example, the design size is 10 kilometers ⁇ 10 kilometers, in order to obtain the target terrain area, the target terrain area will be divided into multiple smaller areas, for example, the size of the segmentation is 10 m x 10 m area.
- the size of the splitting is not limited, and the way of splitting is not limited either. In the case of obtaining multiple designed terrain areas, by splicing adjacent areas among them, a target terrain area obtained by splicing multiple areas can be obtained.
- FIG. 1 it is a flow chart of a method for mosaicing terrain regions provided by an embodiment of the present disclosure, the method includes steps S101 to S104, wherein:
- S101 Perform pre-splicing processing on the first area and the second area to obtain an original splicing area including a splicing line;
- S102 Perform frequency division processing on the original mosaic area to obtain low-frequency terrain data characterizing the height change characteristics of the original mosaic area and first high-frequency terrain data characterizing the current surface characteristics of the original mosaic area;
- S103 Obtain second high-frequency terrain data representing the surface characteristics corresponding to the stitching line, and perform interpolation processing on the first high-frequency terrain data and the second high-frequency terrain data to obtain target high-frequency terrain data;
- S104 Fusion the low-frequency terrain data and the target high-frequency terrain data to obtain a first target stitching area after stitching the first area and the second area.
- FIG. 2 it is a schematic diagram of multiple regions constituting the target topographic region provided by the embodiment of the present disclosure, specifically including region A and region B.
- region A and region B When splicing region A and region B, the region A and region The adjacent first area and the second area are respectively selected from the area B, so as to use the first area and the second area to realize a relatively smooth transition area splicing for the area A and the area B.
- the white borderline is the boundary line corresponding to the area A and the area B on the horizontal plane of the target terrain area. Among them, the change characteristics of the ups and downs in the area A and area B are not the same, which can be realized by designing different terrain features.
- the design when designing the terrain features of the area A and the area B, the design may be carried out according to actual requirements, specifically, for example, it may be implemented by setting corresponding height values for multiple pixel points corresponding to the area. For example, for a certain pixel point, if the height value of the pixel point is set to a larger value, and the height values of other pixel points near the pixel point are set to smaller values, then the In the region of a pixel point, the change of the height value can make the pixel point appear as a protruding steep terrain.
- the first region and the second region selected for stitching are selected from region A and region B, and the first region and the second region are selected. performed in a pre-spliced manner.
- an area of a certain width can be selected based on the critical point of area A and area B, for example, an area with a width of 100 pixels is selected , to select the first region from region A, and select the second region from region B; then, the first boundary can be determined from the selected first region, and the second boundary can be determined from the selected second region Two boundaries, so as to use the first boundary and the second boundary to stitch the area A and the area B.
- a region with a width of 100 pixels may be selected from the critical point as the first region, such as shown in FIG. 3 . Since the height value change difference of pixels in area A is usually small, for the first area intercepted in Figure 3, the difference in height value change corresponding to each pixel point on the new boundary is also small, here This new boundary is determined as the first boundary 31 . Similarly, for the area B, the second area can also be determined in a similar manner, and the second boundary 32 can be obtained, and the difference in height value change corresponding to each pixel point on the second boundary 32 is also small.
- the following manner may be adopted: based on the first boundary information of the first area and the second boundary information of the second area, determining a stitching line for stitching the first area and the second area; the first boundary information includes a first height value corresponding to each first pixel on the first boundary of the first area, and the second The boundary information includes the second height value corresponding to each second pixel point on the second boundary of the second area; based on the height value corresponding to each third pixel point on the stitching line, the first pixel point and the corresponding The second pixel points are respectively mapped to obtain the original stitching area including the stitching line.
- the determination of the first boundary information of the first area is taken as an example for description.
- first determine the first boundary of the first region for example, the first boundary can directly select the boundary adjacent to the second region in the first region, or can also cut out part of the first region region, and take another boundary parallel to this boundary formed after interception as the first boundary.
- the border between the first area and the second area is used for pre-stitching.
- the transition is not smooth. Therefore, in the embodiment of the present disclosure, the method of selecting the first boundary is specifically described by selecting a partial area from the first area, and then obtaining the first boundary from the intercepted area.
- the first boundary information can be determined according to the first height value corresponding to each first pixel on the first boundary; a similar method can also be used for the second
- the second area determines the second boundary information of the second boundary.
- the stitching line between the first area and the second area can be determined by using the first boundary information and the second boundary information, specifically, each first pixel on the first boundary can be correspondingly determined and The first pixel is closest to the second pixel.
- the corresponding first pixel and the second pixel can also be determined for each third pixel on the splicing line joining the first area and the second area.
- Two pixels When determining the height value of each third pixel point, an average value may be calculated by using the first height value of the corresponding first pixel point and the second height value of the second pixel point as the height value of the third pixel point. In this way, the joining line of the first area and the second area can be determined.
- the first pixel point and the second pixel point can be respectively mapped to obtain the original splicing area including the splicing line.
- the original stitching area including the stitching line can be obtained in the following manner: for any pixel point in the first pixel point and the second pixel point, based on the pixel point and the respective first pixel point Based on the distance information between the three pixel points, determine the target third pixel point corresponding to the pixel point; based on the distance information between the pixel point and the corresponding target third pixel point, determine the corresponding target pixel point when performing mapping processing on the pixel point Mapping coefficient; the mapping coefficient is used to determine the degree of influence of the height value corresponding to the third pixel point of the target when the pixel point is mapped; based on the height value corresponding to each third pixel point on the splicing line, and Mapping coefficients corresponding to the first pixel point and the second pixel point respectively, performing mapping processing on the first pixel point and the second pixel point respectively, to obtain the The original seam region for the seamline.
- pixel points in the first region and the second region may be mapped to the stitching line.
- the corresponding distances between the pixel point and each third pixel point can be used information, and determine the third pixel point closest to the pixel point from each third pixel point as the target third pixel point.
- mapping coefficient For any one of the first pixel in the first area and the second pixel in the second area, when performing the mapping process, for example, a larger mapping coefficient can be determined for the pixel near the stitching line.
- the rule of that is, for a pixel point close to the splicing line, the higher the degree of influence by the height value of the corresponding target third pixel point at the splicing line is.
- the distance between the pixel point and the corresponding target third pixel point if the distance information between the pixel point and the corresponding target third pixel point reflects that the distance between the pixel point and the target third pixel point is closer, then determine accordingly The larger the mapping coefficient is; if the distance information between the pixel point and the corresponding target third pixel point reflects the farther the distance between the pixel point and the target third pixel point, the correspondingly determined mapping coefficient is smaller.
- the distance between the pixel point and the corresponding target third pixel point is, for example, inversely proportional to the mapping coefficient.
- the mapping process can also be carried out correspondingly according to the determined mapping coefficient; after the first pixel point and the second pixel point are respectively mapped, the original splicing area including the splicing line shown in Figure 4 can be obtained .
- the original splicing area obtained in the above step S101 still has fluctuations caused by splicing at the splicing line, and the above-mentioned height mapping method cannot better preserve the first area and the second splicing line at the splicing line.
- the corresponding low-frequency terrain data and the first high-frequency terrain data can be obtained by adopting frequency division processing.
- the low-frequency terrain data may characterize the height variation characteristics of the original stitching area.
- FIG. 5 is a schematic diagram of low-frequency terrain data provided by an embodiment of the present disclosure. Since the low-frequency terrain data is determined according to the results of terrain design for the first area and the second area, no adjustment is required.
- FIG. 6 is a schematic diagram of a first high-frequency terrain data provided by an embodiment of the present disclosure, which can characterize the current surface characteristics of the original splicing area.
- the second high-frequency topographic data representing the surface features corresponding to the splicing line is selected, and then Using the first high-frequency terrain data obtained above and the second high-frequency terrain data for interpolation processing, the reserved first area is obtained.
- the following manner when obtaining the second high-frequency topographical data characterizing the surface features corresponding to the stitching line, the following manner may be adopted specifically: determining a third area consistent with the surface features of the first area, and A fourth area in which the surface characteristics of the second area are consistent; performing frequency division processing on the third area to obtain third high-frequency terrain data, and performing frequency division processing on the fourth area to obtain fourth high-frequency terrain data; The third high-frequency terrain data and the high-frequency data corresponding to the same pixel in the fourth high-frequency terrain data are cross-mapped to obtain the second high-frequency terrain data.
- determining a third area consistent with the surface features of the first area Take determining a third area consistent with the surface features of the first area as an example.
- the third area for example, the remaining area in area A that divides the first area can be used as the third area, so that since the first area and the third area are located adjacent to each other, the details of the surface features tend to be closer to unanimous.
- other areas with consistent surface features may also be determined as the third area according to the surface features of the first area, such as mountains, rivers, or sandy land.
- a method for determining the third region may be selected according to actual conditions, and no limitation is made here.
- a similar manner may also be used to define the second region as the fourth region whose surface features are consistent with the second region, and details will not be repeated here.
- the size of the third area is consistent with the size of the fourth area.
- the third high-frequency terrain data of the third area and the fourth high-frequency terrain data of the fourth area can be obtained by means of frequency division processing. Since the sizes of the third area and the fourth area are the same, the cross-mapping process can be directly performed on the high-frequency terrain data corresponding to the same pixel in the third high-frequency terrain data and the fourth high-frequency terrain data to obtain the second high-frequency terrain data.
- FIG. 7 is a schematic diagram of second high-frequency terrain data provided by an embodiment of the present disclosure.
- the third high-frequency terrain data and the fourth high-frequency terrain data of the second high-frequency terrain data obtained through the cross-mapping process can represent the surface characteristics of the first region and the surface characteristics of the second region respectively
- the second high-frequency terrain The data can reflect the expected surface characteristics at the stitching line.
- the second high-frequency topographical data and the first high-frequency topographical data are used for interpolation processing to obtain high-frequency data including surface features at the stitching line.
- the following method when acquiring the target high-frequency terrain data, the following method can be specifically adopted: performing data alignment processing on the first high-frequency terrain data and the second high-frequency terrain data, and determining the stitching line Sub-high-frequency terrain data corresponding to each third pixel point on the first high-frequency terrain data and the second high-frequency terrain data; using the sub-high-frequency terrain data as the reference data for the interpolation process and performing interpolation processing on the first high-frequency terrain data and the second high-frequency terrain data after data alignment processing to obtain the target high-frequency terrain data.
- the sub-high-frequency terrain corresponding to the stitching line on the first high-frequency terrain data and the second high-frequency terrain data can be used.
- the data is aligned, so as to use the sub-high-frequency terrain data as reference data to perform interpolation processing on the first high-frequency terrain data and the second high-frequency terrain data.
- the selected interpolation coefficients may, for example, obey a normal distribution, and the interpolation coefficients corresponding to the pixels corresponding to the reference data are the maximum value of the interpolation coefficients under the normal distribution, such as 1;
- the pixel corresponding to the frequency terrain data is determined by the distance between the pixel and the nearest third pixel among the third pixels corresponding to the reference data, which is similar to the above-mentioned method of determining the mapping coefficient. This will not be repeated here. In this way, the target high-frequency terrain data can be obtained.
- the obtained The low-frequency terrain data is fused with the target high-frequency terrain data to obtain a first target spliced area after splicing the first area and the second area.
- FIG. 8 is a schematic diagram of a first target stitching area provided by an embodiment of the present disclosure.
- the obtained first target stitching area can have a smoother transition at the stitching line while retaining the height change characteristics of the first area and the second area and the corresponding surface features of the first area and the second area.
- the ground surface features after the fusion of the first area and the second area can be better preserved, so that the transition at the stitching line is more realistic.
- FIG. 9 is a schematic diagram of splicing multiple regions in the target topographic region provided by the embodiment of the present disclosure. Compared with regions A and B shown in FIG. In terms of the way of splicing, the transition of the splicing is smooth, and there is no obvious concave-convex change. At the same time, the surface features in the first area and the second area can be better preserved, which is more authentic.
- the target terrain area includes a plurality of areas, and two adjacent areas (hereinafter referred to as the first target area and the second target area) can be used as a group of area pairs to be spliced.
- the area A and the area B described above may serve as the first target area and the second target area described here.
- the first target region and the second target region in the group of region pairs to be spliced can be spliced to obtain
- the group of regions to be stitched corresponds to the second target stitching region; then, based on the second target stitching regions respectively corresponding to the at least one group of regions to be stitched, determine a third target stitching region corresponding to the target terrain region.
- the method of stitching the area A and the area B described above may be used, and details will not be repeated here. Since for each group of regions to be stitched in the target terrain region, the corresponding second target stitching region can be determined, so the second target stitching region corresponding to each group of regions to be stitched can be used to obtain the complete target terrain. region corresponding to the third target stitching region.
- the second target stitched region obtained after stitching the first target region and the second target region can have a relatively smooth transition at the stitching line, and can characterize the first target region and the second target region.
- the surface features corresponding to the first target area and the second target area respectively, so the obtained third target stitching area corresponding to the complete target terrain area can also be more realistic.
- the third target stitching area may also be rendered and displayed based on the area model information corresponding to the third target stitching area.
- the stitching to obtain the third target stitching area also includes, for example, the adjustment of the area model information corresponding to each of the target areas, so the area model information corresponding to the third target stitching area can also reflect the target terrain after rendering The terrain feature with natural transition under the region makes the rendered picture including the stitching region of the third target more realistic.
- the present disclosure provides a splicing method, device, computer equipment, and storage medium for terrain areas.
- the original splicing line can be obtained through pre-stitching processing. Stitching area. Due to the frequency division processing of the region, the terrain characteristics of the region can be determined in the obtained high-frequency region. Therefore, when the terrain characteristics at the stitching line are reserved for the original stitching area, the first one that can characterize the surface features corresponding to the stitching line is specifically obtained.
- Two high-frequency terrain data, and use the first high-frequency terrain data after frequency division processing of the original splicing area Interpolation processing is performed to obtain target high-frequency terrain data that can characterize the corresponding surface features at the position of the stitching line, so as to obtain the first target stitching area after the stitching of the first area and the second area.
- the first target stitching area obtained after stitching the low-frequency terrain data of the original stitching area and the above-mentioned target high-frequency data can better transition the different terrain features of the first area and the second area, so that after stitching
- the obtained first target splicing area is more real and natural.
- the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
- the specific execution order of each step should be based on its function and possible
- the inner logic is OK.
- the embodiments of the present disclosure also provide a splicing device for terrain regions corresponding to the splicing method of terrain regions. Since the problem-solving principle of the device in the embodiments of the present disclosure is the same as the above-mentioned splicing method for terrain regions in the embodiments of the present disclosure Similar, therefore, the implementation of the device can refer to the implementation of the method, and repeated descriptions will not be repeated.
- FIG. 10 it is a schematic diagram of a stitching device for a terrain area provided by an embodiment of the present disclosure, which is applied to rendering and displaying a target scene; the target scene includes at least one virtual object to be displayed; the device includes : the first processing module 11, the second processing module 12, the third processing module 13, and the fourth processing module 14; wherein,
- the first processing module 11 is configured to perform pre-splicing processing on the first area and the second area to obtain an original splicing area including a splicing line;
- the second processing module 12 is configured to perform frequency division processing on the original mosaic area to obtain low-frequency topographic data representing the height change characteristics of the original mosaic area and the first high-frequency terrain data representing the current surface characteristics of the original mosaic area frequency terrain data;
- the third processing module 13 is configured to acquire second high-frequency topographical data characterizing the surface features corresponding to the stitching line, and perform interpolation processing on the first high-frequency topographical data and the second high-frequency topographical data, to obtain Target high-frequency terrain data;
- the fourth processing module 14 is configured to fuse the low-frequency terrain data and the target high-frequency terrain data to obtain a first target stitched area after stitching the first area and the second area.
- the first processing module 11 when it performs pre-stitching processing on the first area and the second area to obtain the original splicing area including the splicing line, it is configured to: based on the The first boundary information of the first area and the second boundary information of the second area determine a stitching line joining the first area and the second area; the first boundary information includes the first area The first height value corresponding to each first pixel point on the first boundary of the , the second boundary information includes the second height value corresponding to each second pixel point on the second boundary of the second region; based on the stitching The height values corresponding to the third pixel points on the line are respectively mapped to the first pixel point and the second pixel point to obtain the original splicing area including the splicing line.
- the first processing module 11 maps the first pixel point and the second pixel point respectively based on the height value corresponding to each third pixel point on the stitching line.
- Processing when obtaining the original stitching area including the stitching line, is used to: for any pixel point in the first pixel point and the second pixel point, based on the pixel point and each third pixel point Determine the target third pixel point corresponding to the pixel point based on the distance information between the pixel point and the corresponding target third pixel point; determine the corresponding mapping coefficient when the pixel point is mapped; The mapping coefficient is used to determine the influence degree of the height value corresponding to the third pixel point of the target when the pixel point is mapped; based on the height value corresponding to each third pixel point on the splicing line and the Mapping coefficients respectively corresponding to a pixel point and the second pixel point respectively perform mapping processing on the first pixel point and the second pixel point to obtain an original splicing area including the splicing line.
- the third processing module 13 when the third processing module 13 acquires the second high-frequency terrain data characterizing the surface features corresponding to the stitching line, it is used to: determine that it is consistent with the surface features of the first area The third area of the third area, and the fourth area consistent with the surface characteristics of the second area; performing frequency division processing on the third area to obtain third high-frequency terrain data, and performing frequency division processing on the fourth area Obtaining fourth high-frequency terrain data; performing cross-mapping processing on the third high-frequency terrain data and the high-frequency data corresponding to the same pixel in the fourth high-frequency terrain data to obtain the second high-frequency terrain data.
- the third processing module 13 when the third processing module 13 performs interpolation processing on the first high-frequency terrain data and the second high-frequency terrain data to obtain target high-frequency terrain data, it is used to: Perform data alignment processing on the first high-frequency terrain data and the second high-frequency terrain data, and determine whether each third pixel point on the splicing line is in the first high-frequency terrain data and the second high-frequency terrain data corresponding sub-high-frequency terrain data on the high-frequency terrain data; using the sub-high-frequency terrain data as the reference data for the interpolation process, the first high-frequency terrain data and the second high-frequency terrain data after data alignment processing Interpolation processing is performed on the high-frequency terrain data to obtain the target high-frequency terrain data.
- the splicing device further includes a fifth processing module 15, configured to: in response to the target terrain area including multiple areas, determine at least one group to be spliced from the multiple areas Region pair; the pair of regions to be spliced includes adjacent first target regions and second target regions; The first target region and the second target region are spliced to obtain the corresponding second target splicing regions of the group of regions to be spliced; , determine a third target stitching area corresponding to the target terrain area.
- a fifth processing module 15 configured to: in response to the target terrain area including multiple areas, determine at least one group to be spliced from the multiple areas Region pair; the pair of regions to be spliced includes adjacent first target regions and second target regions; The first target region and the second target region are spliced to obtain the corresponding second target splicing regions of the group of regions to be spliced; , determine a third target stitching area corresponding to the target terrain area.
- the fifth processing module 15 is further configured to: render and display the third target splicing area based on the area model information corresponding to the third target splicing area.
- FIG. 11 is a schematic structural diagram of the computer device provided by the embodiment of the present disclosure, including:
- processor 10 and memory 20; the memory 20 stores machine-readable instructions executable by the processor 10, the processor 10 is used to execute the machine-readable instructions stored in the memory 20, and the machine-readable instructions are executed by the processor 10 During execution, the processor 10 performs the following steps:
- memory 20 comprises memory 210 and external memory 220;
- Memory 210 here is also called internal memory, is used for temporarily storing the operation data in processor 10, and the data exchanged with external memory 220 such as hard disk, processor 10 communicates with memory 210 through memory 210.
- the external memory 220 performs data exchange.
- An embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the steps of the method for mosaicing terrain areas described in the above-mentioned method embodiments are executed .
- the storage medium may be a volatile or non-volatile computer-readable storage medium.
- An embodiment of the present disclosure also provides a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the method for mosaicing terrain areas described in the method embodiment above, for details, see The foregoing method embodiments are not described in detail here.
- the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof.
- the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
- a software development kit Software Development Kit, SDK
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
- the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Processing Or Creating Images (AREA)
Abstract
本公开提供了一种地形区域的拼接方法、装置、计算机设备及存储介质,应用于对目标地形区域中第一区域和第二区域的拼接;所述拼接方法包括:对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
Description
本申请要求于2022年02月28日提交中国专利局、申请号为202210190700.6、申请名称为“一种地形区域的拼接方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本公开涉及计算机技术领域,具体而言,涉及一种地形区域的拼接方法、装置、计算机设备及存储介质。
在游戏等应用场景下,存在对场景的构建需求,例如对游戏场景的构建需求。由于场景一般较大,因此通常会基于场景的预设大小确定将场景划分为多个区域,在对每个区域进行地形设计后,对多个区域进行拼接以得到最终用于渲染显示的场景。
在一些可能的方式中,会将经过地形设计后的多个区域加载为一张尺寸较大的图像,再对图像进行区域间边界的模糊处理,以得到拼接后的场景。但这种模糊处理的方式无法较好的保留区域间边界的地形特征,使得拼接后的地形区域在边界处失真。
发明内容
本公开实施例至少提供一种地形区域的拼接方法、装置、计算机设备及存储介质。
第一方面,本公开实施例提供了一种地形区域的拼接方法,应用于对目标地形区域中第一区域和第二区域的拼接;所述拼接方法包括:对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
一种可选的实施方式中,所述对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域,包括:基于所述第一区域的第一边界信息、以及所述第二区域的第二边界信息,确定拼接所述第一区域和所述第二区域的拼接线;所述第一边界信息包括所述第一区域的第一边界上各个第一像素点对应的第一高度值,所述第二边界信息包括所述第二区域的第二边界上各个第二像素点对应的第二高度值;基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
一种可选的实施方式中,所述基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域,包括:针对所述第一像素点以及所述第二像素点中的任一像素点,基于该像素点与所述各个第三像素点之间的距离信息,确定该像素点对应的目标第三像素点;基于该像素点与对应的目标第三像素点之间的距离信息,确定对该像素点进行映射处理时对应的映射系数;所述映射系数用于确定所述目标第三像素点对应的高度值对该像素点进行映射处理时的影响程度;基于所述拼接线上各个第三像素点对应的高度值、以及所述第一像素点以及
所述第二像素点分别对应的映射系数,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
一种可选的实施方式中,所述获取表征所述拼接线对应的地表特征的第二高频地形数据,包括:确定与所述第一区域的地表特征一致的第三区域、以及与所述第二区域的地表特征一致的第四区域;对所述第三区域进行分频处理得到第三高频地形数据,并对所述第四区域进行分频处理得到第四高频地形数据;对所述第三高频地形数据以及所述第四高频地形数据中对应相同像素点的高频数据进行交叉映射处理,得到所述第二高频地形数据。
一种可选的实施方式中,所述对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据,包括:对所述第一高频地形数据和所述第二高频地形数据进行数据对齐处理,并确定所述拼接线上各个第三像素点在所述第一高频地形数据和所述第二高频地形数据上分别对应的子高频地形数据;以所述子高频地形数据作为所述插值处理的基准数据,对数据对齐处理后的所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到所述目标高频地形数据。
一种可选的实施方式中,所述方法还包括:响应于所述目标地形区域包括多个区域,从所述多个区域中确定至少一组待拼接区域对;所述待拼接区域对中包括相邻的第一目标区域和第二目标区域;针对所述至少一组待拼接区域对中的每组待拼接区域对,对该组待拼接区域对中的第一目标区域和所述第二目标区域进行拼接处理,得到该组待拼接区域对相应的第二目标拼接区域;基于所述至少一组待拼接区域对分别对应的第二目标拼接区域,确定所述目标地形区域对应的第三目标拼接区域。
一种可选的实施方式中,所述方法还包括:基于所述第三目标拼接区域对应的区域模型信息,渲染显示所述第三目标拼接区域。
第二方面,本公开实施例还提供一种地形区域的拼接装置,应用于对目标场景的渲染显示;所述目标场景中包括至少一个待显示的虚拟对象;所述渲染显示装置包括:第一处理模块,用于对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;第二处理模块,用于对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;第三处理模块,用于获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;第四处理模块,用于将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
一种可选的实施方式中,所述第一处理模块在对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域时,用于:基于所述第一区域的第一边界信息、以及所述第二区域的第二边界信息,确定拼接所述第一区域和所述第二区域的拼接线;所述第一边界信息包括所述第一区域的第一边界上各个第一像素点对应的第一高度值,所述第二边界信息包括所述第二区域的第二边界上各个第二像素点对应的第二高度值;基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
一种可选的实施方式中,所述第一处理模块在基于所述拼接线上各个第三像素点对应
的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域时,用于:针对所述第一像素点以及所述第二像素点中的任一像素点,基于该像素点与所述各个第三像素点之间的距离信息,确定该像素点对应的目标第三像素点;基于该像素点与对应的目标第三像素点之间的距离信息,确定对该像素点进行映射处理时对应的映射系数;所述映射系数用于确定所述目标第三像素点对应的高度值对该像素点进行映射处理时的影响程度;基于所述拼接线上各个第三像素点对应的高度值、以及所述第一像素点以及所述第二像素点分别对应的映射系数,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
一种可选的实施方式中,所述第三处理模块在获取表征所述拼接线对应的地表特征的第二高频地形数据时,用于:确定与所述第一区域的地表特征一致的第三区域、以及与所述第二区域的地表特征一致的第四区域;对所述第三区域进行分频处理得到第三高频地形数据,并对所述第四区域进行分频处理得到第四高频地形数据;对所述第三高频地形数据以及所述第四高频地形数据中对应相同像素点的高频数据进行交叉映射处理,得到所述第二高频地形数据。
一种可选的实施方式中,所述第三处理模块在对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据时,用于:对所述第一高频地形数据和所述第二高频地形数据进行数据对齐处理,并确定所述拼接线上各个第三像素点在所述第一高频地形数据和所述第二高频地形数据上分别对应的子高频地形数据;以所述子高频地形数据作为所述插值处理的基准数据,对数据对齐处理后的所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到所述目标高频地形数据。
一种可选的实施方式中,所述拼接装置还包括,第五处理模块,用于:响应于所述目标地形区域包括多个区域,从所述多个区域中确定至少一组待拼接区域对;所述待拼接区域对中包括相邻的第一目标区域和第二目标区域;针对所述至少一组待拼接区域对中的每组待拼接区域对,对该组待拼接区域对中的第一目标区域和所述第二目标区域进行拼接处理,得到该组待拼接区域对相应的第二目标拼接区域;基于所述至少一组待拼接区域对分别对应的第二目标拼接区域,确定所述目标地形区域对应的第三目标拼接区域。
一种可选的实施方式中,所述第五处理模块还用于:基于所述第三目标拼接区域对应的区域模型信息,渲染显示所述第三目标拼接区域。
第三方面,本公开可选实现方式还提供一种计算机设备,处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,所述处理器用于执行所述存储器中存储的机器可读指令,所述机器可读指令被所述处理器执行时,所述机器可读指令被所述处理器执行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤。
第四方面,本公开可选实现方式还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被运行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤。
关于上述地形区域的拼接装置、计算机设备、及计算机可读存储介质的效果描述参见上述地形区域的拼接方法的说明,这里不再赘述。
本公开实施例提供的地形区域的拼接方法、装置、计算机设备及存储介质,在对第一
区域和第二区域进行预拼接处理后,对得到的原始拼接区域中的高频地形数据部分进行了针对拼接线处的地形数据调整,以使得到的目标高频数据能够较好的反应出拼接线部分的地表特征,因此,在将原始拼接区域的低频地形数据和上述目标高频数据拼接后得到的第一目标拼接区域能够较好的对第一区域和第二区域的不同地形特征进行过渡衔接,从而使得拼接后得到的第一目标拼接区域更加真实自然。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了本公开实施例所提供的一种地形区域的拼接方法的流程图;
图2示出了本公开实施例所提供的一种构成目标地形区域的多个区域的示意图;
图3示出了本公开实施例所提供的一种第一区域和第二区域的示意图;
图4示出了本公开实施例所提供的一种包含拼接线的原始拼接区域;
图5示出了本公开实施例所提供的一种低频地形数据的示意图;
图6示出了本公开实施例所提供的一种第一高频地形数据的示意图;
图7示出了本公开实施例所提供的一种第二高频地形数据的示意图;
图8示出了本公开实施例所提供的一种第一目标拼接区域的示意图;
图9示出了本公开实施例所提供的一种对目标地形区域中的多个区域进行拼接后的示意图;
图10示出了本公开实施例所提供的一种地形区域的拼接装置的示意图;
图11示出了本公开实施例所提供的一种计算机设备的示意图。
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
经研究发现,在对游戏场景等较大的场景进行构建时,会通过对场景下划分的多个区域进行地形设计,再将完成地形设计后的多个区域进行加载,形成一张尺寸较大的图像,然后采用区域间边界模糊处理的方式实现区域的拼接。在该种方式下,边界模糊处理的方式会导致在区域间边界的部分地形特征表达不清楚,比如表现在边界部分的清晰度较低,或者表现在相邻两个不同地形特征的区域无法在边界处有较好的过渡衔接,这都会使得拼
接后的地形区域在边界处失真。
另外,由于在通过区域拼接的方式构建场景时需要将多个区域一并进行加载,并对每两个相邻的区域间的边界进行模糊处理,因此进行模糊处理时的计算量较大,计算机设备的算力也难以承担。
基于上述研究,本公开提供了一种地形区域的拼接方法,在对目标地形区域中的第一区域和第二区域进行拼接时,通过预拼接处理,可以得到包含拼接线的原始拼接区域。由于对区域进行分频处理,可以在得到的高频区域中确定区域的地形特征,因此在为原始拼接区域保留拼接线处的地形特征时,具体获取了可以表征拼接线对应的地表特征的第二高频地形数据,并利用对原始拼接区域进行分频处理后的第一高频地形数据进行插值处理,得到在拼接线位置处可以表征对应地表特征的目标高频地形数据,从而得到第一区域和第二区域拼接后的第一目标拼接区域。这样,在将原始拼接区域的低频地形数据和上述目标高频数据拼接后得到的第一目标拼接区域能够较好的对第一区域和第二区域的不同地形特征进行过渡衔接,从而使得拼接后得到的第一目标拼接区域更加真实自然。
另外,在对目标地形区域中的区域进行拼接时,本公开实施例提供的拼接方法具体针对其中有拼接需求的第一区域和第二区域进行拼接,相较于需要将目标地形区域中所有地形区域均进行加载以及拼接处理的方式而言,所需处理的数据量更少,因此在进行拼接时的计算量也较小,更适用于具有一般算力的计算机设备。
针对以上方案所存在的缺陷,均是发明人在经过实践并仔细研究后得出的结果,因此,上述问题的发现过程以及下文中本公开针对上述问题所提出的解决方案,都应该是发明人在本公开过程中对本公开做出的贡献。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
为便于对本实施例进行理解,首先对本公开实施例所公开的一种地形区域的拼接方法进行详细介绍,本公开实施例所提供的地形区域的拼接方法的执行主体一般为具有一定计算能力的计算机设备,该计算机设备例如包括:终端设备或服务器或其它处理设备,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该地形区域的拼接方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
本公开实施例提供的地形区域的拼接方法可以应用于游戏领域、动漫影视制作等场景,例如在游戏领域中应用于游戏场景的制作,或者在动漫影视制作场景中应用于动漫场景的制作。在具体实施中,将游戏场景或者动漫场景等,作为本公开实施例中说明的目标地形区域。由于目标地形区域一般较大,比如设计尺寸为10公里×10公里,则为了得到目标地形区域,会将目标地形区域切分为多个尺寸较小的多个区域,比如切分得到尺寸为10米×10米的区域。此处,切分的尺寸大小并不做出限定,切分的方式也不做出限定。在得到多个设计地形后的区域的情况下,通过对其中相邻区域的拼接,可以得到对多个区域进行拼接后得到的目标地形区域。
下面对本公开实施例提供的地形区域的拼接方法加以说明。
参见图1所示,为本公开实施例提供的一种地形区域的拼接方法的流程图,所述方法包括步骤S101~S104,其中:
S101:对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;
S102:对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;
S103:获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;
S104:将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
下面对上述S101~S104加以详细说明。
针对上述S101,首先对第一区域和第二区域进行说明。参见图2所示,为本公开实施例提供的一种构成目标地形区域的多个区域的示意图,具体包括区域A以及区域B,在对区域A和区域B进行拼接时,会从区域A和区域B中分别选取出相邻的第一区域和第二区域,以利用第一区域和第二区域对区域A和区域B实现过渡较为平滑的区域拼接。在图2中,白色边线为区域A和区域B在目标地形区域的水平面上对应的边界线。其中,区域A和区域B在地势上的高低起伏的变化特征并不相同,具体可以通过进行不同地形特征的设计实现。
其中,在设计区域A和区域B的地形特征时,可以按照实际需求进行设计,具体例如可以采用为区域对应的多个像素点设置对应的高度值的方式实现。例如,对于某一像素点而言,若将该像素点的高度值设置为较大的数值,而将该像素点附近的其他像素点的高度值均设置为较小的数值,则在包含该像素点的区域中可以通过高度值的变化使该像素点处表现为突起的陡峭地势。
由于区域A和区域B在地势上的变化特征并不相同,因此在示意图中区域A和区域B的临界处可以看出,在临界处相对应的像素点设置的高度值并不相同,而若直接对区域A和区域B进行拼接,则需要保证拼接处相邻像素点对应的高度值相同。在无法进行直接拼接的情况下,在本公开实施例中具体采用了在区域A和区域B上选取出用于进行拼接的第一区域和第二区域,并对第一区域和第二区域进行预拼接的方式进行。
在一种可能的情况下,在从区域A和区域B中分别选取第一区域和第二区域时,可以基于区域A和区域B的临界处取一定宽度的区域,比如选取100像素宽度的区域,以从区域A中选取出第一区域、以及从区域B中选取出第二区域;然后,可以从选取出的第一区域中确定第一边界、以及从选取出的第二区域中确定第二边界,以利用第一边界和第二边界进行对区域A和区域B的拼接。
示例性的,针对图2中示出的区域A,例如可以在从临界处选取100像素宽度的区域,作为第一区域,例如图3所示。由于在区域A内像素点的高度值变化差异通常较小,因此针对图3中截取出的第一区域,得到的新的边界上各像素点对应的高度值变化差异也较小,此处将该新的边界确定为第一边界31。同样的,对于区域B也可以采用相似的方式确定第二区域,并得到第二边界32,在第二边界32上各像素点对应的高度值变化差异也较小。
这样,在利用第一边界31的第一边界信息和第二边界32的第二边界信息确定拼接线时,可以得到像素点上对应的高度值起伏变化比较小的拼接线,从而在对第一区域和第二区域进行预拼接后,在该拼接线处具有较为平滑的地势过渡。
在具体实施中,在对第一区域和第二区域进行预拼接处理时,可以采用下述方式:基于所述第一区域的第一边界信息、以及所述第二区域的第二边界信息,确定拼接所述第一区域和所述第二区域的拼接线;所述第一边界信息包括所述第一区域的第一边界上各个第一像素点对应的第一高度值,所述第二边界信息包括所述第二区域的第二边界上各个第二像素点对应的第二高度值;基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
其中,以确定第一区域的第一边界信息为例进行说明。在确定第一边界信息前,首先确定第一区域的第一边界;第一边界例如可以直接选取在第一区域中与第二区域相邻的边界,或者也可以从第一区域中截取出部分区域,并将截取后形成的与该边界处平行的另一个边界作为第一边界。
此处,在直接将第一区域中与第二区域相邻的边界作为第一边界的情况下,由于在对区域进行地形设计时,边界处对应的像素点的高度值通常变化差异比较大,也即表现出较大的起伏,因此利用第一区域和第二区域相邻的边界进行预拼接,在拼接时拼接线处会较为崎岖,从而使显示出的第一区域和第二区域之间过渡不平滑。因此,本公开实施例中具体对选用从第一区域中截取部分区域,再通过截取后的区域获取第一边界的方式进行第一边界的选取的方式加以说明。
在具体实施中,在确定第一区域的第一边界后,根据第一边界上的额各个第一像素点对应的第一高度值,可以确定第一边界信息;利用相似的方式也可以为第二区域确定第二边界的第二边界信息。利用第一边界信息和第二边界信息可以确定第一区域和第二区域的拼接线,具体地,在第一边界上的每个第一像素点,均可以在第二边界上相应的确定和该第一像素点距离最近的第二像素点。
此处,根据上述第一像素点和第二像素点之间的对应关系,也可以为拼接第一区域和第二区域的拼接线上的各个第三像素点确定对应的第一像素点和第二像素点。在确定每个第三像素点的高度值时,可以利用对应的第一像素点的第一高度值和第二像素点的第二高度值求取均值,作为该第三像素点的高度值。这样,即可以确定第一区域和第二区域的拼接线。
在确定了拼接线的情况下,根据拼接线上各个第三像素点的高度值,可以对第一像素点和第二像素点分别进行映射处理,以得到包含拼接线的原始拼接区域。
在具体实施中,具体可以采用下述方式得到包含拼接线的原始拼接区域:针对所述第一像素点以及所述第二像素点中的任一像素点,基于该像素点与所述各个第三像素点之间的距离信息,确定该像素点对应的目标第三像素点;基于该像素点与对应的目标第三像素点之间的距离信息,确定对该像素点进行映射处理时对应的映射系数;所述映射系数用于确定所述目标第三像素点对应的高度值对该像素点进行映射处理时的影响程度;基于所述拼接线上各个第三像素点对应的高度值、以及所述第一像素点以及所述第二像素点分别对应的映射系数,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述
拼接线的原始拼接区域。
具体地,为了在利用拼接线对第一区域和第二区域进行拼接时在拼接线上具有较为平滑的过渡,可以对第一区域和第二区域中的像素点进行针对拼接线的映射处理。其中,在确定与第一像素点或第二像素点中的任一像素点在拼接线上对应的目标第三像素点时,可以通过该像素点与各个第三像素点之间分别对应的距离信息,从各个第三像素点中确定与该像素点距离最近的第三像素点,作为目标第三像素点。
针对第一区域中的第一像素点、第二区域中的第二像素点中的任一像素点,在进行映射处理时,例如可以遵循为靠近拼接线处的像素点确定较大的映射系数的规则,也即对于靠近拼接线处的像素点,受拼接线处对应的目标第三像素点的高度值的影响程度越高。
在为该像素点确定进行映射处理时对应的映射系数时,若该像素点与对应的目标第三像素点之间的距离信息反应该像素点与目标第三像素点距离越近,则相应确定的映射系数越大;若该像素点与对应的目标第三像素点之间的距离信息反应该像素点与目标第三像素点距离越远,则相应确定的映射系数越小。一种可能的情况下,该像素点与对应的目标第三像素点之间的距离例如与映射系数成反比。
一般地,将映射系数的取值范围设置在0至1之间,则对于距离拼接线最远的像素点,对应的映射系数为0,也即对该像素点保留原有的高度值;而对于距离拼接线最近的像素点,对应的映射系数为1,也即将该像素点的高度值映射为对应的目标第三像素点的高度值。对于其余的像素点,也可以相应的按照确定的映射系数进行映射处理;在对第一像素点和第二像素点分别进行映射处理后,可以得到图4所示的包含拼接线的原始拼接区域。
此处,通过图4可以看出,在进行预拼接后得到的原始拼接区域相较于第一区域和第二区域而言,较大程度上保留了地形特征,并且由于具体采用了映射处理的方式,因此在拼接线处也不会出现非常明显的凹凸变化。
针对上述S102,由于在上述步骤S101中得到的原始拼接区域在拼接线处仍存在由于拼接导致的起伏变化,并且上述高度映射的方式下并不能使拼接线处较好的保留第一区域和第二区域分别对应的地表特征。例如,若第一区域包括河流,第二区域包括沙地,则得到的原始拼接区域在拼接线上并不能由于映射处理使其能够显现出流水和石沙边界处的地表特征。
而对于预拼接区域而言,采用分频处理的方式,可以得到对应的低频地形数据和第一高频地形数据。其中,低频地形数据可以表征原始拼接区域的高度变化特征,示例性的,参见图5所示,为本公开实施例提供的一种低频地形数据的示意图。由于低频地形数据是根据对第一区域和第二区域进行地形设计的结果确定的,因此并不需要进行调整。
而对于得到的第一高频地形数据而言,参见图6所示,为本公开实施例提供的一种第一高频地形数据的示意图,其可以表征原始拼接区域的当前地表特征,为了在对第一区域和第二区域进行拼接后在拼接线处保留二者分别对应的地表特征,因此还可以对第一高频地形数据进行进一步的处理,详见下述步骤S103的说明。
针对上述S103,为了能够在拼接线处保留第一区域和第二区域分别对应的地表特征,在本公开实施例中选取获取表征所述拼接线对应的地表特征的第二高频地形数据,再利用上述得到的第一高频地形数据与第二高频地形数据进行插值处理的方式,得到保留第一区
域和第二区域分别对应的地表特征的目标高频地形数据。
在具体实施中,在获取表征拼接线对应的地表特征的第二高频地形数据时,具体可以采用下述方式:确定与所述第一区域的地表特征一致的第三区域、以及与所述第二区域的地表特征一致的第四区域;对所述第三区域进行分频处理得到第三高频地形数据,并对所述第四区域进行分频处理得到第四高频地形数据;对所述第三高频地形数据以及所述第四高频地形数据中对应相同像素点的高频数据进行交叉映射处理,得到所述第二高频地形数据。
以确定与第一区域的地表特征一致的第三区域为例。在确定第三区域时,例如可以将划分出第一区域的区域A中的剩余区域作为第三区域,这样由于第一区域和第三区域位置相邻,在地表特征的细节上也更趋于一致。或者,也可以根据第一区域的地表特征,例如山川、河流或者沙地,确定地表特征一致的其他区域,作为第三区域。具体可以根据实际情况选取确定第三区域的方法,在此并不做出限定。同样的,也可以采用相似的方式为第二区域与第二区域地表特征一致的第四区域,在此不再重复赘述。
在一种可能的情况下,第三区域的尺寸与第四区域的尺寸一致。在得到第三区域和第四区域的情况下,采用分频处理的方式,可以得到第三区域的第三高频地形数据、以及第四区域的第四高频地形数据。由于第三区域和第四区域的尺寸一致,因此可以直接对第三高频地形数据以及第四高频地形数据中对应相同像素点的高频地形数据进行交叉映射处理,得到第二高频地形数据。示例性的,参见图7所示,为本公开实施例提供的一种第二高频地形数据的示意图。
其中,由于经过交叉映射处理得到第二高频地形数据的第三高频地形数据和第四高频数据分别可以表征第一区域的地表特征和第二区域的地表特征,因此第二高频地形数据能够体现出拼接线处应有的地表特征。进而,利用第二高频地形数据与第一高频地形数据进行插值处理,可以得到包含拼接线处地表特征的高频数据。
在具体实施中,在获取目标高频地形数据时,具体可以采用下述方式:对所述第一高频地形数据和所述第二高频地形数据进行数据对齐处理,并确定所述拼接线上各个第三像素点在所述第一高频地形数据和所述第二高频地形数据上分别对应的子高频地形数据;以所述子高频地形数据作为所述插值处理的基准数据,对数据对齐处理后的所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到所述目标高频地形数据。
其中,在对第一高频地形数据和第二高频地形数据进行数据对齐处理时,具体可以利用拼接线在第一高频地形数据和第二高频地形数据上分别对应的子高频地形数据进行对齐,以利用子高频地形数据作为基准数据,对第一高频地形数据和第二高频地形数据进行插值处理。在进行插值处理时,所选用的插值系数例如可以服从正态分布,并且在基准数据处对应的像素点对应的插值系数为正态分布下可取插值系数的最大值,例如为1;对于其余高频地形数据对应的像素点,在确定插值系数时,由该像素点距离基准数据对应的第三像素点中最近的第三像素点之间的距离确定,与上述确定映射系数的方式相似,在此不再赘述。这样,即可以得到目标高频地形数据。
针对上述S104,在利用上述S102得到表征所述原始拼接区域的高度变化特征的低频地形数据、并利用上述S103得到包含拼接线处地表特征的目标高频地形数据后,可以将所
述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。示例性的,参见图8所示,为本公开实施例提供的一种第一目标拼接区域的示意图。这样,得到的第一目标拼接区域能够在保留第一区域和第二区域的高度变化特征、以及第一区域和第二区域分别对应的地表特征的同时,在拼接线处的过渡更为平滑,并且能够较好的保留第一区域和第二区域融合后的地表特征,使得拼接线处的过渡更具有真实性。
在得到第一目标拼接区域后,可以替换原有的第一区域和第二区域,以完成对区域A和区域B的拼接。示例性的,参加图9所示,为本公开实施例提供的一种对目标地形区域中的多个区域进行拼接后的示意图,相较于对图2中示出的区域A和区域B直接进行拼接的方式而言,拼接时的拼接处过渡平滑,并不存在较为明显的凹凸变化,同时也能较好的保留在第一区域和第二区域中的地表特征,更具有真实性。
在本公开另一实施例中,还提供了一种对目标地形区域中的多个区域进行拼接,以得到目标地形区域的完整的第三目标拼接区域的具体实施例。在该实施例中,目标地形区域中包括多个区域,相邻的两个区域(下述称为第一目标区域和第二目标区域)可以作为一组待拼接区域对。示例性的,上述说明的区域A和区域B可以作为此处说明的第一目标区域和第二目标区域。
在具体实施中,针对所述至少一组待拼接区域对中的每组待拼接区域对,可以对该组待拼接区域对中的第一目标区域和所述第二目标区域进行拼接处理,得到该组待拼接区域对相应的第二目标拼接区域;然后,基于所述至少一组待拼接区域对分别对应的第二目标拼接区域,确定所述目标地形区域对应的第三目标拼接区域。
其中,在对第一目标区域和第二目标区域进行拼接处理时,可以采用上述说明的对区域A和区域B进行拼接的方式进行,在此不再重复赘述。由于对于在目标地形区域中的每组待拼接区域对,均可以确定对应的第二目标拼接区域,因此利用没组待拼接区域对分别对应的第二目标拼接区域,可以得到与完整的目标地形区域对应的第三目标拼接区域。
这样,根据上述实施例中的说明可以知道,在对第一目标区域和第二目标区域进行拼接处理后得到的第二目标拼接区域,可以在拼接线处具有较为平滑的过渡,且能够表征第一目标区域和第二目标区域分别对应的地表特征,因此得到的完整的目标地形区域对应的第三目标拼接区域也能够更加具有真实性。
在本公开另一实施例中,针对得到的第三目标拼接区域,还可以基于所述第三目标拼接区域对应的区域模型信息,渲染显示所述第三目标拼接区域。其中,拼接得到第三目标拼接区域的同时,例如也包括了对其中的各目标区域对应的区域模型信息的调整,因此第三目标拼接区域对应的区域模型信息也能够在渲染后反应出目标地形区域下过渡自然的地形特征,使得渲染后的包含第三目标拼接区域的画面更具有真实感。
本公开提供的一种地形区域的拼接方法、装置、计算机设备及存储介质,在对目标地形区域中的第一区域和第二区域进行拼接时,通过预拼接处理,可以得到包含拼接线的原始拼接区域。由于对区域进行分频处理,可以在得到的高频区域中确定区域的地形特征,因此在为原始拼接区域保留拼接线处的地形特征时,具体获取了可以表征拼接线对应的地表特征的第二高频地形数据,并利用对原始拼接区域进行分频处理后的第一高频地形数据
进行插值处理,得到在拼接线位置处可以表征对应地表特征的目标高频地形数据,从而得到第一区域和第二区域拼接后的第一目标拼接区域。这样,在将原始拼接区域的低频地形数据和上述目标高频数据拼接后得到的第一目标拼接区域能够较好的对第一区域和第二区域的不同地形特征进行过渡衔接,从而使得拼接后得到的第一目标拼接区域更加真实自然。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
基于同一发明构思,本公开实施例中还提供了与地形区域的拼接方法对应的地形区域的拼接装置,由于本公开实施例中的装置解决问题的原理与本公开实施例上述地形区域的拼接方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。
参照图10所示,为本公开实施例提供的一种地形区域的拼接装置的示意图,应用于对目标场景的渲染显示;所述目标场景中包括至少一个待显示的虚拟对象;所述装置包括:第一处理模块11、第二处理模块12、第三处理模块13、以及第四处理模块14;其中,
第一处理模块11,用于对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;
第二处理模块12,用于对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;
第三处理模块13,用于获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;
第四处理模块14,用于将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
一种可选的实施方式中,所述第一处理模块11在对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域时,用于:基于所述第一区域的第一边界信息、以及所述第二区域的第二边界信息,确定拼接所述第一区域和所述第二区域的拼接线;所述第一边界信息包括所述第一区域的第一边界上各个第一像素点对应的第一高度值,所述第二边界信息包括所述第二区域的第二边界上各个第二像素点对应的第二高度值;基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
一种可选的实施方式中,所述第一处理模块11在基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域时,用于:针对所述第一像素点以及所述第二像素点中的任一像素点,基于该像素点与所述各个第三像素点之间的距离信息,确定该像素点对应的目标第三像素点;基于该像素点与对应的目标第三像素点之间的距离信息,确定对该像素点进行映射处理时对应的映射系数;所述映射系数用于确定所述目标第三像素点对应的高度值对该像素点进行映射处理时的影响程度;基于所述拼接线上各个第三像素点对应的高度值、以及所述第一像素点以及所述第二像素点分别对应的映射系数,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
一种可选的实施方式中,所述第三处理模块13在获取表征所述拼接线对应的地表特征的第二高频地形数据时,用于:确定与所述第一区域的地表特征一致的第三区域、以及与所述第二区域的地表特征一致的第四区域;对所述第三区域进行分频处理得到第三高频地形数据,并对所述第四区域进行分频处理得到第四高频地形数据;对所述第三高频地形数据以及所述第四高频地形数据中对应相同像素点的高频数据进行交叉映射处理,得到所述第二高频地形数据。
一种可选的实施方式中,所述第三处理模块13在对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据时,用于:对所述第一高频地形数据和所述第二高频地形数据进行数据对齐处理,并确定所述拼接线上各个第三像素点在所述第一高频地形数据和所述第二高频地形数据上分别对应的子高频地形数据;以所述子高频地形数据作为所述插值处理的基准数据,对数据对齐处理后的所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到所述目标高频地形数据。
一种可选的实施方式中,所述拼接装置还包括,第五处理模块15,用于:响应于所述目标地形区域包括多个区域,从所述多个区域中确定至少一组待拼接区域对;所述待拼接区域对中包括相邻的第一目标区域和第二目标区域;针对所述至少一组待拼接区域对中的每组待拼接区域对,对该组待拼接区域对中的第一目标区域和所述第二目标区域进行拼接处理,得到该组待拼接区域对相应的第二目标拼接区域;基于所述至少一组待拼接区域对分别对应的第二目标拼接区域,确定所述目标地形区域对应的第三目标拼接区域。
一种可选的实施方式中,所述第五处理模块15还用于:基于所述第三目标拼接区域对应的区域模型信息,渲染显示所述第三目标拼接区域。
关于装置中的各模块的处理流程、以及各模块之间的交互流程的描述可以参照上述方法实施例中的相关说明,这里不再详述。
本公开实施例还提供了一种计算机设备,如图11所示,为本公开实施例提供的计算机设备结构示意图,包括:
处理器10和存储器20;所述存储器20存储有处理器10可执行的机器可读指令,处理器10用于执行存储器20中存储的机器可读指令,所述机器可读指令被处理器10执行时,处理器10执行下述步骤:
对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
上述存储器20包括内存210和外部存储器220;这里的内存210也称内存储器,用于暂时存放处理器10中的运算数据,以及与硬盘等外部存储器220交换的数据,处理器10通过内存210与外部存储器220进行数据交换。
上述指令的具体执行过程可以参考本公开实施例中所述的地形区域的拼接方法的步骤,此处不再赘述。
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的地形区域的拼接方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。
本公开实施例还提供一种计算机程序产品,该计算机程序产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的地形区域的拼接方法的步骤,具体可参见上述方法实施例,在此不再赘述。
其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上所述实施例,仅为本公开的具体实施方式,用以说明本公开的技术方案,而非对其限制,本公开的保护范围并不局限于此,尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本公开实施例技术方案的精神和范围,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应所述以权利要求的保护范围为准。
Claims (11)
- 一种地形区域的拼接方法,其特征在于,应用于对目标地形区域中第一区域和第二区域的拼接;所述拼接方法包括:对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
- 根据权利要求1所述的方法,其特征在于,所述对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域,包括:基于所述第一区域的第一边界信息、以及所述第二区域的第二边界信息,确定拼接所述第一区域和所述第二区域的拼接线;所述第一边界信息包括所述第一区域的第一边界上各个第一像素点对应的第一高度值,所述第二边界信息包括所述第二区域的第二边界上各个第二像素点对应的第二高度值;基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
- 根据权利要求2所述的方法,其特征在于,所述基于所述拼接线上各个第三像素点对应的高度值,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域,包括:基于第四像素点与所述各个第三像素点之间的距离信息,确定所述第四像素点对应的目标第三像素点,所述第四像素点为所述第一像素点以及所述第二像素点中的任一像素点;基于所述第四像素点与对应的目标第三像素点之间的距离信息,确定对所述第四像素点进行映射处理时对应的映射系数;所述映射系数用于确定所述目标第三像素点对应的高度值对所述第四像素点进行映射处理时的影响程度;基于所述拼接线上各个第三像素点对应的高度值、以及所述第一像素点以及所述第二像素点分别对应的映射系数,对所述第一像素点以及所述第二像素点分别进行映射处理,得到包含所述拼接线的原始拼接区域。
- 根据权利要求1所述的方法,其特征在于,所述获取表征所述拼接线对应的地表特征的第二高频地形数据,包括:确定与所述第一区域的地表特征一致的第三区域、以及与所述第二区域的地表特征一致的第四区域;对所述第三区域进行分频处理得到第三高频地形数据,并对所述第四区域进行分频处理得到第四高频地形数据;对所述第三高频地形数据以及所述第四高频地形数据中对应相同像素点的高频数据进行交叉映射处理,得到所述第二高频地形数据。
- 根据权利要求1所述的方法,其特征在于,所述对所述第一高频地形数据和所述第 二高频地形数据进行插值处理,得到目标高频地形数据,包括:对所述第一高频地形数据和所述第二高频地形数据进行数据对齐处理,并确定所述拼接线上各个第三像素点在所述第一高频地形数据和所述第二高频地形数据上分别对应的子高频地形数据;以所述子高频地形数据作为所述插值处理的基准数据,对数据对齐处理后的所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到所述目标高频地形数据。
- 根据权利要求1所述的方法,其特征在于,还包括:响应于所述目标地形区域包括多个区域,从所述多个区域中确定至少一组待拼接区域对;所述待拼接区域对中包括相邻的第一目标区域和第二目标区域;针对所述至少一组待拼接区域对中的每组待拼接区域对,对该组待拼接区域对中的第一目标区域和所述第二目标区域进行拼接处理,得到该组待拼接区域对相应的第二目标拼接区域;基于所述至少一组待拼接区域对分别对应的第二目标拼接区域,确定所述目标地形区域对应的第三目标拼接区域。
- 根据权利要求6所述的方法,其特征在于,还包括:基于所述第三目标拼接区域对应的区域模型信息,渲染显示所述第三目标拼接区域。
- 一种地形区域的拼接装置,其特征在于,应用于对目标地形区域中第一区域和第二区域的拼接;所述地形区域的拼接装置包括:第一处理模块,用于对所述第一区域和所述第二区域进行预拼接处理,得到包含拼接线的原始拼接区域;第二处理模块,用于对所述原始拼接区域进行分频处理,得到表征所述原始拼接区域的高度变化特征的低频地形数据、以及表征所述原始拼接区域的当前地表特征的第一高频地形数据;第三处理模块,用于获取表征所述拼接线对应的地表特征的第二高频地形数据,并对所述第一高频地形数据和所述第二高频地形数据进行插值处理,得到目标高频地形数据;第四处理模块,用于将所述低频地形数据与所述目标高频地形数据进行融合,得到对所述第一区域和所述第二区域进行拼接后的第一目标拼接区域。
- 一种计算机设备,其特征在于,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,所述处理器用于执行所述存储器中存储的机器可读指令,所述机器可读指令被所述处理器执行时,所述处理器执行如权利要求1至7任一项所述的地形区域的拼接方法的步骤。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被计算机设备运行时,所述计算机设备执行如权利要求1至7任一项所述的地形区域的拼接方法的步骤。
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序或指令,所述计算机程序或所述指令被处理器执行时实现如权利要求1至7任一项所述的地形区域的拼接方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210190700.6A CN114565545B (zh) | 2022-02-28 | 2022-02-28 | 一种地形区域的拼接方法、装置、计算机设备及存储介质 |
| CN202210190700.6 | 2022-02-28 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023160487A1 true WO2023160487A1 (zh) | 2023-08-31 |
Family
ID=81715097
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/077070 Ceased WO2023160487A1 (zh) | 2022-02-28 | 2023-02-20 | 一种地形区域的拼接方法、装置、计算机设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN114565545B (zh) |
| WO (1) | WO2023160487A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118982485A (zh) * | 2024-10-21 | 2024-11-19 | 国网四川省电力公司电力应急中心 | 一种电网抢修恢复管理系统 |
| CN119860722A (zh) * | 2024-12-24 | 2025-04-22 | 武汉中观自动化科技有限公司 | 三维扫描方法、装置、电子设备及存储介质 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114565545B (zh) * | 2022-02-28 | 2025-12-16 | 北京字跳网络技术有限公司 | 一种地形区域的拼接方法、装置、计算机设备及存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150243074A1 (en) * | 2013-07-08 | 2015-08-27 | The Second Institute Of Oceanography, Soa | Submarine topography construction method based on multi-source water depth data integration |
| CN112084280A (zh) * | 2020-09-04 | 2020-12-15 | 广州南方智能技术有限公司 | 一种多尺度地形的裁剪及拼接方法 |
| CN113744401A (zh) * | 2021-09-09 | 2021-12-03 | 网易(杭州)网络有限公司 | 一种地形拼接方法、装置、电子设备和存储介质 |
| CN114565545A (zh) * | 2022-02-28 | 2022-05-31 | 北京字跳网络技术有限公司 | 一种地形区域的拼接方法、装置、计算机设备及存储介质 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105701771A (zh) * | 2016-03-17 | 2016-06-22 | 江苏科技大学 | 一种基于射频识别锚点的数字地图拼接方法 |
| CN111185009B (zh) * | 2020-01-02 | 2021-03-26 | 腾讯科技(深圳)有限公司 | 地图生成方法和装置 |
| CN113077387B (zh) * | 2021-04-14 | 2023-06-27 | 杭州海康威视数字技术股份有限公司 | 一种图像处理方法及装置 |
-
2022
- 2022-02-28 CN CN202210190700.6A patent/CN114565545B/zh active Active
-
2023
- 2023-02-20 WO PCT/CN2023/077070 patent/WO2023160487A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150243074A1 (en) * | 2013-07-08 | 2015-08-27 | The Second Institute Of Oceanography, Soa | Submarine topography construction method based on multi-source water depth data integration |
| CN112084280A (zh) * | 2020-09-04 | 2020-12-15 | 广州南方智能技术有限公司 | 一种多尺度地形的裁剪及拼接方法 |
| CN113744401A (zh) * | 2021-09-09 | 2021-12-03 | 网易(杭州)网络有限公司 | 一种地形拼接方法、装置、电子设备和存储介质 |
| CN114565545A (zh) * | 2022-02-28 | 2022-05-31 | 北京字跳网络技术有限公司 | 一种地形区域的拼接方法、装置、计算机设备及存储介质 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118982485A (zh) * | 2024-10-21 | 2024-11-19 | 国网四川省电力公司电力应急中心 | 一种电网抢修恢复管理系统 |
| CN119860722A (zh) * | 2024-12-24 | 2025-04-22 | 武汉中观自动化科技有限公司 | 三维扫描方法、装置、电子设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114565545B (zh) | 2025-12-16 |
| CN114565545A (zh) | 2022-05-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023160487A1 (zh) | 一种地形区域的拼接方法、装置、计算机设备及存储介质 | |
| JP7387029B2 (ja) | ソフトレイヤ化および深度認識インペインティングを用いた単画像3d写真技術 | |
| CN110084874B (zh) | 对于三维模型的图像风格迁移 | |
| CN101729791B (zh) | 图像处理设备和方法 | |
| US20130136337A1 (en) | Methods and Apparatus for Coherent Manipulation and Stylization of Stereoscopic Images | |
| JP2023029984A (ja) | 仮想イメージを生成するための方法、装置、電子機器及び可読記憶媒体 | |
| CN114066715B (zh) | 图像风格迁移方法、装置、电子设备以及存储介质 | |
| CN114119848B (zh) | 一种模型渲染方法、装置、计算机设备及存储介质 | |
| JP7585573B2 (ja) | ランドスケープ仮想画面の表示方法及び装置並びに電子装置及びコンピュータプログラム | |
| US20240193846A1 (en) | Scene rendering method, electronic device, and non-transitory readable storage medium | |
| CN105894570A (zh) | 虚拟现实场景模型建立方法及装置 | |
| CN110659385B (zh) | 一种多路视频与三维gis场景的融合方法 | |
| CN112907451A (zh) | 图像处理方法、装置、计算机设备和存储介质 | |
| CN114429511A (zh) | 融合渲染方法、装置、计算机设备和存储介质 | |
| WO2025050831A1 (zh) | 建筑群渲染方法、装置、计算机设备和存储介质 | |
| BR112021015772A2 (pt) | Método para gerar uma imagem de intensidade de luz, aparelho para gerar uma imagem de intensidade de luz e produto de programa de computador | |
| CN110689609B (zh) | 图像处理方法、装置、电子设备及存储介质 | |
| CN112085855B (zh) | 交互式图像编辑方法、装置、存储介质及计算机设备 | |
| JP3629243B2 (ja) | モデリング時の距離成分を用いてレンダリング陰影処理を行う画像処理装置とその方法 | |
| CN113763558B (zh) | 一种信息处理方法及装置、设备、存储介质 | |
| CN114565546A (zh) | 一种地形区域的拼接方法、装置、计算机设备及存储介质 | |
| CN116193050B (zh) | 一种图像处理方法、装置、设备及存储介质 | |
| CN117456076A (zh) | 一种材质贴图生成方法及相关设备 | |
| CN117459694A (zh) | 图像生成方法、装置、电子设备及存储介质 | |
| US20060250389A1 (en) | Method for creating virtual reality from real three-dimensional environment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23759112 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.11.2024) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23759112 Country of ref document: EP Kind code of ref document: A1 |