Amphibious three-dimensional model seam color transition method based on surface element Poisson fusion
By constructing the water-land boundary line and buffer zone using the Poisson fusion method of surface primitives and establishing a guided gradient field, a natural color transition of the water-land 3D model is achieved, which solves the problem of poor color transition quality in the existing technology and improves the visual effect of the integrated water-land 3D scene.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGJIANG WATERWAY SURVEY CENT
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-28
AI Technical Summary
Existing color transition methods for 3D water and land models in the seam area are difficult to adapt to irregular 3D mesh structures and cannot establish stable global constraint relationships, resulting in poor color transition quality and affecting the visual consistency and overall effect of the integrated water and land 3D scene.
A Poisson fusion method based on surface primitives is adopted. By constructing a water-land boundary line, expanding the surface primitive buffer, and establishing a guided gradient field and Poisson fusion model within the buffer, a natural transition from pseudo-color texture of water area to real image texture of land area is achieved.
It improves the color transition quality in large-scale water-land seam areas, enhances visual continuity and realism, avoids color back diffusion and texture blurring, and improves the overall blending effect.
Smart Images

Figure CN121937686A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, specifically to a method for color transition of seams in 3D water and land models based on Poisson fusion of surface primitives. Background Technology
[0002] With the continuous development of the construction of real-scene 3D China, digital twins and smart waterways, the application of integrated land and water scenarios has received widespread attention. Land 3D models are usually constructed through methods such as oblique photogrammetry and have real image textures, which can realistically reflect the color distribution and texture details of the land surface. In contrast, water 3D models are usually constructed through underwater multibeam data and often use pseudo-color methods based on water depth or attribute values, or are expressed only in the form of white film. The two have significant differences in texture source, color composition and scale characteristics.
[0003] When 3D models of water and land are geometrically merged in the same space, the aforementioned differences often manifest themselves in the seam areas, easily leading to noticeable color abruptness, texture breaks, and unnatural visual transitions. This severely impacts the overall visual consistency and application effectiveness of the integrated water-land 3D scene. Existing color fusion methods are mostly based on pixel-level processing, achieving color transitions through simple pixel blending or local weighting. These methods struggle to adapt to irregular 3D mesh structures and cannot establish stable global constraints within the 3D surface mesh and texture coordinate system. In particular, they are difficult to coordinate the overall texture structure at the triangular face primitive level, thus failing to effectively improve the color transition quality in large-scale water-land seam areas.
[0004] Therefore, there is an urgent need for a color transition method for seams in 3D water and land models based on Poisson fusion of surface primitives. Summary of the Invention
[0005] This application provides a color transition method for the seams of 3D water and land models based on Poisson fusion of surface primitives, which can effectively improve the color transition quality of large-scale water and land seam areas.
[0006] The first aspect of this application provides a method for color transition at the seam of a three-dimensional water-land model based on Poisson fusion of surface primitives. The method includes: after geometric fusion of a three-dimensional water model and a three-dimensional land model, constructing a pseudo-color texture for the water area based on the water depth information corresponding to each triangular surface primitive in the water area model, and obtaining a real image texture for the land area based on the real image texture already bound in the land area model; performing unified topology analysis on the triangular meshes of the water area model and the land area model to identify the spatial contact positions of simultaneously adjacent surface primitives of the water area and the land area, and extracting the spatial contact positions as a water-land boundary line, which is used to define the spatial range where the water area texture and the land area texture undergo color transition; around the water-land boundary line, according to the adjacency relationship of the surface primitives in the triangular mesh, extending a preset number of triangular surface primitives to the water area side and the land area side respectively, constructing a surface primitive buffer covering the water-land seam area, and determining the water area and the land area outside the surface primitive buffer as boundary areas with fixed colors; for each triangular surface primitive within the surface primitive buffer, according to its region... The system constructs local color change constraints, where the water side primitives adopt the local color change relationship of the water pseudo-color texture, and the land side primitives adopt the local color change relationship of the land real image texture. A guiding gradient field is constructed within the surface primitive buffer, pointing from the land side to the water side. This guiding gradient field defines the spatial transition direction of color changes within the surface primitive buffer. Triangular surface primitives are used as the basic units for color solving. A Poisson fusion model based on surface primitive topological relationships is established within the surface primitive buffer, using the guiding gradient field as a color change constraint. Simultaneously, the water pseudo-color texture and the land real image texture are used as boundary color constraints for the Poisson fusion model. Under the constraints of the Poisson fusion model, a unified solution is performed on the surface primitive colors within the surface primitive buffer to obtain target surface primitive colors that satisfy the boundary color constraints and whose color changes are consistent with the guiding gradient field. These target surface primitive colors enable the water pseudo-color texture to achieve a seam color transition along the guiding gradient field towards the land real image texture within the surface primitive buffer.
[0007] A second aspect of this application provides a color transition device for the seam between three-dimensional water and land models based on Poisson fusion of surface primitives. The device includes an acquisition module and a processing module. The acquisition module is used to construct a pseudo-color texture for the water area based on the water depth information corresponding to each triangular surface primitive in the water area model after geometric fusion of the water area and land areas, and to acquire a real image texture for the land area based on the real image texture already bound in the land area model. The processing module is used to perform unified topology analysis on the triangular meshes of the water area and land areas models to identify simultaneously adjacent water... The processing module identifies the spatial contact position between the domain surface primitive and the land surface primitive, extracting this position as a water-land boundary line. This boundary line defines the spatial range where the water texture and the land texture undergo color transition. The processing module further expands a preset number of triangular surface primitives around the boundary line, based on the adjacency relationship of the surface primitives in the triangular mesh, towards both the water and land sides, constructing a surface primitive buffer zone covering the water-land seam area. The water and land areas outside the surface primitive buffer zone are defined as color-fixed boundary areas. The processing module also targets the area within the surface primitive buffer zone... Each triangular facet primitive is constrained to a local color change based on its region attributes. Specifically, the water-side primitive uses the local color change relationship of the water pseudo-color texture, while the land-side primitive uses the local color change relationship of the land real image texture. A guiding gradient field is constructed within the facet primitive buffer, pointing from the land side to the water side. This guiding gradient field defines the spatial transition direction of color changes within the facet primitive buffer. The processing module also uses triangular facet primitives as the basic unit for color solving, establishing a Poisson fusion model based on the topological relationships of the facet primitives within the facet primitive buffer. The guiding gradient field is used as a color change constraint, and the pseudo-color texture of the water area and the real land image texture are used as boundary color constraints of the Poisson fusion model, respectively. The processing module is also used to perform a unified solution on the surface primitive colors in the surface primitive buffer under the constraints of the Poisson fusion model to obtain a target surface primitive color that satisfies the boundary color constraints and whose color change is consistent with the guiding gradient field. This target surface primitive color is used to make the pseudo-color texture of the water area transition along the guiding gradient field towards the real land image texture in the surface primitive buffer.
[0008] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, and both the user interface and the network interface are used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method described above.
[0009] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing instructions that, when executed, perform the method described above.
[0010] In summary, one or more technical solutions provided in this application have at least the following technical effects or advantages: By introducing pseudo-color textures of water areas and real image textures of land areas as two distinct color sources, and accurately extracting the water-land boundary line based on unified topological analysis, the spatial range of color transition is strictly limited. This avoids invalid calculations and visual distortions caused by excessively large or small color fusion ranges, ensuring that color transitions only occur in the real water-land interface area, thus enhancing the spatial rationality of the fusion result. By constructing a surface primitive buffer zone around the water-land boundary line and clearly distinguishing the areas inside and outside the buffer zone as the solution domain and boundary region, the color solution process has a clear solution domain and stable boundary conditions in structure. This allows for sufficient color coordination within the buffer zone while maintaining the original texture features of the water and land areas, thus achieving a good balance between local transitions and overall consistency. Within the surface primitive buffer, local color change constraints are constructed for both water-side primitives and land-side primitives. Furthermore, a guiding gradient field is constructed pointing from the land side to the water side, subjecting color changes to dual constraints of local texture continuity and overall spatial directionality. This effectively avoids problems such as color back-diffusion, texture blurring, or feature loss that are common in traditional smoothing methods, ensuring that the pseudo-color gradient characteristics of the water area and the texture details of the real land image are reasonably inherited during the transition. By establishing a Poisson fusion model based on the topological relationship of surface primitives within the surface primitive buffer and integrating guiding gradient constraints and boundary color constraints in the unified solution process, the color changes in the seam area are coordinated in a globally optimal manner, avoiding the color fragmentation caused by simple local blending. This achieves a natural transition effect where the pseudo-color texture of the water area gradually conforms to the real land image texture along the guiding gradient field, significantly improving the visual continuity, realism, and overall fusion quality of the seam area in large-scale integrated water and land 3D scenes. Attached Figure Description
[0011] Figure 1 A flowchart illustrating the color transition method for seams in a 3D land and water model based on Poisson fusion of surface primitives, provided in an embodiment of this application. Figure 2 A schematic diagram of a color transition device for seams in a 3D land and water model based on Poisson fusion of surface primitives, provided in an embodiment of this application. Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0012] Explanation of reference numerals in the attached figures: 21. Acquisition module; 22. Processing module; 31. Processor; 32. Communication bus; 33. User interface; 34. Network interface; 35. Memory. Detailed Implementation
[0013] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0014] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0015] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0016] To address the aforementioned technical problems, this application provides a color transition method for seams in 3D water and land models based on Poisson fusion of surface primitives, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a method for color transition at seams in a 3D land and water model based on Poisson fusion of surface primitives, provided in an embodiment of this application. The method is applied to a server and includes steps S110 to S160, as follows:
[0017] S110. After the three-dimensional water area model and the three-dimensional land area model are geometrically fused, a pseudo-color texture of the water area is constructed based on the water depth information corresponding to each triangular face primitive in the three-dimensional water area model, and the real image texture of the land area is obtained based on the real image texture that has been bound in the three-dimensional land area model.
[0018] Specifically, "server" does not refer to a single device or software, but rather to a computing platform that undertakes core computing and service functions in the aforementioned color transition process. Its specific implementation can be a physical server, a virtual server, or a cloud server. As the core computing unit integrating data management, topology analysis, texture processing, and global color solving capabilities, the server completes key computational processes on the server side, achieving high-quality seam color transitions between the pseudo-color texture of water areas and the realistic image texture of land areas at the 3D surface primitive level, and supporting the stable generation and application of large-scale integrated water and land 3D scenes.
[0019] After the server completes the geometric fusion of the water area 3D model and the land area 3D model, it first ensures that the two types of models are in the same spatial coordinate system and the same topology analysis framework. The water area 3D model refers to the triangular mesh model reconstructed from underwater sounding points, cross sections, or grids. The water area triangular facet primitive refers to a single triangular facet in the water area triangular mesh. The water depth information refers to the depth numerical attribute associated with the water area triangular facet primitive. The land area 3D model refers to the triangular mesh model reconstructed from oblique photogrammetry or multi-view images and bound to real image textures. The real image texture refers to the color information written into the model texture image after the external image is projected and textured. The texture coordinate relationship refers to the coordinate correspondence of the vertices of each land area triangular facet primitive in the two-dimensional texture space. It is used to establish a consistent mapping between the 3D surface position and the texture image pixel position, thereby providing a unified data organization premise for the subsequent construction of water area pseudo-color texture and acquisition of land area real image texture.
[0020] When traversing the water area triangular facet primitives in the 3D water area model and establishing a one-to-one mapping relationship between each water area triangular facet primitive and its corresponding water depth information, the face index of the water area triangular mesh is first used as the primary key. The three vertex indices constituting each water area triangular facet primitive are then read, and water depth information is extracted from either the vertex attribute table or the face attribute table. When water depth information is stored in the vertex attribute table, the water depth information of the same water area triangular facet primitive is defined as the aggregate value of its three vertex water depth information, thus ensuring that the water depth information is unique at the face level and can be stably used for color mapping. When the water depth... When information is stored in the surface attribute table, the water depth information corresponding to the triangular facet primitive of the water area is directly read as the surface-level water depth information. Then, using the surface-level water depth information as the sole basis, color mapping processing is performed on the triangular facet primitive of the water area, so that the pseudo-color texture of the water area transitions continuously with changes in water depth. To ensure consistency in the pseudo-color representation across different survey areas and water depth ranges, the surface-level water depth information is first normalized to obtain a normalized depth. Then, the normalized depth is mapped to a preset pseudo-color mapping table to obtain the color value of the water area's pseudo-color texture. The expression for the normalized depth is:
[0021] in, Indicates the normalization depth, with a value ranging from 0 to 1; This represents the surface-level water depth information corresponding to the triangular facet primitive of the current water area, and the value is given by the depth sounding data or underwater topographic data; This represents the minimum water depth value within the current 3D model of the water area or the current processing zone. The value is obtained by finding the minimum value of all surface-level water depth information. This represents the maximum water depth value within the current 3D model of the water area or the current processing zone. The value is obtained by finding the maximum value of all surface-level water depth information. This represents a truncation function that limits the normalization result to between 0 and 1, preventing abnormal water depths from causing the color to go out of bounds; then... Input a preset pseudo-color mapping table and obtain color values using linear interpolation. When the preset pseudo-color mapping table consists of several control points... When it is constructed, if Then the color interpolation expression is:
[0022] in, Indicates the normalization depth as The pseudo-color vector at that time; and This represents the scalar position of two adjacent depth control points, with a value ranging from 0 to 1 and satisfying an increasing condition. and This represents the color vector corresponding to the control point. The color vector can be stored in three-channel or four-channel format; linear interpolation is used to ensure continuous color change between adjacent depth intervals; the obtained... The texture image written to the water area pseudo-color texture is determined by the texture coordinate relationship of the water area triangle primitive or directly bound to the face-level color cache by the patch shading method, thereby forming a water area pseudo-color texture that transitions continuously with water depth. The water area pseudo-color texture is determined as the water area side color reference to provide stable water area color constraints in subsequent seam color transitions.
[0023] When acquiring the real image texture of the land area based on the real image texture that has been bound to the modeling stage through image projection and texture mapping in the 3D land area model, the texture data organization structure of the 3D land area model is first analyzed, and the texture image file associated with the land area triangular mesh and the material binding relationship are read. The texture image file refers to the two-dimensional image data that stores the colors of the real image, and the material binding relationship refers to the reference relationship between the land area triangular face primitive and the specific texture image. Then, the texture coordinate relationship of the 3D land area model is analyzed. The texture coordinate relationship is specifically represented by the three vertices of each land area triangular face primitive carrying two-dimensional texture coordinates. ,in and Used to locate the corresponding pixel position on the texture image; when it is necessary to obtain the land area real image texture corresponding one-to-one with each land area triangular face primitive, the texture coordinates of the three vertices of each land area triangular face primitive are read, and sampling is performed in the texture image according to the texture coordinates. The sampling position is obtained by converting the texture coordinates and the texture image resolution. The conversion expression is:
[0024] in, and Represents continuous coordinate positions in a texture image; and The texture coordinate components represent the vertices of the land triangular face primitives, with values ranging from 0 to 1; This represents the width of the texture image in pixels, and its value is given by the texture image metadata. This represents the height of the texture image in pixels, and its value is given by the texture image metadata; when and When using continuous coordinates, to avoid jagged edges and sampling jumps, bilinear interpolation is used to obtain color values from the texture image, and the interpolated color values are used as the sampling results of the land area real image texture. Furthermore, to achieve a one-to-one correspondence with each land area triangular face primitive, the texture image index of the land area triangular face primitive, the texture coordinates of the three vertices, and the sampled color distribution fragments are encapsulated together as a face-level texture record. This allows each land area triangular face primitive to stably reference its real image color information through this face-level texture record, and the land area real image texture is determined as the land area side color reference for the subsequent construction of boundary color constraints and guided gradient constraints of the face primitive buffer, thereby ensuring that the seam color transition fits the details and tones of the land area real image texture.
[0025] S120. Perform unified topology analysis on the triangular meshes of the water area 3D model and the land area 3D model to identify the spatial contact positions of adjacent water area surface primitives and land area surface primitives, and extract the spatial contact positions as water-land boundary lines. The water-land boundary lines are used to define the spatial range in which the water area texture and the land area texture undergo color transition.
[0026] Specifically, when traversing both water and land triangular face primitives within the same triangular mesh topology space, the geometrically merged 3D water and land models are first encapsulated into a single mesh object. This ensures that any triangular face primitive can be accessed through a unified face index. A region attribute identifier is written for each triangular face primitive to distinguish it from the land face primitive. The triangular mesh topology space refers to a queryable structure composed of vertex sets, edge sets, face sets, and their relationships. The region attribute identifier refers to a discrete label bound to the triangular face primitive. To prevent false contacts from being introduced at the fusion boundary due to local misclassification, neighborhood consistency correction is performed on the region attribute identifier during the traversal phase. This ensures that the region attribute identifier of each triangular face primitive is consistent with the majority in its face neighborhood, thereby reducing false detections of candidate spatial contact positions caused by isolated noise faces. The expression is as follows:
[0027] in, Indicates the corrected number Regional attribute identifiers for triangular face primitives; This represents the set of possible values for the regional attribute identifier, including both water and land areas. Indicates the first The set of adjacent face primitives of a triangular face primitive, whose construction depends on shared edge relationships; Indicates the first The geometric center coordinate vector of a triangular face primitive is obtained by averaging the coordinates of the three vertices of the face. This represents a geometric scale parameter, the value of which is determined by a multiple of the average side length of the grid, and is used to control the rate at which the neighborhood weight decays with distance. The function is an indicator function that takes the value 1 if the condition is true and 0 otherwise. This formula makes the regional attribute identifiers more continuous in space through distance-weighted neighborhood voting, and avoids individual face primitive labels from disrupting the consistency of subsequent contact edge extraction.
[0028] When constructing the adjacency table of face primitives based on the topology of triangular meshes, the face-edge associations of the mesh are transformed into a sparse structure that can be quickly queried to determine the set of adjacent face primitives corresponding to each triangular face primitive. The face primitive adjacency table refers to the set of indices recording the adjacent faces of shared edges for each triangular face primitive. To simultaneously consider both manifold and non-manifold edge scenarios, an edge-face association matrix can be constructed first, and then the face-face adjacency matrix can be derived from the edge-face association matrix, thus uniformly describing face adjacency under any topology. Its expression is:
[0029] in, Represents a face-to-face adjacency matrix. Indicates the first The and the first Each triangular primitive shares at least one edge; Represents the edge-face incidence matrix, matrix elements Indicates the first Does each grid edge belong to the first Each triangular facet primitive can take values of 0 or 1, or a value that is used when it is necessary to distinguish directions. ; This represents a diagonal matrix formed by taking the diagonal elements of a matrix; this formula induces adjacency relationships in the face space through edge-face association, and can provide a set of primitives for subsequent adjacent faces within a unified framework. It provides a fast query foundation and avoids the high overhead caused by repeatedly traversing the edge set.
[0030] When detecting the region attributes of adjacent face primitives for each triangular face primitive based on the face primitive adjacency table and region attribute identifier, for any face primitive associated with a shared edge... ,when Furthermore, when corresponding to water surface primitives and land surface primitives respectively, the common edge shared by the two is determined as the candidate spatial contact position. To enhance the robustness of the candidate spatial contact position to geometric fusion errors, boundary misalignment, and mesh density differences, a geometric consistency confidence score can be constructed for each candidate common edge, and the spatial position covered by the common edge is defined as the weighted fusion point between the endpoint and the geometric center of the adjacent surface, making the spatial features used in subsequent continuity analysis more stable. Its expression is as follows:
[0031] in, Indicates candidate common edge The spatial location vector covered; and Represents the three-dimensional coordinate vectors of the two endpoints of the common edge; and These represent the geometric center coordinate vectors of the water surface primitive and the land surface primitive adjacent to the common edge, respectively; and The value represents the weighting coefficient, which is positive and can be adaptively adjusted according to geometric consistency. This formula achieves weighted fusion between the midpoint of the endpoint and the midpoint of the surface center, so that the spatial position not only conforms to the geometry of the boundary line, but also smooths out the jitter caused by endpoint noise or local degenerate triangles.
[0032] When performing continuity analysis and aggregation processing on candidate spatial contact positions, all candidate common edges are constructed into a contact edge graph. Clustering and denoising are then performed on this graph to form a spatially continuous set of contact edges. Continuity analysis determines whether candidate common edges can form a long link in the sense of endpoint connection, while aggregation merges candidate common edges belonging to the same connected link into the same contact edge set. To simultaneously utilize the consistency of spatial position, direction, and normal to suppress isolated or duplicate candidate common edges, any two candidate common edges can be used. A similarity kernel is constructed and aggregation is performed based on it. If the similarity is lower than a threshold, it is considered discontinuous or noise. The expression is as follows:
[0033] in, Indicates candidate common edge and The similarity score ranges from 0 to 1. and The spatial location vectors representing the two candidate common edges can be obtained from the aforementioned weighted fusion points; The spatial location covariance matrix is obtained by statistical estimation of the spatial location of candidate common edges and is required to be invertible. It is used to adaptively normalize the errors in each direction. The unit tangent vector of the candidate common edge is obtained by normalizing the endpoint difference vector and takes the value of a three-dimensional unit vector. This represents the tangential scale parameter, the value of which is determined by the statistical or empirical proportion of tangential jitter of the candidate common edge. The direction-consistent normal vector corresponding to the candidate common edge can be obtained by weighted fusion and normalization of the normal vectors of adjacent face primitives, and its value is a three-dimensional unit vector; The normal scale parameter is determined by the tolerance of the normal angle. This formula encodes the Mahalanobis distance, tangential difference and normal consistency of spatial distance into a unified kernel function. Candidate common edges with high similarity are aggregated into the same contact edge set, while candidate common edges with low similarity and too small degree are identified as isolated noise and eliminated, thereby making the contact edge set more geometrically continuous and more directionally consistent.
[0034] When integrating the contact edge sets according to the geometric order of the triangular mesh to obtain the land-water boundary line, each contact edge set is regarded as one or more connected links. Candidate common edges in the links are then parametrically sorted to obtain a continuous sequence of endpoints or polygonal lines. The geometric order refers to the continuous arrangement from one end to the other along the boundary morphology. To obtain a stable order even with bifurcation, local missing edges, or uneven mesh density, a graph Laplacian can be constructed on the graph induced by the contact edge sets, and the one-dimensional embedding parameters can be solved to ensure the smoothest parameter variation on the graph. The parameter magnitude is then used as the sorting criterion, expressed as:
[0035] in, The graph Laplace matrix is represented by... constitute; The adjacency matrix represents the weighted adjacency matrix of the contact edge set. The above similarity can be used. Or its truncated version, with a value range from 0 to 1; Denotes the degree matrix, its diagonal elements ; This represents the scalar embedding parameter vector corresponding to each candidate common edge. The embedding parameters are used to characterize the relative position along the boundary line direction. This represents the generalized eigenvalue; the formula finds the smoothest one-dimensional change pattern on the weighted graph, so that adjacent and similar candidate common edges obtain similar parameter values, while disconnected or highly different candidate common edges obtain significantly different parameter values; non-trivial eigenvectors satisfying connectivity constraints are selected as... Then you can press Candidate common edges are sorted from smallest to largest, and the sorted endpoint sequences are concatenated to obtain the land-water boundary line, thus outputting continuous, stable and reproducible land-water boundary line results even under topological and geometric irregularities.
[0036] When using the land-water boundary line as the spatial reference position for the seam color transition between the pseudo-color texture of the water area and the real image texture of the land area, the land-water boundary line is written into the subsequent surface primitive buffer construction process as an expansion starting constraint. This ensures that the buffer expansion strictly revolves around both sides of the land-water boundary line. In the subsequent construction of the guided gradient field, the tangent and normal of the land-water boundary line are used to determine the consistency of the direction from the land side to the water side, so that the direction of color change is consistent with the boundary shape in space. At the same time, in the subsequent boundary color constraint settings, the color of the water boundary area outside the buffer on both sides of the land-water boundary line is fixed to the color state corresponding to the pseudo-color texture of the water area, and the color of the land boundary area outside the buffer on both sides of the land-water boundary line is fixed to the color state corresponding to the real image texture of the land area. This ensures that the spatial range, direction constraints, and boundary constraints of the color transition are all uniformly anchored to the land-water boundary line, thereby ensuring that the seam color transition only occurs within the surface primitive buffer and is consistent with the real spatial position of the land-water boundary line.
[0037] S130. Around the water-land boundary line, based on the adjacency relationship of the surface primitives of the triangular mesh, extend the triangular surface primitives of a preset number of layers to the water side and the land side respectively, construct a surface primitive buffer zone covering the water-land seam area, and define the water area and land area outside the surface primitive buffer zone as boundary areas with fixed colors respectively.
[0038] Specifically, when identifying directly adjacent triangular facet primitives using the land-water boundary line as the spatial starting constraint, the land-water boundary line is first represented as a set of boundary edges composed of contact edges. Then, the set of triangular facet primitives adjacent to each boundary edge is queried in the edge-to-face association structure of the triangular mesh. The boundary edge set refers to the set of all common edges identified as shared by water surface primitives and land surface primitives. The edge-to-face association structure refers to the data structure that maps each mesh edge to its adjacent triangular facet primitive index set. The region attribute identifier of the adjacent triangular facet primitives of each boundary edge is read, thereby... Triangular facet primitives adjacent to the boundary edge and identified as water area are merged into starting layer primitives on the water area side. Triangular facet primitives adjacent to the boundary edge and identified as land area are merged into starting layer primitives on the land area side. The merging results are deduplicated to ensure that each triangular facet primitive belongs to only one instance. When there are multiple branches on the boundary line or gaps in the boundary edge set, the boundary edge set is divided into connected components on the mesh topology. Starting layer primitives are extracted for each connected component to ensure that subsequent expansion always revolves around the real boundary shape and does not cross disconnected regions.
[0039] When expanding adjacent triangular facets layer by layer based on the initial layer primitives on the water side and the initial layer primitives on the land side, the facet adjacency table is used as the only expansion channel. During expansion, separate expansion queues are maintained on the water side and the land side, and a layer number mapping is established for each side to record the topological layer number of each triangular facet primitive included in the facet buffer from the initial layer. The topological direction refers to the direction of outward propagation along the facet adjacency table under the same regional attribute identifier constraint. To avoid inconsistencies in the spatial scale of layers due to local mesh density differences, a layer can be defined as a ring that satisfies that the cumulative edge weight distance does not exceed a threshold. A joint constraint of edge weight distance and layer number is introduced during expansion, so that the expansion is limited by both the preset number of layers and the spatial scale. The judgment expression of the joint constraint is:
[0040] in, Represents triangular face primitive Relative to the initial layer set The floor number; This represents the set of initial layer primitives on the water side or the land side, with values assigned to the water side and the land side respectively. This represents the candidate layer number, and its value is a positive integer. Represents the initial level primitive To the target surface primitive The topological path is composed of a sequence of adjacent face primitives; This represents the summation of all shared edges along the path; Indicates shared edges The edge weight distance can be determined by the shared edge length and the local curvature. This represents the single-layer spatial scale threshold, which is obtained through statistical analysis of the average grid edge length or the edge length near the boundary line. The meaning of this formula is to bind topology expansion to spatial scale using the shortest weighted path distance, making the buffer width corresponding to the preset number of layers spatially controllable. In actual inclusion, water-side expansion only occurs when the regional attribute of the candidate adjacent surface primitive is identified as water. When included, land-side expansion is only performed if the regional attribute of the candidate adjacent surface primitive is identified as land and When included, among which The preset number of layers is used to limit the maximum layer number for expansion; when non-manifold structures or hole boundaries exist, the parts of the candidate adjacency relationships with an abnormal number of shared adjacent faces are marked as non-expandable edges, and added to the path set. This type of edge is excluded to avoid expanding across incorrect connectivity.
[0041] After completing the preset layer expansion on both the water and land sides to form a surface primitive buffer, the surface primitive set obtained from the water side expansion and the surface primitive set obtained from the land side expansion are combined using a union operation while maintaining the uniqueness of the surface primitive index. This yields the final surface primitive set of the surface primitive buffer. The surface primitive buffer is represented as a composite structure containing a surface primitive index set, a surface primitive layer number mapping, and a surface primitive region attribute identifier, so that the subsequent Poisson fusion model can directly access topological relationships and constraint information within this solution domain. To ensure that the surface primitive buffer continuously covers the water-land junction region in space, a connectivity check can be performed on the surface primitive buffer. The surface adjacency subgraph induced by the surface primitive buffer is decomposed into several connected components. The connected components that cover the boundary edge set are retained as the main connected components, while the connected components that do not cover the boundary edge set are removed to eliminate discrete flying surfaces caused by local noise expansion. This ensures that the surface primitive buffer forms a continuous loop around the water-land junction line geometrically and maintains topological connectivity that can be used for global solution.
[0042] When defining triangular facets located outside the facet buffer and belonging to the water region as water boundary regions, and triangular facets located outside the facet buffer and belonging to the land region as land boundary regions, while keeping their color unchanged, first perform set difference on all triangular facets of the unified mesh object. Divide the triangular facets not included in the facet buffer into a set of facets outside the buffer. Then, based on the region attribute identifier, decompose the set of facets outside the buffer into water boundary regions and land boundary regions. The water boundary region refers to the set of triangular facets with the region attribute identifier "water" and not belonging to the facet buffer, and the land boundary region refers to the set of triangular facets with the region attribute identifier "land" and not belonging to the facet buffer. This ensures that the color remains unchanged in subsequent steps. In the solution, the boundary color constraints are implemented by writing the color states of the surface primitives in the water boundary region and the land boundary region into the boundary constraint cache and locking them. The boundary constraint cache refers to the mapping structure that stores the boundary surface primitive index and the corresponding color vector. The locked state means that the surface primitive color variable is not updated during the solution iteration. When the Poisson fusion model uses the surface primitive color as a variable to construct a sparse equation system, the unknowns corresponding to the locked boundary surface primitives are removed from the solution unknown set, and their contributions are incorporated into the solution objective vector in the form of constant terms. This ensures that the boundary color constraints are strictly effective at the numerical level and will not drift due to iterative updates. This guarantees that the color transition in the surface primitive buffer is always stably pulled by the boundaries on both sides of the water pseudo-color texture and the land real image texture.
[0043] S140. For each triangular face primitive in the face primitive buffer, construct local color change constraints according to the attributes of the region to which it belongs. Among them, the water side primitive adopts the local color change relationship of the water pseudo-color texture, and the land side primitive adopts the local color change relationship of the land real image texture. In addition, construct a guiding gradient field from the land side to the water side in the face primitive buffer. The guiding gradient field is used to limit the spatial transition direction of color change in the face primitive buffer.
[0044] Specifically, after the surface primitive buffer is constructed, when performing region attribute determination on each triangular surface primitive within the buffer, each triangular surface primitive in the buffer is first taken as the determination object, and the region attribute identifier retained by the triangular surface primitive during the geometric fusion stage is read. Simultaneously, the region attribute identifier is checked for consistency based on the relative positional relationship of the land-water boundary line to avoid local topological anomalies or label noise causing water-side primitives and land-side primitives to be mixed on the same side. The surface primitive buffer is the solution region formed by expanding around both sides of the land-water boundary line according to the surface primitive adjacency relationship. The consistency check can be achieved by constructing a probability label field with prior on the surface primitive adjacency graph and taking the maximum posterior label, so that the region attribute determination simultaneously satisfies the label prior and neighborhood smoothing constraints. Its expression is:
[0045] in, Indicates the first The region attribute determination result of each triangular face primitive is taken as a value. or , representing the water-side primitive and the land-side primitive, respectively; This represents the prior probability obtained from the relationship between the original region attribute label and the boundary line. The prior probability can be obtained by treating the original label as having high confidence and slightly attenuating the values on both sides of the boundary line. This represents the neighborhood consistency weight coefficient, the value of which is set by the label noise level of the surface primitive buffer; the higher the noise, the larger the value. Indicates the relationship with the first The set of adjacent face primitives that share an edge among triangular face primitives is determined by the face primitive adjacency table; Indicates the first With the The similarity weight between adjacent face primitives can be determined by the shared edge length, the included angle of the normal vectors, and the texture similarity. The higher the similarity, the larger the value. This indicates an indicator function; it takes the value 1 if the condition is met and 0 otherwise. This determination ensures that the triangular face primitives in the buffer are stably divided into water surface primitives and land surface primitives, providing a consistent regional basis for the subsequent differential extraction of the first and second local color change relationships.
[0046] When extracting the first local color change relationship based on the color distribution state corresponding to the water side primitives in the water pseudo-color texture, firstly, multi-point sampling is performed on each water side primitive in the water pseudo-color texture according to its texture coordinate relationship to obtain the surface-level color statistics and local color change clues of the water side primitive. Simultaneously, the surface-level water depth information of the water side primitive is read, so that the first local color change relationship can explicitly reflect the continuity of water depth change. The water pseudo-color texture is a texture image or surface-level color field mapped from the water depth information, and the first local color change relationship is a constraint description of the color change trend between adjacent water side primitives. In order to maintain the overall monotonicity of the pseudo-color gradient and suppress local sampling noise, a depth-consistency weighted robust color difference field can be constructed on the adjacency graph of the water side primitives, and this difference field is used as the first local color change relationship. Its expression is:
[0047] in, Indicates the first The first local color change relationship vector of each water surface primitive is used to constrain its color change trend with that of adjacent water surface primitives. Indicates the first The set of adjacent face primitives of each water surface primitive in the water surface subgraph contains only the adjacent face primitives whose region attribute is determined to be a water surface primitive. and They represent the first With the The surface-level water depth information of each water area side primitive is obtained by vertex water depth aggregation or surface attribute reading. This parameter represents the scale of water depth similarity. Its value is obtained by statistical analysis of the water depth variation within the buffer zone. The more drastic the change, the larger the value. and They represent the first With the The unit normal vector of each face primitive is obtained by cross product of the coordinates of the three vertices of the triangle face and normalization. The normal similarity scale parameter is obtained by statistically analyzing the dispersion of the normals within the buffer; the greater the dispersion, the larger the value. Indicates the first With the The length or equivalent weight of a shared edge is obtained by the difference in coordinates between the two endpoints of the shared edge. and They represent the first With the Each water surface primitive is a surface-level color vector obtained from the water surface pseudo-color texture sampling. The surface-level color vector can be obtained by the mean of multi-point sampling, weighted mean, or robust statistics. This represents a robust suppression function used to mitigate the impact of anomalous color differences on constraints. The robust threshold is set by the color noise level of the pseudo-color texture of the water area. By weighting the color difference with water depth consistency and geometric consistency, the first local color change relationship is made more consistent with the continuous gradient driven by water depth and can be used as a constraint on the local color change of the water area side primitive.
[0048] When extracting the second local color change relationship based on the color distribution state corresponding to the land side primitives in the real land image texture, firstly, multi-scale sampling is performed on each land side primitive according to its texture coordinate relationship in the real land image texture to form a low-frequency color baseline and a high-frequency texture detail description, respectively. Brightness changes, hue changes, and texture detail changes are uniformly encoded into a constrained surface-level local structure, so that the second local color change relationship can maintain the details and edges of the real image texture as much as possible in subsequent fusion. The real land image texture is a texture image bound by image projection and texture mapping during the land 3D model modeling stage. The second local color change relationship is a constraint on the joint changes in brightness, hue, and detail between adjacent land side primitives. To simultaneously constrain brightness and hue and explicitly preserve details, the surface-level color vector can first be mapped to brightness and chromaticity components, then a structure tensor can be constructed and propagated on the face adjacency graph to form the second local color change relationship, the expression of which is:
[0049] in, Indicates the first The second local color change relationship vector of each land side primitive is used to constrain its brightness, hue and detail changes with those of adjacent land side primitives; Indicates the first The set of adjacent face primitives of each land side primitive in the land side subgraph includes only the adjacent face primitives that are determined to be land side primitives by the regional attribute. This represents the joint similarity weight of adjacent surface primitives on the land side. The value can be determined by texture similarity, normal similarity and shared edge weight. The more similar the textures, the larger the value. and They represent the first With the The surface-level brightness component of each land side element can be obtained by linearly combining the surface-level color vectors with fixed weights and obtaining a robust mean value by sampling multiple points. This represents the saturation function used to suppress abrupt changes in brightness. This represents the saturation threshold, the value of which is set by statistical analysis of the brightness and contrast of the actual land area image texture. Represents the basic elements of the surface Pointing to surface primitives The unit tangential direction vector, whose value is obtained by normalizing the projection of the difference vector between the two geometric centers onto the tangential plane, is used to correlate brightness changes with spatial direction. This represents the brightness constraint weight coefficient, the value of which is set by the desired brightness consistency intensity. This represents the detail constraint weight coefficient, the value of which is set by the intensity of the high-frequency texture that you want to retain; and They represent the first With the Each land side primitive is a surface-level color vector obtained by sampling the texture of a real land image; Indicates the first The surface-level structure tensor of each land side primitive is used to characterize the principal direction and anisotropic intensity of texture details. The structure tensor can be obtained by accumulating and normalizing the color gradients sampled from multiple points in the surface. The square root matrix of the structure tensor is used to enhance or suppress color differences in the principal direction in detail terms, making it easier to preserve details in the direction of texture edges; This represents a stability term, with a small positive value, used to avoid instability in normalization caused by excessively small color difference amplitudes; it incorporates the luminance and detail terms in parallel. The second local color change relationship can simultaneously reflect changes in brightness, hue, and texture details, and serves as a constraint on the local color change of the land side primitive.
[0050] After constructing the local color change constraints for the water-side primitives and land-side primitives, when constructing the guiding gradient field, the water-land boundary line is used as the direction reference benchmark. Within the surface primitive buffer, each triangular surface primitive is assigned a unified direction attribute pointing from the land side to the water side, ensuring a consistent spatial transition direction for color changes within the buffer. The guiding gradient field is a direction field defined on the surface primitive buffer, and the direction attribute is a unit direction vector assigned to each triangular surface primitive. To ensure the direction attribute adapts to the curvature changes of the boundary line and propagates smoothly within the buffer, a monotonically varying scalar potential function from the water-side boundary to the land-side boundary is first constructed within the buffer. The gradient direction of this potential function in the tangent plane is then used as the direction attribute of the guiding gradient field, and tangent plane projection and anisotropic smoothing are applied to the direction attribute. Its expression is as follows:
[0051] in, Indicates the first The orientation attribute vectors of the triangular face primitives are three-dimensional unit vectors and are used to define the guiding gradient field. Indicates the first The projection operator of the tangent plane of a triangular primitive element can be expressed as: , used to project any three-dimensional vector onto the tangent plane of the surface primitive; Indicates the first The set of adjacent face primitives of each face primitive within the entire buffer; The propagation weight represents the direction, and its value can be determined by the shared edge length, the included normal angle, and the boundary distance, making the direction more geometrically continuous. Indicates the first The potential function of each surface primitive is determined by the relative position of the water side boundary and the land side boundary. The value of the potential function is smaller at the water side boundary and larger at the land side boundary. The value of the potential function inside the buffer zone is monotonically transitioned. and They represent the first With the The geometric center coordinate vector of each face element; This represents a stable term, taking the value of a small positive number; the formula is passed... Introducing monotonicity from the land side to the water side, through Introducing local geometric directions, through By ensuring that the directional attribute lies within the tangent plane, a guiding gradient field is obtained that propagates continuously within the buffer and points towards the water area side. In practical constraint application, the first local color change relationship of the water area side primitive and the second local color change relationship of the land area side primitive are unified under the guidance gradient field. This clearly defines the spatial directionality of the color change within the buffer of the surface primitive, which gradually transitions from the pseudo-color texture of the water area to the real image texture of the land area. It also provides a reproducible and adjustable directional field basis for the color change constraint of the subsequent Poisson fusion model.
[0052] S150. Using triangular face primitives as the basic unit for color solving, a Poisson fusion model based on the topological relationship of face primitives is established within the face primitive buffer. The guided gradient field is used as the color change constraint condition, and the pseudo-color texture of water area and the real image texture of land area are used as the boundary color constraints of the Poisson fusion model.
[0053] Specifically, when uniformly defining each triangular face primitive within the face primitive buffer as the basic unit for color solving and constructing face primitive adjacency relationships, a unique face index is first assigned to each triangular face primitive within the face primitive buffer in the fused triangular mesh. This face index is then used as the index reference for the unknowns of the subsequent sparse equation system. Here, the basic unit for color solving refers to the fact that color variables are no longer bound to pixels or regular gratings, but rather to face-level color vectors at the triangular face primitive level. Subsequently, face primitive adjacency relationships are constructed based on the edge-to-face association structure of the mesh, enabling any triangular face primitive to look up... The set of adjacent face primitives sharing a common edge is queried. Simultaneously, geometric quantities such as the endpoint coordinates of the common edge, the length of the common edge, the normal of the adjacent face, and the dihedral angle are extracted for each pair of adjacent face primitives. These are used to form topological association weights and geometric consistency weights in the Poisson fusion model. To enable adjacency relationships to be directly used to construct sparse matrices, the adjacency relationships of face primitives are encoded as face-to-face sparse connection matrices. The connection strength of each pair of adjacent face primitives is defined as a composite weight. The composite weight simultaneously considers the scale of the common edge, the smoothness of the dihedral angle, and the consistency of the guided gradient field direction. Its expression is:
[0054] in, Represents triangular face primitive Adjacent triangular face primitives The topological association weights between the surface primitives; Represents triangular face primitive The set of adjacent face primitives; Representation of surface primitives With surface primitives The length of the shared common edge is obtained by taking the L2 norm of the difference between the coordinates of the two endpoints of the common edge; Representation of surface primitives With surface primitives The dihedral angle is determined by the angle between the unit normals of the two faces; This represents the dihedral angle scale parameter, whose value is set by the statistics of the dihedral angle distribution within the surface primitive buffer, and is used to control the attenuation intensity of the surface bend angle on the weight. Representation of surface primitives The corresponding guiding gradient field direction attribute vector is a unit vector that points from the land side to the water side. Represents the basic elements of a surface Pointing to surface primitives The unit direction vector, whose value is obtained by normalizing the difference vector between the two geometric centers; This parameter represents the directional consistency scale, and its value is set by the allowable degree of directional deviation; the greater the deviation tolerance, the larger the value. and Representation of surface primitives With surface primitives The current bound or sampled surface-level color vector takes values from the color state of the water pseudo-color texture or the land real image texture on the surface primitive; This represents the color difference normalization parameter, whose value is set by the statistics of color difference within the surface primitive buffer. This represents the robust weight function, used to suppress the damage to the weights caused by abnormal color differences. Its value ranges from 0 to 1 and decreases as the independent variable increases. This represents the geometric scale normalization weight, which is used to incorporate the common edge scale into the weight and normalize it across all adjacent edges of the same face primitive i. This represents the dihedral angle smoothing weight, used to suppress excessive propagation at sharp angles or abrupt curvature changes, making the color constraint more consistent with the surface geometry. The value ranges from 0 to 1, and the larger the dihedral angle, the smaller the weight. The guidance consistency weight is used to apply the directional constraint of the guidance gradient field to adjacent edges, making the color change more inclined to propagate in the direction from the land side to the water side. The value ranges from 0 to 1, and the more consistent the direction, the larger the weight. The weight represents the robust suppression weight, used to reduce the damage to adjacency constraints caused by anomalous color differences or texture noise. It prevents extreme differences from causing abnormal weight amplification or propagation of incorrect colors. The value ranges from 0 to 1, with the weight decreasing as the color difference becomes more anomalous. This composite weight allows the adjacency relationship of surface primitives to express not only whether they are adjacent, but also how strong the adjacency constraint should be, thus providing a foundation for the sparse structure and numerical stability of the subsequent Poisson fusion model.
[0055] When using the adjacency relationship of surface primitives as a structural constraint and introducing a guided gradient field into the color modeling process, the surface-level color vector within the surface primitive buffer is set as the variable to be solved. Discrete Poisson constraints at the surface primitive level are constructed on the surface primitive adjacency relationship to ensure that the color change between adjacent surface primitives maintains local consistency while also reflecting the overall spatial directionality from the land side to the water side along the guided gradient field. The guided gradient field constraint refers to binding the sign and magnitude of the desired color difference to the spatial transition direction using directional attributes. To simultaneously reflect the first local color change relationship on the water side and the second local color change relationship on the land side, and to ensure that the transition gradually shifts from the pseudo-color texture of the water side to the real image texture of the land side within the buffer, a target color difference vector can be constructed for each pair of adjacent surface primitives. , and then The discrete divergence term driving the Poisson fusion model, the target color difference vector, is constructed using a combination of transition coefficients, directional consistency, and local texture relationships. Its expression is as follows:
[0056] in, Indicates on the edge The color difference vector that is expected to be preserved is used to transform the local color change relationship into a difference constraint that can be absorbed by the Poisson fusion model; Representation of surface primitives The first local color change relationship vector, whose value is extracted from the water area pseudo-color texture in the water area neighborhood, is used to reflect the continuity of water depth changes; Representation of surface primitives The second local color change relationship vector is obtained by extracting the texture of the real land image in the land-side neighborhood and is used to reflect changes in brightness, hue, and texture details. This represents the transition coefficient, with a value ranging from 0 to 1, and is used to control surface primitives. The constraints are more biased towards the water-side or land-side, and the transition coefficient can be derived from the surface primitive. The weighted shortest path distance ratio to the water boundary area and the land boundary area is determined, making the area closer to the water boundary area... Larger areas closer to land boundaries Smaller; This represents the adjacency consistency scaling factor, with a value ranging from 0 to 1, and can be determined by... The normalization result is used to make the constraint on color difference of strong adjacency pairs stronger. This represents the directional traction coefficient, which is a non-negative number and is used to control the traction strength of the guide gradient field on the transition directionality. This represents the consistency projection between the directional properties of the guided gradient field and the local adjacent directions. Its value ranges from -1 to 1, and the higher the consistency, the closer the value is to 1. This represents a direction-dependent color basis vector, whose values can be determined by the edges. The gradients are obtained by concatenating the principal direction components of the texture sampling gradients on both sides, and are used to emphasize or suppress specific color channel changes in the guiding direction; after obtaining... Subsequently, the Poisson fusion model establishes global constraints within the surface primitive buffer by approximating the target difference with weighted differences. Its minimization objective can be written as:
[0057] in, Represents the global energy function of the Poisson fusion model; This represents the set of face primitives within the face primitive buffer; This represents the color vector of the target surface primitives to be solved; Representation of surface primitives The initial color vector, whose value is taken from the initial color state of the water pseudo-color texture or the land real image texture on the surface primitive, is used to provide numerical anchoring and suppress unconstrained drift in the solution. The value represents the anchoring strength coefficient, which is a non-negative number. The larger the value, the more inclined it is to maintain the initial color. This energy function ensures that the color difference between adjacent surface primitives fits the relationship between the guiding gradient field and the local color change through the first term, and ensures the stability of the solution and avoids the overall color deviation through the second term. Thus, it completes the introduction of the guiding gradient field into the color modeling process and forms the Poisson fusion constraint under the topological relationship of surface primitives.
[0058] When constructing a Poisson fusion model by fixing the colors of triangular face primitives within the water boundary region and the land boundary region as boundary color constraints, the water boundary region and the land boundary region outside the face primitive buffer are defined as the Dirichlet boundary set. The face primitive colors of the water boundary region are fixed to the color state corresponding to the pseudo-color texture of the water area, and the face primitive colors of the land boundary region are fixed to the color state corresponding to the real image texture of the land area. Here, the boundary color constraint means that the boundary face primitives are not updated as unknowns during the solution process, but are entered into the right-hand side of the equation as constants to guide the color transition inside the buffer. In specific implementation, all face primitives are divided into internal unknown sets. With known boundary set Furthermore, by finding the extreme value of the energy function with respect to the color vector of each internal surface primitive, a sparse linear system of equations is obtained. Terms adjacent to the known boundary set are moved into the right-hand side to form a solvable Poisson fusion model equation, the discrete form of which can be written as:
[0059] in, This indicates that the equation applies to unknown surface primitives within the surface primitive buffer zone; The set of known boundary surface primitives consists of water boundary regions and land boundary regions. Primitive elements representing known boundary surfaces The fixed color vectors have values for the water boundary region derived from the water pseudo-color texture, and values for the land boundary region derived from the land real image texture. This represents the set of internally adjacent face primitives, used to form the off-diagonal terms of a sparse matrix; This represents the set of primitives for adjacent faces at the boundary, used to introduce a fixed boundary color into the right-hand term; The discrete divergence term, induced by the guided gradient field and the relationship of local color changes, drives the internal color difference to converge toward the target difference. Structurally, the sparsity mode of this system is determined by the adjacency relationship of surface primitives, the right-hand driving term is determined by the relationship between the guided gradient field and the local color changes, and the boundary color constraint term is determined by the pseudo-color texture of water and the real texture of land. This completes the construction of a Poisson fusion model based on the topological relationship of surface primitives, the constraint of the guided gradient field, and the boundary color constraint, and enables the subsequent unified solution to achieve the seam color transition within the surface primitive buffer without changing the boundary color state.
[0060] S160. Under the constraints of the Poisson fusion model, a unified solution is performed on the surface primitive colors within the surface primitive buffer to obtain the target surface primitive colors that satisfy the boundary color constraints and whose color changes are consistent with the guided gradient field. This is used to enable the pseudo-color texture of the water area to transition to the seam color of the land area in the surface primitive buffer along the guided gradient field.
[0061] Specifically, when introducing the guided gradient field and local color change constraints into the surface primitive buffer during the unified solution process, each triangular surface primitive within the buffer is first bound to a surface-level color vector to be solved. The water boundary region and land boundary region outside the buffer are bound to fixed color vectors and do not participate in the update. The guided gradient field refers to the direction field formed by assigning a directional attribute vector from the land side to the water side to each triangular surface primitive within the buffer and continuously propagating within the buffer. The local color change constraint refers to the color difference constraint between adjacent surface primitives, jointly formed by the first local color change relationship on the water side and the second local color change relationship on the land side. To ensure that the guided gradient field manifests as a directional constraint in the numerical solution, the guided gradient field and local color change constraints are jointly encoded as a boundary-level target color difference term and a boundary-level weight term, so that any adjacent surface primitive... The color difference is not only constrained to approximate the target color difference, but also constrained to be spatially aligned with the direction attribute, and its expression is:
[0062]
[0063] in, Represents adjacent face primitives and The target color difference vector between them is used to inject the local color change constraint and the guided gradient field constraint into the solution in a unified manner; This represents the adjacency consistency scaling factor, which ranges from 0 to 1. It is obtained by normalizing the adjacency weights of the surface primitives and is used to control the constraint strength of the adjacency pair in the solution. This represents the transition coefficient, which ranges from 0 to 1, and is derived from surface primitives. The weighted shortest path distance ratio to the water boundary area and the land boundary area is determined, making the area closer to the water boundary area... Larger areas closer to land boundaries Smaller; Representation of surface primitives The first local color change relationship vector is obtained by extracting the water pseudo-color texture in the water side neighborhood; Representation of surface primitives The second local color change relationship vector is obtained by extracting the texture of the real land image in the land-side neighborhood; This represents the directional traction coefficient, which is a non-negative number and is used to control the directional traction strength of the guide gradient field on the color difference. Representation of surface primitives Direction attribute vector; Represents the basic elements of a surface Pointing to surface primitives The unit direction vector, whose value is obtained by normalizing the difference vector between the two geometric centers; This represents the directional response slope parameter, which takes a positive value. The larger the value, the stronger the emphasis on directional consistency. The directional consistency response value is represented by the hyperbolic tangent form. Mapping to the range of -1 to 1 makes the response close to 1 when the directions are the same and close to -1 when the directions are opposite. This represents a direction-dependent color basis vector, whose values are determined by the edges. The principal direction components of the texture sampling gradients on both sides are spliced together to enhance the color change consistent with the texture structure in the guiding direction. Through the above construction, the color change is constrained by the differential shape of the local color change and the spatial directionality of the guiding gradient field.
[0064] When performing global coordination updates on the color states of triangular face primitives within the face primitive buffer based on the adjacency relationship of face primitives, the color vectors of unknown face primitives within the face primitive buffer are organized into unknown vectors, and the Poisson fusion model is discretized into a sparse linear system, ensuring that each face primitive is coupled only to its adjacent face primitives. This allows for globally consistent color coordination through sparse solutions. The global coordination update refers to a unified solution process that simultaneously satisfies adjacency difference constraints, guided gradient field constraints, and boundary color constraints on all unknown face primitives. To improve convergence speed and stability under large-scale face primitive buffers, the sparse system is constructed into a symmetric positive definite form and iterative updates are performed using pre-conditional conjugate gradients. Furthermore, multi-scale residual smoothing is introduced in each iteration to suppress high-frequency oscillations. The iterative update and pre-conditional construction can be expressed as follows:
[0065]
[0066]
[0067] in, This represents a sparse coefficient matrix composed of the adjacency relations of surface primitives, adjacency weights, and anchoring terms. Its non-zero structure is determined by the adjacency relations of surface primitives. The diagonal terms are composed of the sum of adjacent weights and anchoring strengths, and the off-diagonal terms are composed of the negative values of adjacent weights. This represents the expanded form of the color vector of the unknown face primitives. The color vectors of each face primitive are concatenated by channel to form the overall unknown vector. This represents the right-hand vector, which consists of the target color difference term. It consists of boundary color constraints and initial color anchoring terms; superscript Indicates the first Round iteration; Indicates the first The residual vector of each iteration is used to measure the degree to which the current solution satisfies the sparse system. This represents the preconditioning matrix, with values that are easy to invert and approximate. The preconditioning matrix can be constructed using incomplete Cholesky decomposition or diagonal block approximation to accelerate convergence. This represents the residual vector after preconditioning, and its values are determined by the solution. get; Represents the search direction vector; This represents the step size coefficient, used to determine the magnitude of the update along the search direction; This represents the search direction update coefficient, used to ensure that the search direction is updated. Conjugate in the inner product sense; through this global coordinated update, the color state in the surface primitive buffer satisfies the guided gradient field constraint, local color change constraint and boundary color constraint in each iteration, and gradually tends to stabilize.
[0068] When determining that the color change state has reached stability and outputting the target surface primitive color, stability is defined as the residual norm and color increment simultaneously satisfying threshold conditions. This avoids under-convergence or over-convergence caused by relying solely on the number of iterations. Stability refers to the color state within the surface primitive buffer approaching zero in several consecutive rounds of global coordinated updates, and the residual of the sparse system approaching an acceptable range. In specific implementation, the residual normalization index and the color increment normalization index are calculated after each iteration, and stability is determined when both are below a preset threshold. The expression is as follows:
[0069] in, Indicates the first The smaller the value of the residual normalization index of the round iteration, the more fully the constraints of the Poisson fusion model are satisfied; Indicates the first The color increment normalization index in each iteration, the smaller the value, the more stable the color state change tends to be; Represents the L2 norm; This represents the stable term, taking small positive values to avoid a denominator of zero; the preset threshold is determined by the desired visual smoothness and the computational resource budget. and When it is determined to be stable, among which and These represent the residual threshold and the incremental threshold, respectively; after stabilization, they will be... The target surface color vector is mapped to each surface primitive and written into the color state cache of the corresponding surface primitive in the surface primitive buffer to obtain the target surface primitive color. Then, the target surface primitive color is written back to the texture fragment or surface color cache covered by the water pseudo-color texture in the surface primitive buffer, so that the water pseudo-color texture gradually conforms to the land real image texture along the direction of the guide gradient field in the surface primitive buffer, and the boundary color constraint of the land real image texture is continuous and consistent when it is close to the side boundary of the land, thereby realizing the continuous color transition of the water-land seam area and maintaining the overall visual consistency.
[0070] This application also provides a color transition device for the seams of a 3D water and land model based on Poisson fusion of surface primitives, referring to... Figure 2 , Figure 2This is a schematic diagram of a color transition device for the seam between a water and land 3D model based on Poisson fusion of surface primitives, provided in an embodiment of this application. The device is a server, comprising an acquisition module 21 and a processing module 22. The acquisition module 21 is used to construct a pseudo-color texture for the water area based on the water depth information corresponding to each triangular surface primitive in the water area 3D model after geometric fusion of the water area and land area 3D models, and to acquire the real image texture of the land area based on the already bound real image texture in the land area 3D model. The processing module 22 is used to process the triangular meshes of the water area and land area 3D models. A unified topology analysis is performed to identify the spatial contact positions of adjacent water surface primitives and land surface primitives, and these spatial contact positions are extracted as water-land boundary lines. These boundary lines define the spatial range where the water and land textures undergo color transitions. Processing module 22 further expands a preset number of triangular surface primitives around the water-land boundary line, based on the adjacency relationships of the surface primitives in the triangular mesh, to both the water and land sides, constructing a surface primitive buffer zone covering the water-land seam area. The water and land areas outside the surface primitive buffer zone are then defined as color-fixed boundary areas. Processing module 2 2. It is also used to construct local color change constraints for each triangular facet primitive within the facet primitive buffer based on the attributes of its respective region. Specifically, the water side primitive uses the local color change relationship of the water pseudo-color texture, and the land side primitive uses the local color change relationship of the land real image texture. A guiding gradient field is constructed within the facet primitive buffer, pointing from the land side to the water side. This guiding gradient field is used to limit the spatial transition direction of color changes within the facet primitive buffer. Processing module 22 is also used to establish a facet-based primitive-based system within the facet primitive buffer, using triangular facet primitives as the basic unit for color solving. A Poisson fusion model based on topological relationships is used, with the guided gradient field as a constraint on color changes. Simultaneously, the pseudo-color texture of the water area and the real image texture of the land area are used as boundary color constraints of the Poisson fusion model, respectively. The processing module 22 is also used to perform a unified solution on the surface primitive colors in the surface primitive buffer under the constraints of the Poisson fusion model, to obtain the target surface primitive colors that satisfy the boundary color constraints and whose color changes are consistent with the guided gradient field. This allows the pseudo-color texture of the water area to transition to the seam color of the land area real image texture in the surface primitive buffer along the guided gradient field.
[0071] This application also provides an electronic device, with reference to... Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: at least one processor 31, at least one network interface 34, a user interface 33, a memory 35, and at least one communication bus 32.
[0072] The communication bus 32 is used to enable communication between these components.
[0073] The user interface 33 may include a display screen and a camera. Optionally, the user interface 33 may also include a standard wired interface and a wireless interface.
[0074] The network interface 34 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0075] The processor 31 may include one or more processing cores. The processor 31 connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in the memory 35, and calling data stored in the memory 35 to perform various server functions and process data. Optionally, the processor 31 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 31 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 31 and may be implemented as a separate chip.
[0076] The memory 35 may include random access memory (RAM) or read-only memory. Optionally, the memory 35 may include a non-transitory computer-readable storage medium. The memory 35 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 35 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 35 may also be at least one storage device located remotely from the aforementioned processor 31. Figure 3As shown, the memory 35, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program based on a color transition method for seams in a 3D water and land model using Poisson fusion of surface primitives.
[0077] exist Figure 3 In the electronic device shown, the user interface 33 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 31 can be used to call the application stored in the memory 35, which is based on the color transition method of the seam of the three-dimensional water and land model based on the Poisson fusion of surface primitives. When executed by one or more processors, the electronic device performs one or more methods as described in the above embodiments.
[0078] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0079] This application also provides a non-transitory computer-readable storage medium storing instructions. When executed by one or more processors, these instructions cause an electronic device to perform one or more of the methods described in the above embodiments.
[0080] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truth. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method for color transition at seams in a 3D water and land model based on Poisson fusion of surface primitives, characterized in that... The method includes: After the three-dimensional water area model and the three-dimensional land area model are geometrically fused, a pseudo-color texture of the water area is constructed based on the water depth information corresponding to each triangular face primitive in the three-dimensional water area model, and a real image texture of the land area is obtained based on the real image texture that has been bound in the three-dimensional land area model. A unified topology analysis is performed on the triangular meshes of the water area 3D model and the land area 3D model to identify the spatial contact positions of adjacent water area surface primitives and land area surface primitives. The spatial contact positions are extracted as water-land boundary lines, which are used to define the spatial range in which the water area texture and the land area texture undergo color transition. Around the water-land boundary line, based on the adjacency relationship of the surface primitives of the triangular mesh, a preset number of triangular surface primitives are extended to the water side and the land side respectively to construct a surface primitive buffer zone covering the water-land seam area, and the water area and land area outside the surface primitive buffer zone are respectively defined as boundary areas with fixed colors. For each triangular face primitive within the face primitive buffer, a local color change constraint is constructed based on the attributes of its region. Specifically, the water side primitive adopts the local color change relationship of the water pseudo-color texture, and the land side primitive adopts the local color change relationship of the land real image texture. A guiding gradient field from the land side to the water side is constructed within the face primitive buffer. The guiding gradient field is used to limit the spatial transition direction of color change within the face primitive buffer. Using triangular face primitives as the basic unit for color solving, a Poisson fusion model based on the topological relationship of face primitives is established within the face primitive buffer. The guided gradient field is used as the color change constraint condition, and the pseudo-color texture of the water area and the real image texture of the land area are used as the boundary color constraints of the Poisson fusion model, respectively. Under the constraints of the Poisson fusion model, a unified solution is performed on the surface primitive colors within the surface primitive buffer to obtain target surface primitive colors that satisfy the boundary color constraints and whose color changes are consistent with the guiding gradient field. The target surface primitive colors are used to make the pseudo-color texture of the water area transition along the guiding gradient field towards the real land image texture within the surface primitive buffer.
2. The method for color transition at seams in a 3D water and land model based on Poisson fusion of surface primitives as described in claim 1, characterized in that, After the geometric fusion of the water area 3D model and the land area 3D model is completed, a pseudo-color texture of the water area is constructed based on the water depth information corresponding to each triangular facet primitive in the water area 3D model, and a real image texture of the land area is obtained based on the real image texture already bound in the land area 3D model. Specifically, this includes: After the three-dimensional model of the water area and the three-dimensional model of the land area are geometrically fused, the water area triangular facet primitives in the three-dimensional model of the water area are traversed to establish a one-to-one mapping relationship between each water area triangular facet primitive and the corresponding water depth information. The water depth information is used as the sole basis to perform color mapping processing on the water area triangular facet primitives to form a water area pseudo-color texture that transitions continuously with the water depth. The water area pseudo-color texture is determined as the water area side color reference. Based on the real image textures that have been bound by image projection and texture mapping in the modeling stage of the land area 3D model, the texture coordinate relationship of the land area 3D model is analyzed to obtain the land area real image textures that correspond one-to-one with each land area triangular face primitive, and the land area real image textures are determined as the land area side color reference.
3. The method for color transition at seams in a 3D water and land model based on Poisson fusion of surface primitives according to claim 1, characterized in that, The process involves performing unified topology analysis on the triangular meshes of the three-dimensional water area model and the three-dimensional land area model to identify the spatial contact positions of adjacent water area surface primitives and land area surface primitives, and extracting these spatial contact positions as water-land boundary lines. Specifically, this includes: The water area triangular facet primitives and the land area triangular facet primitives are included in the same triangular mesh topology space for traversal, and a regional attribute identifier is retained for each triangular facet primitive to distinguish between the water area facet primitives and the land area facet primitives. A surface primitive adjacency table is constructed based on the topology of triangular meshes to determine the set of adjacent surface primitives corresponding to each triangular surface primitive. Based on the adjacency table of the surface primitives and the regional attribute identifier, the regional attributes of the adjacent surface primitives are detected for each triangular surface primitive. When the regional attributes of the adjacent surface primitives change between the water surface primitives and the land surface primitives, the corresponding common edge or the spatial position covered by the common edge is determined as the candidate spatial contact position. The candidate spatial contact positions are subjected to continuity analysis and aggregation processing to eliminate isolated or duplicate candidate spatial contact positions, forming a set of contact edges that are continuously distributed in space. The contact edge set is integrated according to the geometric order of the triangular mesh to obtain the water-land boundary line, and the water-land boundary line is used as the spatial reference position for the seam color transition between the false color texture of the water area and the real image texture of the land area.
4. The method for color transition at seams in a 3D water and land model based on Poisson fusion of surface primitives according to claim 1, characterized in that, The process involves extending a predetermined number of triangular facets around the water-land boundary line, based on the adjacency relationship of the facets in a triangular mesh, towards both the water and land sides. This constructs a facet buffer zone covering the water-land seam area. The water and land areas outside this facet buffer zone are then defined as boundary regions with fixed colors. Specifically, this includes: Using the water-land boundary line as the spatial starting constraint, identify the triangular facet primitives directly adjacent to the water-land boundary line, and determine the triangular facet primitives located on the water side as the water side starting layer primitives, and determine the triangular facet primitives located on the land side as the land side starting layer primitives. Based on the initial layer primitives on the water side and the initial layer primitives on the land side, and according to the adjacency relationship between the face primitives in the triangular mesh, adjacent triangular face primitives are expanded layer by layer along the topological direction on the water side and the land side respectively. The expansion process is completed within the preset number of layers by controlling the number of expansion layers. The expansion on the water side is achieved by incorporating water face primitives, and the expansion on the land side is achieved by incorporating land face primitives. After completing the preset number of layer expansion on both the water side and the land side, the water side primitives of each layer and the land side primitives of each layer are merged to form a surface primitive buffer zone that continuously covers the water-land junction area in space. Triangular face primitives located outside the surface primitive buffer zone and belonging to the water area are defined as water boundary regions, and triangular face primitives located outside the surface primitive buffer zone and belonging to the land area are defined as land boundary regions. The color states of the face primitives in the water boundary regions and the land boundary regions are kept fixed and used as boundary color constraints in subsequent seam color transition processing.
5. The method for color transition at seams in a 3D water and land model based on Poisson fusion of surface primitives according to claim 1, characterized in that, For each triangular facet primitive within the facet primitive buffer, a local color change constraint is constructed based on the attributes of its region. Specifically, the water area side primitive adopts the local color change relationship of the water area pseudo-color texture, and the land area side primitive adopts the local color change relationship of the land area real image texture. A guiding gradient field pointing from the land area side to the water area side is constructed within the facet primitive buffer, including: After the surface primitive buffer is constructed, the region attribute determination is performed on each of the triangular surface primitives in the surface primitive buffer to distinguish between water surface primitives and land surface primitives. Based on the color distribution state corresponding to the water surface primitive in the water pseudo-color texture, the first local color change relationship reflecting the continuity of water depth change between adjacent water surface primitives is extracted, and the first local color change relationship is used as the local color change constraint of the water surface primitive. Based on the color distribution state corresponding to the land side primitive in the real land image texture, a second local color change relationship reflecting the brightness change, hue change and texture detail change of the real image texture is extracted between adjacent land side primitives, and the second local color change relationship is used as the local color change constraint of the land side primitive. After completing the local color change constraint construction of the water side primitive and the land side primitive, the water-land boundary line is used as the direction reference benchmark. Within the surface primitive buffer, each triangular surface primitive is assigned a unified directional attribute pointing from the land side to the water side to construct the guiding gradient field. The guiding gradient field is used to limit the spatial directionality of the color change within the surface primitive buffer along the water pseudo-color texture to the land real image texture.
6. The method for color transition at seams in a 3D water and land model based on Poisson fusion of surface primitives according to claim 4, characterized in that, The method uses triangular facet primitives as the basic unit for color solving, establishes a Poisson fusion model based on the topological relationship of facet primitives within the facet primitive buffer, and uses the guided gradient field as a color change constraint. Simultaneously, the pseudo-color texture of the water area and the real image texture of the land area are used as boundary color constraints for the Poisson fusion model, respectively. Specifically, this includes: Each triangular face element in the face element buffer is uniformly determined as the basic unit for color solving, and the face element adjacency relationship is constructed based on the topological structure of the fused triangular mesh, so that each triangular face element forms a topological association with its adjacent face elements. Using the adjacency relationship of the surface primitives as a structural constraint, the guiding gradient field is introduced into the color modeling process to limit the consistency of color change between adjacent surface primitives and the overall spatial directionality of color change from the land side to the water side. The colors of the triangular face primitives within the water boundary region are fixed to the color state corresponding to the water pseudo-color texture, and the colors of the triangular face primitives within the land boundary region are fixed to the color state corresponding to the land real image texture, so that the water pseudo-color texture and the land real image texture serve as the boundary color constraints of the Poisson fusion model, thereby constructing a Poisson fusion model based on face primitive topological relationships, guided gradient field constraints, and boundary color constraints.
7. The method for color transition at seams in a 3D water and land model based on Poisson fusion of surface primitives according to claim 1, characterized in that, Under the constraints of the Poisson fusion model, a unified solution is performed on the surface primitive colors within the surface primitive buffer to obtain target surface primitive colors that satisfy the boundary color constraints and whose color changes are consistent with the guided gradient field. These target surface primitive colors are then used to achieve a seam color transition for the water pseudo-color texture within the surface primitive buffer along the guided gradient field towards the land real image texture. Specifically, this includes: In the unified solution process, the guiding gradient field is introduced into the buffer of the surface primitive as a directional constraint of color change, so that the color change of each triangular surface primitive is restricted to the spatial transition direction from the land side to the water side. At the same time, the local color change constraint is used as a constraint condition for color coordination between adjacent surface primitives to ensure that the color change conforms to the transition trend while maintaining local continuity. Based on the adjacency relationship of the face primitives, a global coordinated update is performed on the color state of each triangular face primitive in the face primitive buffer, so that the color change state in the face primitive buffer gradually tends to stabilize and simultaneously satisfies the guiding gradient field constraint and the boundary color constraint. After determining that the color change state has reached a stable state, the stable color state is determined as the target surface primitive color. The water area pseudo-color texture is then gradually aligned with the land area real image texture within the surface primitive buffer zone along the direction of the guide gradient field, thereby achieving a continuous color transition in the water-land seam area.
8. A color transition device for seams in a 3D water and land model based on Poisson fusion of surface primitives, characterized in that, The apparatus is used to perform the color transition method for seams in a 3D water and land model based on Poisson fusion of surface primitives as described in any one of claims 1 to 7. The apparatus includes an acquisition module and a processing module, wherein... The acquisition module is used to construct a pseudo-color texture of the water area based on the water depth information corresponding to each triangular face primitive in the water area 3D model after the geometric fusion of the water area 3D model and the land area 3D model, and to acquire the land area real image texture based on the real image texture that has been bound in the land area 3D model. The processing module is used to perform unified topology analysis on the triangular meshes of the water area 3D model and the land area 3D model, identify the spatial contact positions of adjacent water area surface primitives and land area surface primitives, and extract the spatial contact positions as water-land boundary lines. The water-land boundary lines are used to define the spatial range in which the water area texture and the land area texture undergo color transition. The processing module is also used to expand a preset number of triangular face elements to the water side and the land side around the water-land boundary line according to the adjacency relationship of the face elements of the triangular mesh, respectively, to construct a face element buffer zone covering the water-land seam area, and to determine the water area and the land area outside the face element buffer zone as boundary areas with fixed colors. The processing module is further configured to construct local color change constraints for each triangular face primitive within the face primitive buffer based on the attributes of its respective region. Specifically, the water side primitive adopts the local color change relationship of the water pseudo-color texture, and the land side primitive adopts the local color change relationship of the land real image texture. A guiding gradient field from the land side to the water side is constructed within the face primitive buffer. The guiding gradient field is used to limit the spatial transition direction of color change within the face primitive buffer. The processing module is also used to establish a Poisson fusion model based on the topological relationship of the face primitives in the face primitive buffer, using the triangular face primitives as the basic unit for color solving, and using the guided gradient field as the color change constraint condition, while using the water pseudo-color texture and the land real image texture as the boundary color constraints of the Poisson fusion model respectively. The processing module is further configured to perform a unified solution on the surface primitive colors within the surface primitive buffer under the constraints of the Poisson fusion model, to obtain a target surface primitive color that satisfies the boundary color constraints and whose color change is consistent with the guiding gradient field, so as to enable the pseudo-color texture of the water area to undergo a seam color transition along the guiding gradient field towards the real land image texture within the surface primitive buffer through the target surface primitive color.
9. An electronic device, characterized in that, The electronic device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions. The user interface and the network interface are both used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1 to 7.