Web-based interactive structural plane extraction method, geological logging method and system
By using a web-based interactive structural surface extraction method, combined with 3D visualization and AI image segmentation technology, the problems of measurement error in traditional geological logging methods and large computational load and weak generalization ability of automated recognition algorithms are solved. This achieves efficient and accurate structural surface extraction and logging, improving the efficiency and reliability of geological logging.
Patent Information
- Application Number
- CN202511096340.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-12-19
AI Technical Summary
Traditional geological logging methods suffer from large measurement errors, high difficulty in fieldwork, and are time-consuming and labor-intensive. Existing automated identification algorithms have high computational requirements and weak generalization ability in large-scale point cloud data, resulting in insufficient reliability of identification results and difficulty in efficiently and accurately processing massive point cloud data.
A web-based interactive structural surface extraction method is adopted, which combines 3D visualization and AI image segmentation technology. Interactive image segmentation is performed through the SAM model to generate a high-precision segmentation mask matrix and calculate 3D coordinates. The Suzuki-Abe and Douglas-Peucker algorithms are combined to simplify the 2D contours. Finally, the efficient extraction and standardized cataloging of structural surfaces are achieved on the web platform.
It improves the accuracy and efficiency of geological logging, and has the advantages of platform independence, lightweight deployment, real-time collaboration and efficient visualization. It supports cross-platform use and significantly improves the efficiency and accessibility of geological logging.
Smart Images

Figure CN121170099A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of water conservancy and hydropower engineering construction geological logging, more specifically, it relates to an interactive structural plane extraction method, a geological logging method and a system based on Web. BACKGROUND
[0002] Water conservancy and hydropower engineering construction geological work needs to collect the geological conditions exposed during construction, verify and review the results of previous geological exploration, predict and forecast possible geological problems, conduct engineering geological evaluation, and propose engineering treatment measures and optimization design suggestions. Geological logging is a process of recording geological phenomena on the excavation surface one by one after the formation of the excavation surface using large-scale mapping no less than 1:500, text description, photography, video recording, etc. Geological logging is an essential work in the construction process of water conservancy and hydropower engineering.
[0003] Traditional geological logging work mainly relies on manual work. First, the geological personnel need to select the measurement station in the construction site; then use a tape measure and a compass to aim and orient the measurement points; then draw these measurement points on the drawing, and based on the measured measurement points, draw the trace lines; finally, based on the measurement results, measure the occurrence of the logging content, and use text and symbols for annotation, thereby obtaining the geological logging drawing. The traditional logging method is limited by the topographic conditions, and there are some problems: ① Due to the measurement error of the measurement points, the measurement accuracy and reliability of the geological logging are uncontrollable. ② The on-site geological personnel often work in a corner of the excavation surface for logging, and when the range is large, they cannot see the overall condition of the excavation surface, which affects the logging effect. ③ The geological personnel need to work on site until the logging is completed, which increases the difficulty of on-site work and safety hazards. ④ When the logging range is large, new measurement points need to be added constantly, which is time-consuming and labor-intensive.
[0004] In recent years, with the development of computer vision, the use of visual geological logging technology to improve geological logging work has also emerged. Although it has been greatly improved compared to traditional methods, there are still some problems: ① Current direct reliance on three-dimensional tunnel models or bottom maps formed after original image registration and splicing for logging work completely depends on manual logging and is time-consuming. ② There are some algorithms for automatic recognition of structural surfaces, mainly based on three-dimensional point clouds, which group structural surfaces by calculating point cloud normal vectors. However, when the point cloud size is too large (more than one million points), the calculation of structural surface detection in massive point cloud data is very time-consuming, and existing three-dimensional point cloud structural surface extraction methods are difficult to efficiently and accurately process massive point cloud data. ③ With the widespread application of deep learning in image recognition, some research institutions have trained structural surface recognition models based on private data sets, achieving automatic labeling of structural surfaces in point clouds or images. However, due to the significant differences in morphology, scale, and texture of geological structures in different scenarios, the trained deep models have weak generalization ability, making it difficult to generalize to unknown scenarios or different engineering areas, lacking universality, and unable to calculate the three-dimensional coordinates of structural surfaces. ④ Current AI-based structural surface recognition algorithms still have high false detection and missed detection rates in actual engineering, and the reliability of the recognition results is insufficient, often requiring manual secondary review and correction, resulting in limited efficiency and actual engineering value of automatic recognition.
[0005] Therefore, in order to further promote the precision and intelligent development of water conservancy and hydropower geological logging technology, it is urgent to explore and introduce more advanced automatic geological logging methods. SUMMARY
[0006] The purpose of the present application is to provide a Web-based interactive structural surface extraction method, geological logging method and system to solve at least one aspect of the prior art. The present application integrates three-dimensional visualization, AI image segmentation and other technologies to achieve efficient extraction and standardized logging of geological structures, improving the accuracy and efficiency of geological work.
[0007] To achieve the above purpose, the first aspect of the present application provides a Web-based interactive structural surface extraction method, comprising the following steps: Loading a real scene three-dimensional model on a web platform; Rendering key frames on the real scene three-dimensional model and obtaining a two-dimensional image of the current view, denoted as , ; Inputting the two-dimensional image into SAM (Segment Anything Model) for interactive image segmentation to generate a high-precision segmentation mask matrix of the current point-selected structural surface; When the Mask can represent the structure surface data of the corresponding area, the saving command is triggered actively, the mask data is saved, the three-dimensional coordinates of the two-dimensional mask are calculated, the three-dimensional coordinates are connected into a line element and added to the three-dimensional scene, and the extraction of the structure surface is completed.
[0008] Further, the interactive image segmentation comprises the following steps: extracting the embedded features of the two-dimensional image; In the interactive process of the web platform, the mouse pointer is positioned and hovered over the specific area of the structure surface of the target Mesh model, and when it is detected that the continuous stationary hovering state of the mouse pointer over the specific area of the structure surface reaches a predetermined delay threshold, the canvas content of the overlayCanvas is cleared, and the calculation of the image pixel coordinates (pu, pv) of the corresponding two-dimensional view from the screen pixel coordinates (px, py) of the mouse pointer is automatically triggered and input as the prompt point coordinates into the SAM; The SAM generates the Mask in combination with the embedded features and the prompt point coordinates; Based on the Mask, the picture of the size, the canvas overlayCanvas draws the picture in proportion, and the mask result is superimposed and displayed on the web platform interface.
[0009] Further, the calculation formula of the coordinates (pu, pv) is as follows: In the formula, width and height of the canvas overlayCanvas, respectively.
[0010] Further, the saving of the mask data comprises the following steps: extracting a two-dimensional contour mask from the Mask based on the Suzuki-Abe algorithm; simplifying the two-dimensional contour mask based on the Douglas-Peucker algorithm, and transforming the coordinates (u, v) of all points in the two-dimensional contour mask to screen pixel coordinates (x, y), whose calculation formula is as follows: ; mapping the screen pixel coordinates (x, y) to the three-dimensional standard device coordinate space of the WebGL standard, and normalizing x and y to the interval [-1, 1], whose calculation formula is as follows: ; In the formula, width and height of the canvas overlayCanvas, respectively. The point is projected as a ray passing through the position in the three-dimensional scene by a camera matrix of a perspective camera object, for ray intersection with the real three-dimensional model, to calculate the three-dimensional coordinates.
[0011] Further, the method further comprises the following steps: performing three-dimensional geometric analysis on the structural surface extraction result, determining the structural surface inclination and dip angle by using a plane fitting technique, and extracting the occurrence parameter.
[0012] In a second aspect, the application provides a Web-based interactive geological logging method, comprising the structural surface extraction method in any of the above aspects, and further comprising the following steps: fitting a rectangular projection plane; projecting the extracted structural surface boundary to the rectangular projection plane, calculating the minimum bounding rectangle of the structural surface by MBR, and determining the structural surface type according to the length-width ratio of the minimum bounding rectangle; generating a two-dimensional vector graph and a logging base map according to the structural surface type; superimposing the two-dimensional vector graph and the logging base map to export a logging map.
[0013] Further, the method of generating a two-dimensional vector graph comprises the following steps: if the structural surface is a planar structural surface, projecting the three-dimensional coordinates of the structural surface to the rectangular projection plane; if the structural surface is a linear structural surface, calculating a spatial three-dimensional circular surface corresponding to the linear structural surface according to the center, normal vector and trace length of the linear structural surface, and then calculating the intersection line of the circular surface and the rectangular projection plane as the projection of the structural surface on the projection plane.
[0014] Further, the method of generating a logging base map comprises the following steps: constructing a set of orthogonal camera parameters with the center of the rectangular projection plane as the projection visual angle center and the normal vector of the fitting plane as the visual line direction: the camera position is set at a certain distance in the normal direction of the rectangle; the camera orientation is the normal vector of the rectangle; the camera upward direction is set as the vector of the direction of the width of the rectangle in the three-dimensional space; the projection horizontal range is [-W / 2, W / 2] and the vertical range is [-H / 2, H / 2], and W and H are the width and height of the rectangle, respectively; based on the orthogonal camera and the three-dimensional real scene model, projecting the three-dimensional real scene model onto a two-dimensional image in a perspective distortion-free manner by a renderer object to form a logging base map.
[0015] In a third aspect, the application provides a Web-based interactive geological logging system, comprising: a three-dimensional visualization module for loading a real scene three-dimensional model on a web platform; The structural surface extraction module is used for interactively extracting a structural surface in a geological image based on a prompt-driven deep learning image segmentation model SAM, generating a high-precision segmentation mask matrix Mask of the current point-selected structural surface, and calculating three-dimensional coordinates of a two-dimensional mask, connecting the three-dimensional coordinates into a line element and adding the line element to a three-dimensional scene to complete extraction of the structural surface. The logging map derivation module is used for fitting a rectangular projection plane based on the real scene three-dimensional model or the excavation surface design parameter, determining a projection mode of the structural surface by judging a structural surface type, and automatically projecting to generate a logging map with a base map.
[0016] In a fourth aspect, the present application provides an electronic device comprising a processor and a storage medium; the storage medium is used for storing a computer program; the processor is used for implementing the structural surface extraction method or the geological logging method when the computer program is executed.
[0017] In a fifth aspect, the present application provides a computer readable storage medium, wherein the storage medium stores a computer program; when the computer program is executed by a processor, the structural surface extraction method or the geological logging method is implemented.
[0018] Compared with the prior art, the present application has the following technical effects: Compared with the prior art, the present application has the following technical effects:
[0019] The method of the present application realizes structural surface extraction and map output based on a Web front end, has the advantages of platform independence, lightweight deployment, real-time collaboration and efficient visualization, etc. Compared with traditional desktop software, the efficiency and accessibility of geological logging are significantly improved. The method of the present application is based on a Web platform, and the system adopts a B / S architecture, supports cross-platform use, and users can complete structural surface logging work through a computer, a tablet or a mobile phone. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0021] Figure 1 A flowchart of a Web-based interactive structure surface extraction method and a geological logging method provided by the embodiments of the present application is shown in the figure. Figure 2 A structure diagram of a Web-based interactive geological logging system provided by the embodiments of the present application is shown in the figure. Figure 3 An interactive segmentation map provided by the embodiments of the present application is shown in the figure. Figure 4 A two-dimensional to three-dimensional map provided by the embodiments of the present application is shown in the figure. Figure 5 A logging map provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0022] In order to make the technical problems, technical solutions and beneficial effects of the present application more clearly understood, the present application will be further described in detail in combination with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0023] In the present application, the term "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the following cases: A exists alone, A and B exist together, and B exists alone. Wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0024] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0025] The first aspect of the embodiments of the present application provides a Web-based interactive structure surface extraction method, and the flow is as shown in the figure. Figure 1 The method comprises the following steps: Step one, real scene three-dimensional model loading: first, create a three-dimensional scene on the Web platform, and set the perspective camera object, renderer object, controller object, ambient light object and other scene elements. Then, create a canvas object overlayCanvas superimposed on the canvas of the three-dimensional scene. Among them, the height ,width of overlayCanvas is consistent with the three-dimensional scene canvas, and the mouse event of overlayCanvas is disabled. Finally, load the real scene three-dimensional model into the three-dimensional scene of the Web platform.
[0026] Step two, key frame rendering: the operator locates the clear and visible geological structure surface of the real scene model surface by manipulating the Web platform view (rotation, scaling, translation, etc.). Then disable the controller state, lock the current view angle, and render the scene key frame under the current view angle according to the perspective camera object in the current scene through the renderer object, obtain the two-dimensional image of the current view angle, and record its height and width as 、 .
[0027] Step three, interactive image segmentation: input the two-dimensional image into SegmentAnything Model (SAM) to extract its image embedding features. During the interactive process on the Web platform, the operator positions and hovers the mouse pointer over the specific area of the structure surface of the target Mesh model. When the continuous stationary hovering state of the mouse pointer over the specific area of the structure surface is detected to reach the predetermined delay threshold, the canvas content of overlayCanvas is cleared, and the following calculations are automatically triggered: The platform converts the screen pixel coordinates (px, py) of the mouse pointer into the image pixel coordinates (pu, pv) on the two-dimensional view, and inputs them as the hint point coordinates into SAM. The calculation formula is as follows: SAM generates a high-precision segmentation mask matrix Mask of the point-selected structure surface by combining the image embedding features and the hint point coordinates.
[0028] Based on Mask, generate a picture with a size of , and then the canvas overlayCanvas will draw the picture in the same proportion to realize the effect of superimposing the mask result on the Web platform interface.
[0029] In the formula, width and height are the width and height of the canvas overlayCanvas respectively.
[0030] Step four, two-dimensional to three-dimensional: when the operator determines that the mask can represent the structural surface data of the corresponding area, the save command is triggered actively, and the mask data is saved. Otherwise, the operator continues to find the structural surface data with the mouse or manually draws. The saving process of the mask data is as follows: First, the above-mentioned Mask is extracted based on the Suzuki-Abe algorithm to obtain a two-dimensional contour mask; then, the two-dimensional contour is simplified based on the Douglas-Peucker algorithm; then, the coordinates (u, v) of all points in the two-dimensional contour are transformed into screen pixel coordinates (x, y); the calculation formula is as follows: Then, the screen pixel coordinates (x, y) are mapped to the three-dimensional normalized device coordinates (NDC) space of the WebGL standard, wherein x and y are normalized to the interval [-1, 1]. The calculation formula is as follows: Subsequently, the point is projected as a ray passing through the position in the three-dimensional scene through the camera matrix of the perspective camera object, which is used for ray intersection with the real three-dimensional model, so as to calculate the three-dimensional coordinates of the two-dimensional mask. Then, the three-dimensional coordinates are connected into a line element and added to the three-dimensional scene, so as to complete the extraction of the structural surface. Finally, the controller state is activated, the current view angle is released, and the canvas content of the overlayCanvas is cleared.
[0031] Step five, repeat steps two to four to complete the extraction of all structural surfaces.
[0032] Step six, structural surface parameter extraction: the three-dimensional geometric analysis is performed on the above-mentioned structural surface extraction result, the point cloud center is calculated to determine the position of the structural surface, the concave hull algorithm is used to extract the boundary of the structural surface, and the maximum span thereof is taken as the trace length. Finally, the plane fitting technology is used to determine the inclination and dip angle of the structural surface, and the occurrence parameters are extracted.
[0033] By using the above technical scheme, the operation of extracting the structural surface is simplified, and only one click in the range of the structural surface is needed, and the marking and parameter extraction of the entire structural surface can be completed through AI automatic identification.
[0034] The second aspect of the embodiment of the application is based on the above-mentioned web-based interactive structural surface extraction method, and the embodiment of the application further provides a web-based interactive geological logging method, as shown in the flowchart Figure 1 The method comprises the following steps: Step seven: fitting a rectangular projection plane: if the design parameters of the excavation face are known, a rectangular projection plane is generated that can cover the geological phenomena of the excavation face. Otherwise, based on the real scene three-dimensional model, a rectangular projection plane is fitted. First, the real scene three-dimensional model is cropped to obtain the excavation face model, and statistical analysis is performed on the vertex set of the excavation face model. The principal component analysis (PCA) algorithm is used to estimate the best fitting plane, which takes the centroid of the point set as the center point and the direction of the principal axis with the smallest variance as the normal vector direction. Then, the three-dimensional point set is projected onto the fitted plane to form a two-dimensional projection point set. The Rotating Calipers geometric method is used to calculate the minimum circumscribed rectangle of the two-dimensional point set to ensure that the rectangle completely covers all the projection points, thereby obtaining the height H and width W of the rectangle.
[0035] Step eight: judging the type of structural surface: project the structural surface boundary extracted in steps four and five onto the rectangular projection plane, calculate the minimum circumscribed rectangle of the structural surface using the MBR, and judge the length-width ratio of the rectangle. According to the length-width ratio value of the minimum circumscribed rectangle, the type of the structural surface is determined: if the ratio is greater than the linear feature threshold, the structural surface is a linear structural surface; otherwise, the structural surface is a planar structural surface.
[0036] Step nine: generating vector graphics: for planar structural surfaces, their three-dimensional coordinates are directly projected onto the rectangular projection plane; for linear structural surfaces, a spatial three-dimensional circular surface corresponding to the linear structural surface is calculated based on the center, normal vector, and trace length of the linear structural surface, and then the intersection line of the circular surface and the rectangular projection plane is calculated as the projection of the structural surface on the projection plane, thereby generating two-dimensional vector graphics.
[0037] Step ten: generating a logging base map: taking the center of the above-mentioned rectangular projection plane as the projection view center and the normal vector of the fitted plane as the line-of-sight direction, a set of orthogonal camera parameters is constructed: the camera position is set at a certain distance in the normal direction of the rectangle; the camera orientation is the normal vector of the rectangle; the camera upward direction is set as the vector of the width direction of the rectangle in the three-dimensional space, which is used to determine the vertical direction of the image; the projection horizontal range is [-W / 2, W / 2], and the vertical range is [-H / 2, H / 2].
[0038] Based on the above-mentioned orthogonal camera and three-dimensional real scene model, the object is projected onto a two-dimensional image in a perspective distortion-free manner through a renderer to form a logging map.
[0039] Step eleven: exporting the logging map: the vector graphics and the logging base map are superimposed to form a logging map. The generated logging map has the characteristics of standardization, alignment, uniformity, and accurate size, which facilitates subsequent structural attribute analysis, text annotation, and archival storage.
[0040] Compared with the existing deep learning-based image recognition extraction structure surface, the structure surface obtained by the embodiment method of the present application has three-dimensional coordinates; compared with the traditional point cloud extraction structure surface, the embodiment method of the present application obtains the structure surface through GPU inference, which is more efficient.
[0041] The embodiment method of the present application adopts an interactive extraction mode, and compared with the existing AI recognition model which has poor generalization ability, the embodiment method of the present application uses a SAM model, has stronger universality, and has higher reliability of recognition results.
[0042] In the process of identifying the structure surface, the user locks the view angle, and renders a two-dimensional graph; after the identification is completed, the view angle control is released, and the three-dimensional interface is restored. The user seamlessly switches during the operation process, and has good visual experience and interactive effect.
[0043] The embodiment method of the present application realizes structure surface extraction and drawing output based on a Web front end, has advantages such as platform independence, lightweight deployment, real-time collaboration and efficient visualization. Compared with traditional desktop software, the efficiency and accessibility of geological logging are significantly improved. The embodiment method of the present application adopts a B / S architecture, supports cross-platform use, and users can complete structure surface logging work through a computer, a tablet or a mobile phone.
[0044] In a third aspect, the embodiment of the present application provides an interactive geological logging system based on Web, as shown in the structure Figure 2 The system includes the following core modules: A three-dimensional visualization module is used for loading a real scene three-dimensional model on a web platform; the three-dimensional visualization module is based on a Web platform and uses a THREEJS framework to load various types of data, including OBJ, 3DTiles, PLY, GLTF, LAS, etc., to build a virtual geological scene of the real scene three-dimensional model.
[0045] A structure surface extraction module is used for adopting a prompt-driven deep learning image segmentation model SAM, combining user operations, interactively extracting a structure surface in a geological image, generating a high-precision segmentation mask matrix of the current point-selected structure surface, calculating three-dimensional coordinates of the two-dimensional mask, connecting the three-dimensional coordinates into a linear feature and adding them to a three-dimensional scene, completing extraction of the structure surface, and thus realizing high-precision identification of the structure surface; the structure surface extraction module can output key parameters such as the position, size and occurrence of the structure surface; and A logging drawing export module is used for fitting a rectangular projection plane based on a real scene three-dimensional model or excavation face design parameters, determining a projection mode of the structure surface (linear or planar) by judging the type of the structure surface, and automatically projecting to generate a logging drawing with a base map.
[0046] In a fourth aspect of the embodiments of the present application, an electronic device is provided, comprising a processor and a storage medium; the storage medium is configured to store a computer program; and the processor is configured to implement the structural surface extraction method or the geological logging method described above when executing the computer program.
[0047] In a fifth aspect of the embodiments of the present application, a computer readable storage medium is provided, and the storage medium stores a computer program; when the computer program is executed by a processor, the structural surface extraction method or the geological logging method described above is implemented.
[0048] The following is an example of a Web-based interactive structural surface extraction method and a geological logging method according to an embodiment of the present application, which uses THREEJS as a three-dimensional rendering engine and adopts the following technical solutions: Step one, real scene three-dimensional model loading: first, create a THREEJS scene on a Web platform, and set scene elements such as a perspective camera object PerspectiveCamera, a renderer object WebGLRenderer, a controller object Control, an ambient light object, etc. Then, create a canvas object overlayCanvas overlaid on the THREEJS canvas. The height of the overlayCanvas is 1085, the width is 2133, consistent with the THREEJS canvas, and the mouse event of the overlayCanvas is disabled. Finally, load the real scene three-dimensional model into the THREEJS scene through the THREEJS framework.
[0049] Step two, key frame rendering: the operator locates the geological structure surface clearly visible on the surface of the real scene model by manipulating the view of the Web platform (rotation, scaling, translation, etc.). Then, disable the state of the controller Control, lock the current view angle, and according to the perspective camera object PerspectiveCamera in the current scene, render the key frame of the scene under the current view angle through the renderer object WebGLRenderer, obtain the two-dimensional image of the current view angle, and record its height and width as 976 and 1919 respectively.
[0050] Step three, interactive image segmentation: input the two-dimensional image into the SegmentAnything Model (SAM) to extract its image embedding features. During the interactive process on the web platform, the operator positions and hovers the mouse pointer over a specific area of the structure surface of the target mesh model. When the continuous stationary hovering state of the mouse pointer over the specific area of the structure surface is detected to reach the predetermined delay threshold of 50 milliseconds, the canvas content of the overlayCanvas is cleared, and the following calculations are automatically triggered: The platform converts the screen pixel coordinates (1356, 653) of the mouse pointer into image pixel coordinates (1219, 587) on the corresponding two-dimensional view and inputs them as the hint point coordinates into the SAM.
[0051] The SAM generates a high-precision segmentation mask matrix Mask of the point-selected structure surface based on the image embedding features and the hint point coordinates, and the dimension of the matrix is 1919x976.
[0052] Based on the Mask, a picture of 1919x976 size is generated, and then the canvas overlayCanvas draws the picture in the same proportion to achieve the effect of superimposing the mask result on the web platform interface. Thus, when the user uses the two-dimensional image segmentation technology to identify the structure surface on the web platform interface, he or she can obtain the visual experience of identifying on the three-dimensional model, and the final result is as shown in Figure 3
[0053] Step four, two-dimensional to three-dimensional: when the operator determines that the mask can represent the structure surface data of the corresponding area, he or she actively triggers the save event by clicking the left mouse button to save the mask data. First, the two-dimensional contour mask is extracted from the above-mentioned Mask based on the Suzuki-Abe algorithm; then, the two-dimensional contour is simplified based on the Douglas-Peucker algorithm; and then, the coordinates of all points in the two-dimensional contour are transformed into screen pixel coordinates. Taking the point (1465, 806) in the two-dimensional contour as an example, the screen pixel coordinates (1628, 896) are calculated.
[0054] After that, the screen pixel coordinate (1628, 896) is mapped to the WebGL standard three-dimensional normalized device coordinate (NDC) space, resulting in the coordinate (0.52, -0.65); then the point is projected as a ray passing through the position in the three-dimensional scene by the PerspectiveCamera camera matrix, which is used for ray intersection with the real three-dimensional model, so as to calculate the three-dimensional coordinates (524813.026244, 3598395.009155, 142.226942) of the two-dimensional mask. Connecting the three-dimensional coordinates into a line feature and adding it to the THREEJS scene completes the extraction of the structural surface. Finally, the controller Control state is activated, the current view angle is released, and the canvas content of the overlayCanvas is cleared. The final result is shown in Figure 4 .
[0055] Step five, repeat steps two to four to complete the extraction of all structural surfaces.
[0056] Step six, structural surface parameter extraction: perform three-dimensional geometric analysis on the above structural surface extraction results, first calculate the point cloud center to determine the structural surface position; then extract the structural surface boundary by the concave hull algorithm, and take its maximum span as the trace length. Finally, use the plane fitting technique to determine the structural surface inclination and dip angle, and extract the occurrence parameters.
[0057] Step seven, fitting rectangular projection plane: if the design parameters of the excavation surface are known, a rectangular projection plane that can cover the geological phenomena of the excavation surface is directly generated. Otherwise, based on the real three-dimensional model, a rectangular projection plane is fitted. First, the real three-dimensional model is cropped to obtain the excavation surface model, and statistical analysis is performed on the vertex set of the excavation surface model. The principal component analysis (PCA) algorithm is used to estimate the best fitting plane, which takes the centroid of the point set as the center point and the direction of the principal axis with the smallest variance as the normal vector direction. Then, the three-dimensional point set is projected onto the fitted plane to form a two-dimensional projection point set. The Rotating Calipers geometric method is used to calculate the minimum circumscribed rectangle of the two-dimensional point set to ensure that the rectangle completely covers all the projection points, thereby obtaining a rectangular projection plane with a height of 5.52 and a width of 41.28.
[0058] Step eight, judge the type of structural surface: after projecting the structural surface boundary to the rectangular projection plane, calculate the minimum circumscribed rectangle of the structural surface by MBR, and judge the length-width ratio of the rectangle: if the ratio is greater than the linear feature threshold, the structural surface is a linear structural surface; otherwise, the structural surface is a planar structural surface.
[0059] Step nine, generating vector graphics: for the planar structure surface, directly project its three-dimensional coordinates to the rectangular projection plane; for the linear structure surface, according to the center, normal vector and trace length of the linear structure surface, calculate the corresponding spatial three-dimensional circular surface of the structure surface, and then calculate the intersection line of the circular surface and the rectangular projection plane as the projection of the structure surface on the projection plane, thereby generating two-dimensional vector graphics.
[0060] Step ten, generating a catalog base map: taking the center of the above rectangular projection plane as the projection visual angle center, and taking the normal vector of the fitting plane as the visual line direction, a set of orthogonal camera parameters are constructed: The camera position is set at a certain distance in the rectangular normal direction; The camera orientation is the rectangular normal vector; The camera upward direction is set as the vector of the direction of the width of the rectangle in the three-dimensional space, which is used to determine the vertical direction of the image; The projection horizontal range is [-20.64, 20.64], and the vertical range is [-2.76, 2.76].
[0061] Based on the above orthogonal camera and three-dimensional real scene model, the two-dimensional image is completely projected on the two-dimensional image in a perspective distortion-free manner through the renderer object, forming a catalog map.
[0062] Step eleven: exporting the catalog map: superimpose the vector graphics and the catalog base map to form a catalog map, as shown in Figure 5 The generated catalog map has the characteristics of standardization, alignment, uniformity and size accuracy, which is convenient for subsequent structure attribute analysis, text annotation and archival storage.
[0063] The above examples only express several embodiments of the present application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent of the present application. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A web-based interactive structural surface extraction method, characterized in that, The method comprises the following steps: loading a real scene three-dimensional model on a web platform; The live-action three-dimensional model is rendered by key frames, and a two-dimensional image of a current view angle is obtained, denoted as , ; inputting the two-dimensional image into the SAM, performing interactive image segmentation, and generating a high-precision segmentation mask matrix of the current point selection structural surface; when the mask can represent the structural surface data of the corresponding area, triggering a save command, saving the mask data, and calculating the three-dimensional coordinates of the two-dimensional mask, connecting the three-dimensional coordinates into a line element and adding it to the three-dimensional scene to complete the extraction of the structural surface.
2. The web-based interactive structural surface extraction method of claim 1, wherein, The interactive image segmentation comprises the following steps: extracting the embedded features of the two-dimensional image; in the interactive process on the web platform, positioning and hovering the mouse pointer over a specific area of the structural surface of the target Mesh model, and when it is detected that the continuous stationary hovering state of the mouse pointer over the specific area of the structural surface reaches a predetermined delay threshold, clearing the canvas content of the overlayCanvas, and automatically triggering the calculation of the screen pixel coordinates (px, py) of the mouse pointer into the image pixel coordinates (pu, pv) on the corresponding two-dimensional view, and inputting the image pixel coordinates (pu, pv) as the prompt point coordinates into the SAM; the SAM generates the mask in combination with the embedded features and the prompt point coordinates; Based on the Mask, generate The picture of the size, canvas overlayCanvas etc. draw the picture in proportion, realize the mask result superimposed display in the web platform interface.
3. The Web-based interactive structural surface extraction method of claim 2, wherein, the calculation formula of the coordinates (pu, pv) is as follows: In the formula, width and height of the canvas overlayCanvas, respectively.
4. The web-based interactive structural surface extraction method of claim 1, wherein, the saving of the mask data comprises the following steps: extracting a two-dimensional contour mask from the mask based on the Suzuki-Abe algorithm; simplifying the two-dimensional contour mask based on the Douglas-Peucker algorithm, and transforming the coordinates (u, v) of all points in the two-dimensional contour mask to screen pixel coordinates (x, y), the calculation formula of which is as follows: ; mapping the screen pixel coordinates (x, y) to the three-dimensional standard device coordinate space of the WebGL standard, and normalizing x and y to the interval [-1, 1], the calculation formula of which is as follows: ; where, width and height of the canvas overlayCanvas, respectively; projecting the point as a ray passing through the position in the three-dimensional scene through the camera matrix of the perspective camera object, for ray intersection with the real scene three-dimensional model, and calculating the three-dimensional coordinates.
5. The web-based interactive structural surface extraction method of claim 1, wherein, further comprising the following steps: performing three-dimensional geometric analysis on the structural surface extraction result, and determining the structural surface inclination and dip angle by plane fitting technology to extract the occurrence parameters.
6. A Web-based interactive geological logging method, characterized by, The structural surface extraction method according to any one of claims 1-5 further comprises the following steps: fitting a rectangular projection plane; projecting the extracted structural surface boundary to the rectangular projection plane, calculating the minimum bounding rectangle of the structural surface through MBR, and judging the structural surface type according to the length-width ratio of the minimum bounding rectangle; generating a two-dimensional vector graphic and a logging base map according to the structural surface type; superimposing the two-dimensional vector graphic and the logging base map to export a logging map.
7. A Web-based interactive geological logging method as claimed in claim 6, c h a r a c t e r i z e d b y The generation of the two-dimensional vector graphic comprises the following steps: if the structural surface is a planar structural surface, projecting its three-dimensional coordinates to the rectangular projection plane; if the structural surface is a linear structural surface, calculating the corresponding spatial three-dimensional circular surface of the structural surface according to the center, normal vector and trace length of the linear structural surface, and then calculating the intersection line of the circular surface and the rectangular projection plane as the projection of the structural surface on the projection plane; and / or, The generating the base map comprises the following steps: A set of orthogonal camera parameters are constructed with the center of the rectangular projection plane as the projection visual angle center and the normal vector of the fitting plane as the visual line direction: the camera position is set at a certain distance in the normal direction of the rectangle; the camera orientation is the normal vector of the rectangle; the camera upward direction is set as the vector of the direction of the width of the rectangle in the three-dimensional space; the projection horizontal range is [-W / 2, W / 2] and the vertical range is [-H / 2, H / 2], and W and H are the width and height of the rectangle respectively; Based on the orthogonal camera and the three-dimensional real scene model, a two-dimensional image is formed by a renderer object in a perspective distortion-free manner, which is the base map.
8. A Web-based interactive geological logging system, characterized by, It comprises: A three-dimensional visualization module for loading a real scene three-dimensional model on a web platform; A structural surface extraction module for interactively extracting a structural surface in a geological image based on a prompt-driven deep learning image segmentation model SAM, generating a high-precision segmentation mask matrix Mask of the current point-selected structural surface, and calculating three-dimensional coordinates of the two-dimensional mask, connecting the three-dimensional coordinates into a line feature and adding it to a three-dimensional scene to complete the extraction of the structural surface; the structural surface extraction module can output the position, size and occurrence parameters of the structural surface; and A base map exporting module for fitting a rectangular projection plane based on the real scene three-dimensional model or the excavation surface design parameters, determining the projection mode of the structural surface by judging the type of the structural surface, and automatically projecting to generate a base map.
9. An electronic device, comprising: It comprises a processor and a storage medium; the storage medium is used to store a computer program; the processor is used to implement the structural surface extraction method according to any one of claims 1-5 or the geological logging method according to claim 6 or 7 when the computer program is executed.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by the processor, the structural surface extraction method according to any one of claims 1-5 or the geological logging method according to claim 6 or 7 is implemented.