Flattening method and device for live-action three-dimensional model

By calculating and optimizing the tight boundary sphere data of the building, and using the principal component analysis model to process vector differences and creating a crop plane, the shape distortion problem of the three-dimensional model when viewed at different angles is solved, achieving a more accurate and complete model display.

CN119809921AActive Publication Date: 2025-04-11湖北省国土测绘院 +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411856766.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

Existing three-dimensional models are prone to shape distortion or visual distortion when viewed from different angles, especially in complex terrain or dense building complexes, resulting in some parts not being correctly seen.

Method used

By calculating the tight boundary ball data of the building, and optimizing the final boundary ball data based on the hierarchical surround ball algorithm, introducing the principal component analysis model correction error, normalizing the vector difference, creating a crop plane using the normalized vector, and loading it into the Cesium scene to achieve model flattening.

Benefits of technology

Improve the accuracy and visual effects of the model, reduce the occurrence of shape distortion, and ensure the integrity and correctness of the model when viewed from different angles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809921A_ABST
    Figure CN119809921A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of three-dimensional model flattening, and discloses a real-scene three-dimensional model flattening method and device, and the method comprises the steps: S1, selecting a building, obtaining the model data of the building from a server, and analyzing the model data into a JavaScript object array arr1; s2, calculating tight boundary sphere data of the building, optimizing final boundary sphere data based on a hierarchical bounding sphere algorithm, and recording a sphere center in the boundary sphere data; s3, calculating a component difference of a building contour point relative to a sphere center, introducing a principal component analysis model, correcting an error, and carrying out normalization processing to obtain a vector difference; and S4, creating a cutting plane by using the normalized vector, loading the cutting plane into a Cesium scene to realize model flattening, more accurately constructing a bounding ball on each layer, and adjusting the radius and the center position of the bounding ball, so that the bounding ball can be more closely attached to the building model, and the calculation result can better reflect the real characteristics of the building.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional model flattening, and in particular to a method and device for flattening a real-scene three-dimensional model. Background Art

[0002] In the process of architectural design and urban planning, it is necessary to perform 3D modeling of buildings and urban environments to intuitively display design solutions and planning effects. However, when displaying the internal structure of buildings and information on stratification and household division, existing 3D models may not meet the needs. For example, in urban planning, it is necessary to understand the functional divisions and space utilization in different buildings. For complex 3D models, if they cannot be effectively processed, it will affect the accurate acquisition of this information.

[0003] And with the increasing requirements for 3D model applications, the refined processing of models has become an inevitable trend. It is necessary not only to accurately represent the shape and structure of the model, but also to be able to handle various complex scenes, such as solving shape distortion, occlusion and other problems. This requires the development of new algorithms and technologies to meet these requirements.

[0004] In the existing technology, when the three-dimensional model is observed from different angles, especially when observed from an inclined angle or a non-orthogonal direction, shape distortion or visual distortion will occur. In addition, in dense buildings or complex terrain, buildings will block each other, resulting in some parts not being able to be correctly seen. Therefore, a method and device for flattening a real-life three-dimensional model are proposed to solve the above problems. Summary of the invention

[0005] The main purpose of the present invention is to provide a method and device for flattening a real-scene three-dimensional model to solve the problems raised in the above background.

[0006] A method for flattening a real-scene three-dimensional model, the method comprising the following implementation steps:

[0007] S1: Select a building and get its model data from the server, parsing it into a JavaScript object array arr1;

[0008] S2: Calculate the tight bounding sphere data of the building, optimize the final bounding sphere data based on the hierarchical bounding sphere algorithm, and record the center point of the sphere in the bounding sphere data;

[0009] S3: Calculate the component difference of the building contour point relative to the sphere center, introduce a principal component analysis model, correct the error and normalize the vector difference;

[0010] S4: Use the normalized vectors to create a clipping plane and load it into the Cesium scene to flatten the model.

[0011] In S1, the user selects a building to be flattened in the map application, and the platform sends a request to the server to obtain the model data of the building and returns it in JSON format.

[0012] In S1, the model data of the building includes the range information and height information of the building, and the received JSON data is parsed using the JSON.parse method in JavaScript to convert it into a JavaScript object array arr1, which contains multiple 3D Cartesian coordinate points x, y, z on the building outline).

[0013] In S2, the implementation process of calculating the tight bounding sphere data of the building is:

[0014] Construct a tight bounding sphere containing a list of 3D Cartesian points using the data in arr1;

[0015] Calculate the maximum and minimum values ​​of the vertices of the 3D model in the X, Y, and Z directions to obtain a bounding box consisting of 8 vertices. Take the center of the bounding box as the center point of the bounding sphere, calculate the distances from all vertices to the center point, and take the maximum value as the radius of the bounding sphere.

[0016] Calculate the two points with the longest distance in the X, Y, and Z directions, use the three longest distances as the diameter, and the center point of the three distances as the center of the sphere. Traverse all vertices in turn to determine whether each vertex is in the bounding sphere. If not, update the bounding sphere to obtain a series of boundary sphere data.

[0017] The process of optimizing the final bounding sphere is as follows:

[0018] Set the final bounding sphere in the bounding sphere data to B, its radius to R, its center to C, and its vertex to P. Divide the bounding sphere into L levels, from the outermost to the innermost, they are 1st, 2nd, and L respectively;

[0019] The u-th layer of bounding sphere construction: (u=1, 2, L);

[0020] Vertex screening is performed. For the uth layer, vertices are screened according to the distance from the vertex to the center of the sphere. The distance threshold is set to T, where the value of T decreases with the increase of the level. Only the vertex set V that satisfies d(C, P)≤Td(C, P)≤T is retained, where d(C, P) represents the distance from the vertex P to the center of the sphere C. The bounding sphere is constructed using the screened vertex set V as the data source;

[0021] For the u-th bounding sphere, the radius is readjusted according to the distance from the vertex to the center of the sphere, and an adjustment coefficient α is defined, where (0<α<1). The original radius is represented by R, and the adjusted radius is:

[0022] At the same time, the center position is readjusted according to the distance from the vertex to the center of the sphere. Based on the coordinates (x, y, z), the coordinates of the adjusted center position are:

[0023] Among them, i is the index variable, w i is the position adjustment coefficient,

[0024] Finally, record the center point of the boundary sphere.

[0025] In S3, the center point center of the bounding sphere is used to traverse arr1, calculate the component difference between each 3D Cartesian point and center, and update arr1 to obtain the component difference array arr1 between the current model point and the center of the bounding sphere;

[0026] Perform principal component analysis on the data in arr1;

[0027] First, calculate the covariance matrix Q of the data, and let the i-th point in arr1 be Then the element Q of the covariance matrix Q is jk The calculation formula is:

[0028] in, is the mean of the j-th dimension, is the mean of the kth dimension, s ij is the jth point in arr1, s ik is the kth point in arr1;

[0029] Get the eigenvalues ​​and corresponding eigenvectors of the covariance matrix Q, sort the eigenvectors according to the size of the eigenvalues, select the first m eigenvectors as the principal component directions, project each point in arr1 onto the principal component direction, obtain the projected point, calculate the component difference between the projected point and the center of the bounding sphere center, update the result and store it in arr1, and obtain the new current model point and the bounding sphere center component difference array arr1;

[0030] Use the remainder method to loop the new arr1, connect the last point to the first point to form a closed loop, get the next point of each 3D Cartesian point according to the index, and store it in array arr2. Perform the same traversal and update process on arr2 to get the next model point and the center of the bounding sphere component difference array arr2;

[0031] Traverse arr1 and arr2 at the same time, calculate the vector difference of the two array elements at the same index, store it in array arr3, and get the vector difference array arr3;

[0032] Normalize each vector in arr3 and convert it into a unit vector. Each vector in arr3 will be replaced by its corresponding unit vector, the direction of each vector remains unchanged, and the length becomes 1.

[0033] In S4, a unit vector tmp(0, 0, 1) is constructed to represent the direction perpendicular to the ground, arr3 is traversed, a cross multiplication operation is performed, a normal vector perpendicular to the ground is obtained, and the normal vector is stored in the array Plane;

[0034] Use the normal vector in Plane and the maximum distance from the center of the sphere to the model vertex to create a clipping plane and construct a clipping plane matrix in the format of:

[0035] [plane[1], distance1, plane[2], distance2,..., plane[n], distancen];

[0036] Where n represents the index;

[0037] Load the clipping plane matrix into the Cesium scene and use the functions provided by Cesium to flatten the oblique photography 3D model, adjusting the sign of the distance to change the clipping behavior as needed.

[0038] A device for flattening a real-scene three-dimensional model, comprising:

[0039] Model data acquisition module: selects a building and obtains its model data from the server, parsing it into a JavaScript object array arr1;

[0040] Tight bounding sphere construction module: Use the naive algorithm and Ritter algorithm to calculate the tight bounding sphere of the building and record the center point of the sphere;

[0041] Vector processing module: calculates the component difference of the building contour point relative to the sphere center and normalizes the obtained vector difference;

[0042] Plane creation application module: Use normalized vectors to create clipping planes and load them into the Cesium scene to flatten the model.

[0043] The present invention has the following beneficial effects:

[0044] 1. In the present invention, by optimizing the final bounding sphere, dividing the bounding sphere into multiple levels, more accurately constructing the bounding sphere at each level and adjusting its radius and center position, the bounding sphere can fit the building model more closely, which improves the basic accuracy of subsequent calculations. For example, when calculating operations such as component difference, it can be based on a more accurate bounding sphere center and range.

[0045] 2. In the present invention, by introducing the PCA model to calculate the component difference, the main features of the data can be better extracted, and the processed vectors are used to create a clipping plane, which is loaded into the Cesium scene to achieve model flattening, reducing the influence of noise and irrelevant information in the data. By projecting the data onto the principal component direction to calculate the component difference, the obtained component difference can better reflect the essential characteristics of the model, improve the rationality and accuracy of vector processing, and thus help to create a clipping plane more accurately. Due to the improvement of the bounding sphere accuracy and the rationality of vector processing, the clipping plane finally created can flatten the model more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is an overall flow chart of a method and device for flattening a real-scene three-dimensional model of the present invention;

[0047] Figure 2 The present invention is a device module block diagram of a method and device for flattening a real-scene three-dimensional model. DETAILED DESCRIPTION

[0048] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.

[0049] Embodiment 1

[0050] Please refer to Figure 1 to Figure 2 As shown, a method for flattening a real-scene three-dimensional model includes the following implementation steps:

[0051] S1: Select a building and get its model data from the server, parsing it into a JavaScript object array arr1;

[0052] S2: Calculate the tight bounding sphere data of the building, optimize the final bounding sphere data based on the hierarchical bounding sphere algorithm, and record the center point of the sphere in the bounding sphere data;

[0053] S3: Calculate the component difference of the building contour point relative to the sphere center, introduce a principal component analysis model, correct the error and normalize the vector difference;

[0054] S4: Use the normalized vectors to create a clipping plane and load it into the Cesium scene to flatten the model.

[0055] In S1, the user selects the building that needs to be flattened in the map application, and the platform sends a request to the server to obtain the model data of the building and returns it in JSON format.

[0056] In S1, the model data of the building includes the range information and height information of the building, and the received JSON data is parsed using the JSON.parse method in JavaScript and converted into a JavaScript object array arr1, which contains multiple 3D Cartesian coordinate points x, y, z on the outline of the building.

[0057] Furthermore, this step provides an intuitive way for users to select the buildings to be processed, ensures accurate building model data for subsequent processing steps, and converts the raw data into a format that can be directly processed by the program.

[0058] In S2, the implementation process of calculating the tight bounding sphere data of the building is:

[0059] Construct a tight bounding sphere containing a list of 3D Cartesian points using the data in arr1;

[0060] Calculate the maximum and minimum values ​​of the vertices of the 3D model in the X, Y, and Z directions to obtain a bounding box consisting of 8 vertices. Take the center of the bounding box as the center point of the bounding sphere, calculate the distances from all vertices to the center point, and take the maximum value as the radius of the bounding sphere.

[0061] Calculate the two points with the farthest distance in the X, Y, and Z directions, use the ranges with the three farthest distances as the diameter, and the center points of the three distances as the center of the sphere. Traverse all vertices in turn to determine whether each vertex is in the bounding sphere. If not, update the bounding sphere to obtain a series of boundary sphere data.

[0062] Furthermore, this step ensures that there is a tight sphere enclosing the entire building model, simplifying subsequent geometric calculations and providing a reference point for geometric transformations in subsequent steps.

[0063] The process of optimizing the final bounding sphere is:

[0064] Set the final bounding sphere in the bounding sphere data to B, its radius to R, its center to C, and its vertex to P. Divide the bounding sphere into L levels, from the outermost to the innermost, they are 1st, 2nd, and L respectively;

[0065] The u-th layer of bounding sphere construction: (u=1, 2, L);

[0066] Vertex screening is performed. For the uth layer, vertices are screened according to the distance from the vertex to the center of the sphere. The distance threshold is set to T, where the value of T decreases with the increase of the level. Only the vertex set V that satisfies d(C, P)≤Td(C, P)≤T is retained, where d(C, P) represents the distance from the vertex P to the center of the sphere C. The bounding sphere is constructed using the screened vertex set V as the data source;

[0067] For the u-th bounding sphere, the radius is readjusted according to the distance from the vertex to the center of the sphere, and an adjustment coefficient α is defined, where (0<α<1). The original radius is represented by R, and the adjusted radius is:

[0068] At the same time, the center position is readjusted according to the distance from the vertex to the center of the sphere. Based on the coordinates (x, y, z), the coordinates of the optimized center position are:

[0069] Among them, i is the index variable, w i is the position adjustment coefficient,

[0070] Finally, record the center point of the boundary sphere.

[0071] In S3, use the center point center of the bounding sphere to traverse arr1, calculate the component difference between each 3D Cartesian point and center, and update arr1 to obtain the component difference array arr1 between the current model point and the center of the bounding sphere;

[0072] Perform principal component analysis on the data in arr1;

[0073] First, calculate the covariance matrix Q of the data, and let the i-th point in arr1 be

[0074] Then the element Q of the covariance matrix Q is jk The calculation formula is:

[0075] in, is the mean of the j-th dimension, is the mean of the kth dimension, s ij is the jth point in arr1, s ik is the kth point in arr1;

[0076] Get the eigenvalues ​​and corresponding eigenvectors of the covariance matrix Q, sort the eigenvectors according to the size of the eigenvalues, select the first m eigenvectors as the principal component directions, project each point in arr1 onto the principal component direction, obtain the projected point, calculate the component difference between the projected point and the center of the bounding sphere center, update the result and store it in arr1, and obtain the new current model point and the bounding sphere center component difference array arr1;

[0077] Use the remainder method to loop the new arr1, connect the last point to the first point to form a closed loop, get the next point of each 3D Cartesian point according to the index, and store it in array arr2. Perform the same traversal and update process on arr2 to get the next model point and the center of the bounding sphere component difference array arr2;

[0078] Traverse arr1 and arr2 at the same time, calculate the vector difference of the two array elements at the same index, store it in array arr3, and get the vector difference array arr3;

[0079] Normalize each vector in arr3 and convert it into a unit vector. Each vector in arr3 will be replaced by its corresponding unit vector, the direction of each vector remains unchanged, and the length becomes 1.

[0080] Furthermore, this step ensures that the positional relationship of each point relative to the center of the sphere is correctly calculated, ensures that the contour points form a closed loop, ensures the integrity of the model, and converts the vector into a unit vector to facilitate subsequent geometric calculations.

[0081] In S4, a unit vector tmp(0, 0, 1) is constructed to represent the direction perpendicular to the ground. Then arr3 is traversed and a cross multiplication operation is performed to obtain the normal vector perpendicular to the ground and store it in the array Plane.

[0082] Use the normal vector in Plane and the maximum distance from the center of the sphere to the model vertex to create a clipping plane and construct a clipping plane matrix in the format of:

[0083] [plane[1], distance1, plane[2], distance2,..., plane[n], distancen];

[0084] Where n represents the index;

[0085] Load the clipping plane matrix into the Cesium scene and use the functions provided by Cesium to flatten the oblique photography 3D model, adjusting the sign of the distance to change the clipping behavior as needed.

[0086] Furthermore, this step obtains the normal vector perpendicular to the ground, which is used to create the clipping plane and ensure that the clipping plane can correctly cut the model, thereby using the clipping plane to achieve the flattening of the model.

[0087] The overall process of the method is as follows: first, S1 allows the user to select the building to be processed in the map application, so as to improve the intuitiveness and convenience of user operation, obtain the building model data from the server, ensure that the data is the latest and verified accurate data, parse the data in JSON format into JavaScript object array arr1, ensure that the processed data is the latest and accurate, and facilitate subsequent geometric calculations, and then proceed to S2 to calculate the tight bounding sphere data of the building, and optimize the final bounding sphere data based on the hierarchical bounding sphere algorithm for subsequent geometric calculations, and record the center point center of the bounding sphere as a reference point for subsequent calculations to ensure that the bounding sphere can be tightly Densely surround the entire building model to reduce the errors in subsequent calculations, then proceed to S3, calculate and process the vectors, calculate the component difference of the building contour points relative to the center of the sphere, and introduce a principal component analysis model. After correcting the error, the vector difference is normalized to obtain the positional relationship of the model contour relative to the center of the sphere, and the obtained vector difference is normalized to obtain a unit vector for subsequent geometric calculations to ensure that all vectors are in the same direction. Finally, proceed to S4, create and apply a clipping plane, use the normalized vector to create a clipping plane, ensure that the plane can correctly cut the model, load the clipping plane into the Cesium scene, and use the functions provided by Cesium to flatten the model.

[0088] Embodiment 2

[0089] Please refer to Figure 1 to Figure 2 As shown, based on the first embodiment, a device for flattening a real-scene three-dimensional model includes:

[0090] Model data acquisition module: selects a building and obtains its model data from the server, parsing it into a JavaScript object array arr1;

[0091] Tight bounding sphere construction module: calculates the tight bounding sphere data of the building, optimizes the final bounding sphere data based on the hierarchical bounding sphere algorithm, and records the center point of the sphere in the bounding sphere data;

[0092] Vector processing module: Calculate the component difference of the building contour point relative to the sphere center, introduce a principal component analysis model, correct the error and normalize the vector difference;

[0093] Plane creation application module: Use normalized vectors to create clipping planes and load them into the Cesium scene to flatten the model.

[0094] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for flattening a real-scene three-dimensional model, characterized in that: The method comprises the following implementation steps: S1: Select a building and get its model data from the server, parsing it into a JavaScript object array arr1; S2: Calculate the tight bounding sphere data of the building, optimize the final bounding sphere data based on the hierarchical bounding sphere algorithm, and record the center point of the sphere in the bounding sphere data; S3: Calculate the component difference of the building contour point relative to the sphere center, introduce a principal component analysis model, correct the error and normalize the vector difference; S4: Use the normalized vectors to create a clipping plane and load it into the Cesium scene to flatten the model.

2. The method for flattening a real-scene three-dimensional model according to claim 1, characterized in that: In S1, the user selects a building to be flattened in the map application, and the platform sends a request to the server to obtain the model data of the building and returns it in JSON format.

3. The method for flattening a real-scene three-dimensional model according to claim 1, characterized in that: In S1, the model data of the building includes the range information and height information of the building, and the received JSON data is parsed using the JSON.parse method in JavaScript and converted into a JavaScript object array arr1, which contains multiple 3D Cartesian coordinate points (x, y, z) on the outline of the building.

4. The method for flattening a real-scene three-dimensional model according to claim 1, characterized in that: In S2, the implementation process of calculating the tight bounding sphere data of the building is: Construct a tight bounding sphere containing a list of 3D Cartesian points using the data in arr1; Calculate the maximum and minimum values ​​of the vertices of the 3D model in the X, Y, and Z directions to obtain a bounding box consisting of 8 vertices. Take the center of the bounding box as the center point of the bounding sphere, calculate the distances from all vertices to the center point, and take the maximum value as the radius of the bounding sphere. Calculate the two points with the farthest distance in the X, Y, and Z directions, use the ranges with the three farthest distances as the diameter, and the center points of the three distances as the center of the sphere. Traverse all vertices in turn to determine whether each vertex is in the bounding sphere. If not, update the bounding sphere to obtain a series of boundary sphere data.

5. The method for flattening a real-scene three-dimensional model according to claim 1, characterized in that: The process of optimizing the final bounding sphere is as follows: Set the final bounding sphere in the bounding sphere data to B, its radius to R, its center to C, and its vertex to P. Divide the bounding sphere into L levels, from the outermost to the innermost, they are 1st, 2nd, and L respectively; The u-th layer of bounding sphere construction: (u=1, 2, L); Vertex screening is performed. For the uth layer, vertices are screened according to the distance from the vertex to the center of the sphere. The distance threshold is set to T, where the value of T decreases with the increase of the level. Only the vertex set V that satisfies d(C, P)≤Td(C, P)≤T is retained, where d(C, P) represents the distance from the vertex P to the center of the sphere C. The bounding sphere is constructed using the screened vertex set V as the data source; For the u-th bounding sphere, the radius is readjusted according to the distance from the vertex to the center of the sphere, and an adjustment coefficient α is defined, where (0<α<1). The original radius is represented by R, and the adjusted radius is: At the same time, the center position is readjusted according to the distance from the vertex to the center of the sphere. Based on the coordinates (x, y, z), the coordinates of the optimized center position are: Among them, i is the index variable, w i is the position adjustment coefficient, Finally, record the center point of the boundary sphere.

6. The method for flattening a real-scene three-dimensional model according to claim 1, characterized in that: In S3, the center point center of the bounding sphere is used to traverse arr1, calculate the component difference between each 3D Cartesian point and center, and update arr1 to obtain the component difference array arr1 between the current model point and the center of the bounding sphere; Perform principal component analysis on the data in arr1; First, calculate the covariance matrix Q of the data, and let the i-th point in arr1 be Then the element Q of the covariance matrix Q is jk The calculation formula is: in, is the mean of the jth dimension, is the mean of the kth dimension, s ij is the jth point in arr1, s ik is the kth point in arr1; Get the eigenvalues ​​and corresponding eigenvectors of the covariance matrix Q, sort the eigenvectors according to the size of the eigenvalues, select the first m eigenvectors as the principal component directions, project each point in arr1 onto the principal component direction, obtain the projected point, calculate the component difference between the projected point and the center of the bounding sphere center, update the result and store it in arr1, and obtain the new current model point and the bounding sphere center component difference array arr1; Use the remainder method to loop the new arr1, connect the last point to the first point to form a closed loop, get the next point of each 3D Cartesian point according to the index, and store it in array arr2. Perform the same traversal and update process on arr2 to get the next model point and the center of the bounding sphere component difference array arr2; Traverse arr1 and arr2 at the same time, calculate the vector difference of the two array elements at the same index, store it in array arr3, and get the vector difference array arr3; Normalize each vector in arr3 and convert it into a unit vector. Each vector in arr3 will be replaced by its corresponding unit vector, the direction of each vector remains unchanged, and the length becomes 1.

7. The method for flattening a real-scene three-dimensional model according to claim 1, characterized in that: In S4, a unit vector tmp(0, 0, 1) is constructed to represent the direction perpendicular to the ground, arr3 is traversed, a cross multiplication operation is performed, a normal vector perpendicular to the ground is obtained, and the normal vector is stored in the array Plane; Use the normal vector in Plane and the maximum distance from the center of the sphere to the model vertex to create a clipping plane and construct a clipping plane matrix in the format of: [plane[1], distance1, plane[2], distance2,..., plane[n], distancen]; Where n represents the index; Load the clipping plane matrix into the Cesium scene and use the functions provided by Cesium to flatten the oblique photography 3D model, adjusting the sign of the distance to change the clipping behavior as needed.

8. A device for flattening a real-scene three-dimensional model according to any one of claims 1 to 7, characterized in that: include: Model data acquisition module: selects a building and obtains its model data from the server, parsing it into a JavaScript object array arr1; Tight bounding sphere construction module: Use the naive algorithm and Ritter algorithm to calculate the tight bounding sphere of the building and record the center point of the sphere; Vector processing module: calculates the component difference of the building contour point relative to the sphere center and normalizes the obtained vector difference; Plane creation application module: Use normalized vectors to create clipping planes and load them into the Cesium scene to flatten the model.

Citation Information

Patent Citations

  • Three-dimensional scene local area dynamic flattening method and device based on flattening bounding ball

    CN112927351A

  • Terrain drawing method for visible cutting of complex scene

    CN116563504A

  • Urban building height extraction method considering different terrain scenes

    CN117932333A

  • System and method for extracting and measuring shapes of objects having curved surfaces with a vision system

    WO2022082069A1