Boundary fusion method and device, equipment, storage medium and program product
By obtaining the feature points and matching points of the model blocks for dynamic plane fitting and color transition adjustment, the problems of gaps and visual defects when merging model blocks in 3D reconstruction are solved, and the visual quality of modeling is improved.
Patent Information
- Application Number
- CN202510690944.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-09
AI Technical Summary
In the existing 3D reconstruction process, gaps and geometric inconsistencies exist when merging model blocks, resulting in visual artifacts after merging.
By obtaining the feature points and matching points of the model blocks, dynamic plane fitting is performed, and combined with weight calculation and color transition adjustment, accurate splicing of the model blocks can be achieved.
The geometric inconsistency and visual defects of model blocks are solved, significantly improving the visual quality and overall effect of the modeling results.
Smart Images

Figure CN120612450A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a boundary fusion method, apparatus, device, storage medium, and program product. Background Art
[0002] In existing 3D reconstruction techniques, when reconstructing large scenes or buildings, the scene is divided into multiple model blocks, which are reconstructed separately and then stitched together for presentation. During the reconstruction process, overlapping areas are modeled at the joints and finally aligned and merged. However, in the current merging process, there are cases where two blocks cannot be properly merged, resulting in gaps after the merge. Summary of the Invention
[0003] The embodiments of the present application provide a boundary fusion method, apparatus, device, storage medium, and program product, which solve the problem of merging gaps when different blocks are merged in the existing three-dimensional reconstruction process.
[0004] In a first aspect, to achieve the above-mentioned objectives, embodiments of the present application provide a boundary fusion method, comprising:
[0005] Acquire a first overlapping area of the first model block and the second model block to be spliced;
[0006] In the first overlapping area, obtaining at least one first feature point of the first model block and at least one second feature point of the second model block;
[0007] In the first overlapping area, obtaining a first matching point on the second model block corresponding to each of the first feature points, and obtaining a second matching point on the first model block corresponding to each of the second feature points;
[0008] Perform dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane;
[0009] Based on the fitting plane, the first model block and the second model block are spliced.
[0010] The method further comprises:
[0011] Determine a first weight based on the distance between the first feature point and the corresponding boundary of the first model block; determine a second weight based on the distance between the second feature point and the corresponding boundary of the second model block; determine a third weight based on the distance between the first matching point and the boundary of the second model block; and determine a fourth weight based on the distance between the second matching point and the boundary of the first model block;
[0012] The step of performing dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane includes:
[0013] Dynamically plane fitting is performed on the first feature point, the second feature point, the first matching point, and the second matching point according to the first weight, the second weight, the third weight, and the fourth weight to obtain a fitting plane.
[0014] Wherein, a first weight is determined according to the distance between the first feature point and the corresponding boundary of the first model block; a second weight is determined according to the distance between the second feature point and the corresponding boundary of the second model block; a third weight is determined according to the distance between the first matching point and the boundary of the second model block; and a fourth weight is determined according to the distance between the second matching point and the boundary of the first model block, including:
[0015] According to the formula determining the first weight;
[0016] According to the formula determining the second weight;
[0017] According to the formula determining the third weight;
[0018] According to the formula determining the fourth weight;
[0019] Wherein, λ represents the first parameter for controlling the attenuation rate, W represents the width of the first overlapping area, k1 represents the first weighting coefficient, k2 represents the second weighting coefficient, α represents the weakening coefficient, and d A1 represents the distance between the first feature point and the boundary of the corresponding first model block, d B1 represents the distance between the second feature point and the boundary of the corresponding second model block, d A2 represents the distance between the first matching point and the boundary of the second model block, d B2 Represents the distance between the second matching point and the boundary of the first model block.
[0020] The step of splicing the first model block and the second model block based on the fitting plane includes:
[0021] Projecting the vertices of the triangular mesh in the first overlapping area onto the fitting plane to obtain projection points corresponding to the respective vertices;
[0022] Based on the projection point, the first model block and the second model block are spliced.
[0023] The step of obtaining the overlapping area of the first model block and the second model block to be spliced includes:
[0024] Obtaining an initial overlapping area of the first model block and the second model block;
[0025] When the density of the vertices of the triangular mesh in the initial overlapping area is less than a preset density threshold, the initial overlapping area is widened to obtain the first overlapping area, wherein the density of the vertices in the first overlapping area is greater than or equal to the density threshold.
[0026] The method further comprises:
[0027] In the first overlapping area, obtaining a first average brightness value of the first model block, a second average brightness value of the second model block, a first distance between a midpoint of each triangular mesh of the first model block and a boundary of the second model block, and a second distance between a midpoint of each triangular mesh of the second model block and a boundary of the first model block;
[0028] The colors of the triangular meshes are transitionally adjusted using the first distance, the second distance, the width of the first overlapping area, the first average brightness value, and the second average brightness value.
[0029] In a second aspect, to achieve the above-mentioned objectives, embodiments of the present application provide a boundary fusion device, comprising:
[0030] A first acquisition module is used to acquire a first overlapping area of a first model block and a second model block to be spliced;
[0031] a second acquisition module, configured to acquire, in the first overlapping area, at least one first feature point of the first model block and at least one second feature point of the second model block;
[0032] a third acquisition module, configured to acquire, within the first overlapping area, first matching points on the second model block corresponding to each of the first feature points, and to acquire second matching points on the first model block corresponding to each of the second feature points;
[0033] a fitting module, configured to perform dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane;
[0034] A splicing module is used to splice the first model block and the second model block based on the fitting plane.
[0035] In the third aspect, in order to achieve the above-mentioned purpose, an embodiment of the present application provides a boundary fusion device, including a transceiver, a processor, a memory, and a program stored on the memory and runnable on the processor; when the processor executes the program, the boundary fusion method described in the first aspect is implemented.
[0036] In a fourth aspect, in order to achieve the above-mentioned purpose, an embodiment of the present application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the boundary fusion method as described in the first aspect is implemented.
[0037] In a fifth aspect, to achieve the above-mentioned purpose, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the boundary fusion method as described in the first aspect.
[0038] The beneficial effects of the above technical solution of this application are as follows:
[0039] In an embodiment of the present application, first, a first overlapping area of the first model block and the second model block to be spliced is obtained; secondly, in the first overlapping area, at least one first feature point of the first model block and at least one second feature point of the second model block are obtained; in the first overlapping area, first matching points corresponding to each of the first feature points on the second model block are obtained, and second matching points corresponding to each of the second feature points on the first model block are obtained; thirdly, dynamic plane fitting is performed based on the first feature point, the second feature point, the first matching point and the second matching point to obtain a fitting plane; finally, based on the fitting plane, the first model block and the second model block are spliced. In this way, when the model blocks are spliced, there will be no situation where the positions of the grids cannot be aligned, which solves the problem of geometric inconsistency in boundary fusion, avoids the problem of visual defects at the boundary, and significantly improves the visual quality and overall effect of the modeling results. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 One of the schematic diagrams for splicing the existing model into blocks;
[0041] Figure 2 Schematic diagrams of the existing model block splicing one or two;
[0042] Figure 3 The third diagram of the existing model block splicing;
[0043] Figure 4 This is a schematic diagram of a boundary fusion method according to an embodiment of the present application;
[0044] Figure 5 This is a second schematic diagram of the boundary fusion method according to an embodiment of the present application;
[0045] Figure 6 A schematic diagram of an overlapping area according to an embodiment of the present application;
[0046] Figure 7 A schematic diagram of feature points and matching points in an embodiment of the present application;
[0047] Figure 8 is a schematic diagram of a fitting plane in an embodiment of the present application;
[0048] Figure 9 This is a schematic diagram of the model blocks before brightness adjustment in an embodiment of the present application;
[0049] Figure 10 This is a schematic diagram of the model after brightness adjustment in the embodiment of the present application;
[0050] Figure 11 Schematic diagram of the distance between a triangular mesh and a boundary in an embodiment of the present application;
[0051] Figure 12 This is a schematic structural diagram of a boundary fusion device according to an embodiment of the present application;
[0052] Figure 13 This is a schematic structural diagram of a boundary fusion device according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the technical problems, technical solutions and advantages to be solved by this application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0054] It should be understood that references throughout this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout this specification do not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0055] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0056] In the embodiments provided herein, it should be understood that "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A; B can also be determined based on A and / or other information.
[0057] Before describing the embodiments of the present application, the related technologies are first described:
[0058] As mentioned above, in the process of reconstructing a large scene or building model, there are multiple steps of model block splicing. The existing model block splicing does not process the boundaries, or only widens the boundaries to a certain extent, resulting in overlapping areas without merging the overlapping areas. Figure 1 As shown, gaps will appear in the model, affecting the aesthetics; for the method of only widening the boundary, such as Figure 2 As shown, there will be geometric inconsistencies, that is, the positions of the grids cannot be aligned, that is, there is a sense of abruptness, such as Figure 3 As shown, there will be color inconsistency, that is, the color transition is unnatural and there is a sense of boundary.
[0059] In view of the above problems, the embodiments of the present application provide a boundary fusion method, apparatus, device, storage medium and program product.
[0060] The embodiment of the present application provides a boundary fusion method, such as Figure 4 As shown, the method includes:
[0061] Step 401, obtain the first overlapping area of the first model block and the second model block to be spliced. The first model block and the second model block are two adjacent blocks of a larger scene or building model. The first overlapping area is the area where the first model block and the second model block need to overlap when splicing. The first overlapping area includes a partial area of the first model block (the area close to the second model block) and a partial area of the second model block (the area close to the first model block). Figure 6 For example, the first overlapping area is the area enclosed by the middle dotted line (the right boundary of block A) and the solid line (the left boundary of block B), that is, in block A, the area overlapping with block B is the projection of the left boundary of block B on block A and the area enclosed by the right boundary of block A; in block B, the area overlapping with block A is the projection of the right boundary of block A on block B and the area enclosed by the left boundary of block B.
[0062] Step 402: In the first overlapping area, obtain at least one first feature point of the first model block and at least one second feature point of the second model block. This step may include: in the first overlapping area, extracting features from the texture image on the three-dimensional grid of the first model block, and extracting features from the texture image on the three-dimensional grid of the second model block. Figure 6 For example, the first feature point and the second feature point extracted in this step are black dots.
[0063] Step 403: Obtain, within the first overlapping region, first matching points corresponding to each of the first feature points on the second model block, and second matching points corresponding to each of the second feature points on the first model block. This step may be performed by searching for first matching points corresponding to the first feature points on the second model block and searching for second matching points corresponding to the second feature points on the first model block using an image search algorithm, such as a scale-invariant feature transform (SIFT) algorithm.
[0064] In order to improve the efficiency and accuracy of the search, when searching for matching points, a search range can be set within the first overlapping area. For example, the search range is a rectangular frame centered on the feature point currently to be matched and having a side length of the first length. Therefore, taking the search for the first matching point of the first feature point on the second model block as an example, an optional example of the above step 403 can be described as: within the area on the second model block that overlaps with the first model block, searching for the first matching point that matches the first feature point within a rectangular frame centered on the first feature point currently to be matched and having a side length of the first length.
[0065] Step 404: Perform dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane. The fitting plane in this step is a plane obtained by fitting the portion of the first model block that overlaps with the second model block and the portion of the second model block that overlaps with the first model block.
[0066] Step 405: splice the first model block and the second model block based on the fitting plane. The first model block and the second model block are spliced together based on the fitting plane so that the vertices of the triangular mesh of the first model block and the vertices of the triangular mesh of the second model block within the first overlapping region are aligned, thereby achieving a good merging of the first model block and the second model block.
[0067] In the boundary fusion method of the embodiment of the present application, first, obtain the first overlapping area of the first model block and the second model block to be spliced; secondly, obtain at least one first feature point of the first model block and at least one second feature point of the second model block in the first overlapping area; obtain the first matching point corresponding to each of the first feature points on the second model block in the first overlapping area, and obtain the second matching point corresponding to each of the second feature points on the first model block; thirdly, perform dynamic plane fitting based on the first feature point, the second feature point, the first matching point and the second matching point to obtain a fitting plane; finally, based on the fitting plane, splice the first model block and the second model block. In this way, when the model blocks are spliced, there will be no situation where the positions of the grids cannot be aligned, which solves the problem of geometric inconsistency in boundary fusion, avoids the problem of visual defects at the boundary, and significantly improves the visual quality and overall effect of the modeling results.
[0068] Furthermore, as an optional implementation, the method further includes:
[0069] A first weight is determined based on the distance between the first feature point and the corresponding boundary of the first model block; a second weight is determined based on the distance between the second feature point and the corresponding boundary of the second model block; a third weight is determined based on the distance between the first matching point and the boundary of the second model block; and a fourth weight is determined based on the distance between the second matching point and the boundary of the first model block. Based on this, step 404 includes:
[0070] According to the first weight, the second weight, the third weight and the fourth weight, a dynamic plane fitting is performed on the first feature point, the second feature point, the first matching point and the second matching point to obtain a fitting plane. Figure 7 For example, Figure 7 The grey points in the figure are feature points, the black points are matching points, and the curved edges represent the fitting planes.
[0071] The above optional implementation method, when performing dynamic plane fitting, is not only based on the first feature point, the second feature point, the first matching point and the second matching point, but also needs to consider the first weight of the first feature point, the second weight of the second feature point, the third weight of the first matching point and the fourth weight of the second matching point. In this way, the feature points / matching points located at different positions can have different effects on the fitting process, thereby improving the fitting accuracy.
[0072] As a specific example, the above optional implementation method is to perform dynamic plane fitting on the first feature point, the second feature point, the first matching point and the second matching point in 3D space, wherein the fitting method is: using the coordinate positions of the first feature point, the second feature point, the third feature point and the fourth feature point and the first weight, the second weight, the third weight and the fourth weight as input, and adopting the weighted least squares estimation method to perform dynamic plane fitting. That is: the coordinate positions of the first feature point, the second feature point, the third feature point and the fourth feature point, and the first weight, the second weight, the third weight and the fourth weight are input into the weighted least squares estimation model to obtain the fitting plane output by the model. The weighted least squares estimation model is a pre-trained model for dynamic plane fitting.
[0073] As a specific implementation, a first weight is determined based on the distance between the first feature point and the corresponding boundary of the first model block; a second weight is determined based on the distance between the second feature point and the corresponding boundary of the second model block; a third weight is determined based on the distance between the first matching point and the boundary of the second model block; and a fourth weight is determined based on the distance between the second matching point and the boundary of the first model block, including:
[0074] According to the formula determining the first weight;
[0075] According to the formula determining the second weight;
[0076] According to the formula determining the third weight;
[0077] According to the formula determining the fourth weight;
[0078] Wherein, λ represents the first parameter for controlling the attenuation rate, W represents the width of the first overlapping area, k1 represents the first weighting coefficient, k2 represents the second weighting coefficient, α represents the weakening coefficient, and d A1 represents the distance between the first feature point and the boundary of the corresponding first model block, d B1 represents the distance between the second feature point and the boundary of the corresponding second model block, d A2 represents the distance between the first matching point and the boundary of the second model block, d B2 Represents the distance between the second matching point and the boundary of the first model block.
[0079] It should be noted that the first weighting coefficient, the second weighting coefficient, the first parameter, and the weakening coefficient, etc., can be values pre-determined based on prior knowledge. Of course, these values can also be adjusted in real time based on actual conditions, and this is not limited here. As an example, the weakening coefficient can be determined based on the results of a distance ratio test, where a smaller distance ratio indicates a more reliable match. Furthermore, as can be seen from the calculation formulas for the third and fourth weights, a smaller weakening coefficient corresponds to a smaller weight value.
[0080] It should be noted that in the above specific implementation, on the one hand, when calculating the first weight and the second weight, an exponential decay function is used so that the weight of the feature point closer to the boundary decays faster, that is, the closer the feature point is to the boundary, the smaller the weight is, and the weaker the constraint on the fitting plane is. This is to better align the collective features of the area near the boundary more naturally. On the other hand, the third weight and the fourth weight are proportional to the distance between the matching point and the boundary of the other model block (the model block where the feature point corresponding to the matching point is located). In this way, the farther the matching point is from the boundary of the other model block (the closer it is to the center of the other model block), the greater the weight is. In this way, the geometric shape can be naturally transitioned. On the other hand, since the (first / second) matching points are usually affected by noise, occlusion, etc., the reliability is affected. Therefore, when determining the third weight and the fourth weight, a weakening coefficient is introduced to reduce the weight of the matching point and increase the credibility of the feature point. In this way, the impact of the unreliability of the matching point on the fitting result can be effectively reduced.
[0081] As an optional implementation, step 405 includes:
[0082] Projecting the vertices of the triangular mesh in the first overlapping area onto the fitting plane to obtain projection points corresponding to each of the vertices; and splicing the first model block and the second model block based on the projection points.
[0083] Among them, one effect of the above optional implementation is as follows Figure 7 As shown, by projecting the vertices of the triangular mesh of the first model block and the vertices of the triangular mesh of the second model block in the first overlapping area onto the fitting plane respectively, so that the projection points are used as the vertices of the new triangular meshes of the first model block and the second model block in the first overlapping area, the vertices of the first model block and the second model block in the first overlapping area can completely coincide with each other. In this way, on the one hand, the geometry of the first model block and the second model block is made consistent, solving the problem as follows Figure 2 The position of the grid shown cannot be aligned, which makes it look abrupt. Secondly, it solves the problem of not doing boundary processing when merging model blocks, which causes problems such as Figure 1 As shown, gaps will be generated, affecting the aesthetics.
[0084] As an optional implementation, step 401 includes:
[0085] An initial overlapping area of the first model block and the second model block is obtained; wherein the width of the initial overlapping area can be preset.
[0086] When the density of the vertices of the triangular mesh within the initial overlapping region is less than a preset density threshold, the initial overlapping region is widened to obtain the first overlapping region, wherein the density of the vertices within the first overlapping region is greater than or equal to the density threshold. Specifically, first, the width of the first overlapping region should not be greater than the preset width threshold; second, the vertex density = the number of vertices in the overlapping region / the area of the overlapping region; third, widening the width of the initial overlapping region means increasing the width of the overlapping region according to a preset width change gradient (e.g., 0.5 mm / time). For example, if the width of the initial overlapping region is 5 mm, the width after the first widening is 5.5 mm.
[0087] Here, it should be noted that, since the overlapping area is an area close to the boundary of the two (first / second) model blocks, the (first / second) model blocks have relatively few vertices in the overlapping area, and the closer to the center of the (first / second) model block, the more vertices there are. Therefore, if the number of vertices extracted in the initial overlapping area is relatively small (such as less than the density threshold), the overlapping area can be widened toward the center of the (first / second) block so that the vertices in the widened overlapping area can reach greater than or equal to the density threshold. Among them, the more vertices there are in the overlapping area, the more feature points and matching points that can be obtained subsequently, which makes the accuracy of plane fitting based on feature points and matching points higher.
[0088] Furthermore, as mentioned above, when merging model blocks, if only the boundaries are widened, Figure 9 As shown, the colors between the two model blocks have a sense of boundary, and there will be Figure 3 Therefore, after step 405, the method further includes: adjusting the brightness of each triangular mesh in the first overlapping area, wherein the brightness of the first model block and the second model block in the adjusted first overlapping area can be smoothly transitioned, so that the color from the first model block to the second model block (or from the second model block to the first model block) can be smoothly transitioned (as shown in FIG. Figure 10 Based on this, a specific determination method for adjusting the brightness of each triangular mesh in the first overlapping area, or in other words, after step 405, the method further includes:
[0089] In the first overlapping area, obtain a first average brightness value of the first model block, a second average brightness value of the second model block, a first distance between the midpoint of each triangular mesh of the first model block and the boundary of the second model block, and a second distance between the midpoint of each triangular mesh of the second model block and the boundary of the first model block; wherein the second distance is schematically shown as follows Figure 11 shown.
[0090] The colors of the triangular meshes are transitionally adjusted using the first distance, the second distance, the width of the first overlapping area, the first average brightness value, and the second average brightness value. A specific implementation example of this step is: for each triangular mesh in the first model block, the adjusted brightness value = the first average brightness value + (first distance / width of the first overlapping area) * (second average brightness value - first average brightness value); similarly, for the triangular meshes in the second model block, the adjusted brightness value = the second average brightness value + (second distance / width of the first overlapping area) * (first average brightness value - second average brightness value).
[0091] The boundary fusion method in the above-mentioned embodiment of the present application solves the geometric inconsistency problem in the overlapping boundary areas through a plane fitting method based on feature matching. The color transition method also solves the color inconsistency problem. Ultimately, it significantly improves the visual quality and overall effect of the modeling results, and solves the boundary discontinuity and visual artifacts problems existing in the prior art.
[0092] Next, combine Figure 5 , the implementation process of the boundary fusion method of the embodiment of the present application is explained.
[0093] Step 501, block overlap area adjustment. This step specifically includes: setting the initial overlap width, determining the vertex density of the overlap area, and if the density is less than the set threshold, widening the boundary so that the final overlap area does not exceed the maximum overlap width. Figure 6 Wherein, the vertices are the vertices of the triangle meshes in the first model block and the second model block, and the vertex density = the number of vertices in the overlapping area / the area of the overlapping area.
[0094] Step 502, dynamic plane fitting. This step specifically includes: first, in the overlapping area, feature point extraction is performed on the texture image on the three-dimensional grid in the two blocks. And through the image search algorithm, matching points are found in the other block. In particular, the matching range is limited to a rectangular frame centered on the feature point and set to a certain value as the side length to improve efficiency and accuracy. Secondly, the weights of each feature point and matching point are calculated, wherein the weight calculation method can refer to the calculation formulas of the first weight, the second weight, the third weight and the fourth weight mentioned above, which will not be repeated here. Again, the above points (feature points and matching points) are dynamically plane fitted in the 3D space, specifically using the coordinate positions and weights of the feature points and matching points as input, and using the weighted least squares estimation method to improve the fitting accuracy. Among them, as Figure 7 As shown, the gray points are feature points, the black points are matching points, and the curve represents the fitting plane.
[0095] Step 503: Vertex position fitting. This step specifically includes: re-projecting the vertices of the triangles on the overlapping area mesh onto the fitting plane, and using the positions of the projection points as new vertices. Figure 8 shown.
[0096] Step 504: smooth color transition. This step specifically includes: first, calculating the average brightness value x of block A in the overlapping area and the average brightness value y of block B. Second, adjusting the color of the textures on each grid in the overlapping area and assigning them new brightness values. The color adjustment process includes: taking the midpoint of the grid triangle, calculating the distance h from the triangle to the boundary (e.g., Figure 11 For the triangle mesh on block A: the new brightness value = x + (distance from the midpoint of the triangle to the boundary B / width of the overlapping area) (yx); for the triangle mesh on block B: the new brightness value = y + (distance from the midpoint of the triangle to the boundary A / width of the overlapping area) (xy). The effect before and after color adjustment is shown in the figure below. Figure 9 and Figure 10 shown.
[0097] The embodiment of the present application provides a boundary fusion device, such as Figure 12 Shown, including:
[0098] A first acquisition module 1201 is used to acquire a first overlapping area of a first model block and a second model block to be spliced;
[0099] A second acquisition module 1202 is configured to acquire, in the first overlapping area, at least one first feature point of the first model block and at least one second feature point of the second model block;
[0100] A third acquisition module 1203 is configured to acquire, within the first overlapping region, first matching points on the second model block corresponding to each of the first feature points, and second matching points on the first model block corresponding to each of the second feature points;
[0101] A fitting module 1204 is configured to perform dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane;
[0102] The splicing module 1205 is configured to splice the first model block and the second model block based on the fitting plane.
[0103] Wherein, the device further includes:
[0104] a first determining module, configured to determine a first weight based on a distance between the first feature point and a corresponding boundary of the first model block; determine a second weight based on a distance between the second feature point and a corresponding boundary of the second model block; determine a third weight based on a distance between the first matching point and the boundary of the second model block; and determine a fourth weight based on a distance between the second matching point and the boundary of the first model block;
[0105] The fitting module 1204 includes:
[0106] A fitting submodule is used to perform dynamic plane fitting on the first feature point, the second feature point, the first matching point and the second matching point according to the first weight, the second weight, the third weight and the fourth weight to obtain a fitting plane.
[0107] The first determining module includes:
[0108] The first determination submodule is used to determine the determining the first weight;
[0109] The second determination submodule is used to determine the determining the second weight;
[0110] The third determination submodule is used to determine the determining the third weight;
[0111] The fourth determination submodule is used to determine the determining the fourth weight;
[0112] Wherein, λ represents the first parameter for controlling the attenuation rate, W represents the width of the first overlapping area, k1 represents the first weighting coefficient, k2 represents the second weighting coefficient, α represents the weakening coefficient, and d A1represents the distance between the first feature point and the boundary of the corresponding first model block, d B1 represents the distance between the second feature point and the boundary of the corresponding second model block, d A2 represents the distance between the first matching point and the boundary of the second model block, d B2 Represents the distance between the second matching point and the boundary of the first model block.
[0113] The splicing module 1205 includes:
[0114] a projection submodule, configured to project vertices of the triangular mesh within the first overlapping area onto the fitting plane to obtain projection points corresponding to the respective vertices;
[0115] A splicing submodule is used to splice the first model block and the second model block based on the projection point.
[0116] The first acquisition module 1201 includes:
[0117] An acquisition submodule, configured to acquire an initial overlapping area between the first model block and the second model block;
[0118] A widening submodule is used to widen the initial overlapping area to obtain the first overlapping area when the density of the vertices of the triangular mesh in the initial overlapping area is less than a preset density threshold, wherein the density of the vertices in the first overlapping area is greater than or equal to the density threshold.
[0119] Wherein, the device further includes:
[0120] a fourth acquisition module, configured to acquire, in the first overlapping area, a first average brightness value of the first model block, a second average brightness value of the second model block, a first distance between a midpoint of each triangular mesh of the first model block and a boundary of the second model block, and a second distance between a midpoint of each triangular mesh of the second model block and a boundary of the first model block;
[0121] An adjustment module is configured to perform transition adjustment on the color of each of the triangular meshes by using the first distance, the second distance, the width of the first overlapping area, the first average brightness value, and the second average brightness value.
[0122] It should be noted here that the above-mentioned boundary fusion device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned boundary fusion method embodiment, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0123] An embodiment of the present application also provides a boundary fusion device, including a transceiver 1310, a processor 1300, a memory 1320, and a program stored on the memory 1320 and executable on the processor 1300; wherein, when the processor 1300 executes the program, the boundary fusion method described above is implemented.
[0124] The transceiver 1310 is configured to receive and send data under the control of the processor 1300 .
[0125] Among them, Figure 13 In the present disclosure, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits such as one or more processors represented by processor 1300 and memory represented by memory 1320. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and are not further described herein. The bus interface provides an interface. The transceiver 1310 may be a plurality of components, including a transmitter and a receiver, providing a means for communicating with various other devices over a transmission medium.
[0126] The processor 1300 is responsible for managing the bus architecture and general processing, and the memory 1320 can store data used by the processor 1300 when performing operations.
[0127] The present application also provides a readable storage medium having a program stored thereon. When the program is executed by a processor, the boundary fusion method described above is implemented and the same technical effect is achieved. To avoid repetition, the details are not described here. The readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course, by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for executing the methods described in each embodiment of the present application.
[0129] Therefore, an embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the boundary fusion method described above and can achieve the same technical effect. To avoid repetition, they will not be described here.
[0130] In embodiments of the present application, modules can be implemented in software so that they can be executed by various types of processors. For example, an identified executable code module can include one or more physical or logical blocks of computer instructions, for example, which can be constructed as objects, processes, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different locations, which, when logically combined together, constitute the module and achieve the specified purpose of the module.
[0131] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed in the middle of different programs, and distributed across a plurality of memory devices.Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form.Described operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0132] When a module can be implemented using software, given the current state of hardware technology, those skilled in the art can build corresponding hardware circuits to implement the corresponding functions of the module, regardless of cost. The hardware circuits may include conventional very large scale integration (VLSI) circuits or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules may also be implemented using programmable hardware devices, such as field programmable gate arrays, programmable array logic, or programmable logic devices.
[0133] The above exemplary embodiments are described with reference to the accompanying drawings. Many different forms and embodiments are possible without departing from the spirit and teachings of this application. Therefore, this application should not be construed as limited to the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided so that this application will be complete and impartial and will convey the scope of this application to those skilled in the art. In the drawings, component sizes and relative sizes may be exaggerated for clarity. The terminology used herein is for purposes of describing specific exemplary embodiments only and is not intended to be limiting. As used herein, unless the context clearly indicates otherwise, the singular forms "a," "an," and "the" are intended to encompass such plural forms. It will be further understood that the terms "comprising" and / or "including," when used in this specification, indicate the presence of the stated features, integers, steps, operations, components, and / or elements, but do not preclude the presence or addition of one or more other features, integers, steps, operations, components, elements, and / or groups thereof. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of that range and any subranges therebetween.
[0134] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A boundary fusion method, characterized in that: include: Acquire a first overlapping area of the first model block and the second model block to be spliced; In the first overlapping area, obtaining at least one first feature point of the first model block and at least one second feature point of the second model block; In the first overlapping area, obtaining a first matching point on the second model block corresponding to each of the first feature points, and obtaining a second matching point on the first model block corresponding to each of the second feature points; Perform dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane; Based on the fitting plane, the first model block and the second model block are spliced.
2. The method according to claim 1, characterized in that The method further comprises: Determine a first weight based on the distance between the first feature point and the corresponding boundary of the first model block; determine a second weight based on the distance between the second feature point and the corresponding boundary of the second model block; determine a third weight based on the distance between the first matching point and the boundary of the second model block; and determine a fourth weight based on the distance between the second matching point and the boundary of the first model block; The step of performing dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane includes: Dynamically plane fitting is performed on the first feature point, the second feature point, the first matching point, and the second matching point according to the first weight, the second weight, the third weight, and the fourth weight to obtain a fitting plane.
3. The method according to claim 2, characterized in that Determine a first weight based on the distance between the first feature point and the corresponding boundary of the first model block; determine a second weight based on the distance between the second feature point and the corresponding boundary of the second model block; and determine a third weight based on the distance between the first matching point and the boundary of the second model block; and determining a fourth weight according to the distance between the second matching point and the boundary of the first model block, including: According to the formula determining the first weight; According to the formula determining the second weight; According to the formula determining the third weight; According to the formula determining the fourth weight; Wherein, λ represents the first parameter for controlling the attenuation rate, W represents the width of the first overlapping area, k1 represents the first weighting coefficient, k2 represents the second weighting coefficient, α represents the weakening coefficient, and d A1 represents the distance between the first feature point and the boundary of the corresponding first model block, d B1 represents the distance between the second feature point and the boundary of the corresponding second model block, d A2 represents the distance between the first matching point and the boundary of the second model block, d B2 Represents the distance between the second matching point and the boundary of the first model block.
4. The method according to claim 1, wherein Based on the fitting plane, stitching the first model block and the second model block includes: Projecting the vertices of the triangular mesh in the first overlapping area onto the fitting plane to obtain projection points corresponding to the respective vertices; Based on the projection point, the first model block and the second model block are spliced.
5. The method according to claim 1, wherein Obtaining the overlapping area of the first model block and the second model block to be spliced, including: Obtaining an initial overlapping area of the first model block and the second model block; When the density of the vertices of the triangular mesh in the initial overlapping area is less than a preset density threshold, the initial overlapping area is widened to obtain the first overlapping area, wherein the density of the vertices in the first overlapping area is greater than or equal to the density threshold.
6. The method according to claim 1, characterized in that The method further comprises: In the first overlapping area, obtaining a first average brightness value of the first model block, a second average brightness value of the second model block, a first distance between a midpoint of each triangular mesh of the first model block and a boundary of the second model block, and a second distance between a midpoint of each triangular mesh of the second model block and a boundary of the first model block; The colors of the triangular meshes are transitionally adjusted using the first distance, the second distance, the width of the first overlapping area, the first average brightness value, and the second average brightness value.
7. A boundary fusion device, characterized in that: include: A first acquisition module is used to acquire a first overlapping area of a first model block and a second model block to be spliced; a second acquisition module, configured to acquire, in the first overlapping area, at least one first feature point of the first model block and at least one second feature point of the second model block; a third acquisition module, configured to acquire, within the first overlapping area, first matching points on the second model block corresponding to each of the first feature points, and to acquire second matching points on the first model block corresponding to each of the second feature points; a fitting module, configured to perform dynamic plane fitting based on the first feature point, the second feature point, the first matching point, and the second matching point to obtain a fitting plane; A splicing module is used to splice the first model block and the second model block based on the fitting plane.
8. A boundary fusion device comprising a transceiver, a processor, a memory, and a program stored in the memory and executable on the processor; characterized in that: When the processor executes the program, the boundary fusion method according to any one of claims 1 to 6 is implemented.
9. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the boundary fusion method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the boundary fusion method according to any one of claims 1 to 6.