Geological raster map vectorization method and related apparatus

CN123032846APending Publication Date: 2026-11-03WUHAN SURVEYING GEOTECHN RES INST OF MCC +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611220631.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing technologies, the vectorization of geological raster maps relies on manual operation, which is inefficient and cannot accurately distinguish geological elements, resulting in non-standard vectorization results. Furthermore, automated solutions cannot understand the semantic structure of geological maps.

Method used

By using color layering and coarse classification of geological elements, multiple color semantic channels and coarse classification results are obtained. Combined with fine classification, spatial registration and geological domain knowledge engine, multi-path parallel vectorization is performed, and the initial results are corrected to ensure the accuracy and efficiency of the vectorization results.

Benefits of technology

The entire process of geological raster map vectorization has been automated, improving efficiency, ensuring the accuracy and standardization of vectorization results, and avoiding reliance on manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123032846A_ABST
    Figure CN123032846A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of geological raster vectorization method and related device, belong to computer aided design technical field, wherein the geological raster vectorization method includes: color stratification and geological element rough classification are carried out to the geological raster to be processed, based on multiple color semantic channels and multiple rough classification results, fine classification is carried out, the uncertainty heat map of rough classification result is determined, scale line and coordinate number in the geological raster to be processed are identified based on fine classification result, pixel coordinates in the geological raster to be processed are paired with geological coordinates, space registration classification result and multiple color semantic channels are carried out multi-way parallel vectorization, obtain initial vectorization result, in combination with the geological field knowledge engine and uncertainty heat map of pre-set, initial vectorization result is revised, and target vectorization result is obtained.The present application can realize the automatic vectorization of raster geological map, and vectorization result is accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided design technology, and in particular to a method and apparatus for vectorizing geological raster images. Background Technology

[0002] Importing geological raster maps into CAD is a common requirement in the field of geological engineering. When importing into CAD, the geological raster maps need to be vectorized.

[0003] In existing technologies, most geological units rely on manual methods to depict geological elements on raster base maps element by element in CAD software. This is extremely inefficient, with a single geological map requiring several days of manual work. The work involves a high proportion of repetitive tasks, resulting in significant labor costs. Furthermore, different operators have inconsistent drawing standards and precision. The few available automatic vectorization solutions cannot understand the unique semantic structure of geological maps, only performing geometric tracing. They cannot distinguish between visually similar but semantically different elements such as stratigraphic boundaries, fault lines, and coordinate grid lines. Lacking geological knowledge constraints, the output results may violate geological common sense, and the output of purely data-driven models may also violate geological common sense.

[0004] It is evident that existing technologies rely on manual methods or cannot accurately distinguish geological elements in geological raster maps when vectorizing them, resulting in non-standard vectorization results. Summary of the Invention

[0005] In view of this, it is necessary to provide a method and related apparatus for vectorizing geological raster images to solve the problem that existing technologies rely on manual methods or cannot accurately distinguish geological elements in geological raster images when vectorizing them, resulting in non-standard vectorization results.

[0006] To address the aforementioned problems, in a first aspect, the present invention provides a method for vectorizing geological raster images, comprising: Color layering and coarse classification of geological elements are performed on the geological raster image to be processed to obtain multiple color semantic channels and multiple coarse classification results. Based on the multiple color semantic channels and multiple coarse classification results, fine classification is performed to obtain multiple fine classification results. A heatmap of uncertainty in the coarse classification results is determined. Based on the fine classification results, the scale lines and coordinate numbers in the geological raster image to be processed are identified. Based on the scale lines and coordinate numbers, the pixel coordinates in the geological raster image to be processed are paired with the geological coordinates to obtain the spatial registration and classification results. The spatial registration and classification results and multiple color semantic channels are vectorized in multiple parallel paths to obtain the initial vectorization result. The initial vectorization result is then corrected by combining the preset geological domain knowledge engine and uncertain heat map to obtain the target vectorization result.

[0007] In one possible implementation, the geological raster image to be processed is subjected to color layering and coarse classification of geological elements, resulting in multiple color semantic channels and multiple coarse classification results, including: The geological raster image to be processed is cropped by border, and the cropped geological raster image to be processed is multi-channel color layered in HSV color space to obtain four color semantic channels, which include black lines, magenta lithology, purple pink lithology and white background. The preset encoder is used to coarsely classify the pixels of the geological raster image to be processed into multiple coarse classification results, which include lines, text and symbols.

[0008] In one possible implementation, fine classification is performed based on multiple color semantic channels and multiple coarse classification results to obtain multiple fine classification results, including: The filling region in the raster image to be processed is determined based on the semantic channels of magenta core and purplish-pink lithology. The filling region is further subdivided into dotted lines, dashed lines, intersecting lines, wavy lines and solid lines based on the preset multimodal feature fusion network. Geometric features are used to subdivide lines into boundaries, faults, grids, and coordinate axes; The symbols are subdivided into attitude symbols and dip symbols using geometric patterns.

[0009] In one possible implementation, the scale lines and coordinate numbers in the geological raster image to be processed are identified based on the fine classification results. Then, the pixel coordinates in the geological raster image to be processed are paired with geological coordinates based on the scale lines and coordinate numbers to obtain spatial registration and classification results, including: Based on the position of the scale line in the geological raster image to be processed, locate the pixel coordinates of the scale line and extract the corresponding coordinate numbers of the scale line; Multiple models are used to pair pixel coordinates and coordinate numbers. The pairing result of the model with the smallest residual is retained to obtain the spatial registration and classification result.

[0010] In one possible implementation, multi-path parallel vectorization includes line feature vectorization, region vectorization, lithological pattern texture classification, and text recognition; multi-path parallel vectorization is performed on the spatial registration and classification results and multiple color semantic channels, including: The spatial registration and classification results are vectorized into line elements, classified into lithological patterns and textures, and recognized as text. The multi-color semantic channels are vectorized into regions.

[0011] In one possible implementation, the initial vectorization result is corrected by combining a pre-set geological knowledge engine and an uncertain heatmap to obtain the target vectorization result, including: A geological knowledge engine is constructed based on preset geological topological rules, which include non-self-intersection of stratigraphic boundaries, fault cutting order, non-overlapping lithological regions, stratigraphic sequence law, continuity of fold axes, orthogonality of faults and boundaries, and consistency of attitude. The initial vectorized results are checked for geological topological rules using a geological knowledge engine, and geological perception corrections are made based on the check results. In the process of making geological perception corrections to the initial vectorized results, high-risk areas are prioritized for correction in conjunction with an uncertainty heatmap.

[0012] In one possible implementation, the method also includes: Multiple automatic quality checks are performed on the target vectorization results, including coordinate accuracy, closure, topological consistency, feature integrity, area consistency, line accuracy, visual contrast, and optical character recognition accuracy. Based on the inspection results of multiple automatic quality checks, a difference overlay diagram and an uncertainty audit task list are generated. The difference overlay diagram and the uncertainty audit task list are then subject to manual interactive review to obtain the processing strategy for the difference overlay diagram and the uncertainty audit task list. The difference overlay diagram and the uncertainty audit task list are then processed based on the processing strategy.

[0013] Secondly, the present invention also provides a geological raster image vectorization device, comprising: The classification module is used to perform color layering and coarse classification of geological elements in the geological raster image to be processed, resulting in multiple color semantic channels and multiple coarse classification results. Based on the multiple color semantic channels and multiple coarse classification results, fine classification is performed to obtain multiple fine classification results. The matching module is used to determine the uncertainty heatmap of the coarse classification result, identify the scale lines and coordinate numbers in the geological raster image to be processed based on the fine classification result, and match the pixel coordinates in the geological raster image to be processed with the geological coordinates based on the scale lines and coordinate numbers to obtain the spatial registration classification result. The vectorization module is used to perform multi-path parallel vectorization of spatial registration and classification results and multiple color semantic channels to obtain initial vectorization results. Combined with a preset geological knowledge engine and uncertain heat map, the initial vectorization results are corrected to obtain the target vectorization results.

[0014] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, Memory, used to store programs; A processor, coupled to memory, is used to execute programs stored in memory to implement the steps in the geological raster vectorization method of any of the above implementations.

[0015] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the geological raster map vectorization method described above.

[0016] The beneficial effects of this invention are as follows: The geological raster image vectorization method provided by this invention performs color layering and coarse classification of geological elements in the geological raster image to be processed, obtaining multiple color semantic channels and multiple coarse classification results. Based on the multiple color semantic channels and multiple coarse classification results, fine classification is performed to obtain multiple fine classification results. The geological raster image to be processed is color-layered, and then vectorized according to the color semantic channels. The geological elements in the geological raster image are coarsely classified and then finely classified, resulting in a more detailed and accurate division of geological elements. By determining the uncertainty heatmap of the coarse classification results, the scale lines and coordinate numbers in the geological raster image to be processed are identified based on the fine classification results. Based on the scale lines and coordinate numbers, the pixel coordinates in the geological raster image to be processed are paired with geological coordinates to obtain spatial registration classification results. The uncertainty heatmap of the coarse classification results is determined to facilitate subsequent correction of the vectorization results. By pairing the pixel coordinates of geological elements with geological coordinates, spatial registration classification results are generated and used in the subsequent vectorization of geological elements. By performing multi-path parallel vectorization on the spatial registration and classification results and multiple color semantic channels, an initial vectorization result is obtained. Combined with a preset geological knowledge engine and an uncertain heat map, the initial vectorization result is corrected to obtain the target vectorization result. The multi-path parallel vectorization operation has higher efficiency in vectorizing geological raster images. Furthermore, by combining the geological knowledge engine and the uncertain heat map to correct the initial vectorization result, the accuracy of the vectorization result is ensured. This invention achieves full automation of the vectorization process of geological raster images, without relying on manual labor, and the vectorization result is accurate. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart illustrating the geological raster image vectorization method provided in this embodiment of the invention; Figure 2 A flowchart illustrating the coarse classification method provided in an embodiment of the present invention; Figure 3 A flowchart illustrating the fine classification method provided in an embodiment of the present invention; Figure 4A schematic flowchart of the spatial registration and classification method provided in an embodiment of the present invention; Figure 5 A schematic diagram of the spatial registration principle provided for an embodiment of the present invention; Figure 6 A schematic diagram illustrating the parallel vectorization principle provided in the embodiments of the present invention; Figure 7 A flowchart illustrating the vectorization method provided in an embodiment of the present invention; Figure 8 A flowchart illustrating the vectorization result correction method provided in this embodiment of the invention; Figure 9 This is a schematic diagram illustrating the principle of automatic QC inspection provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the structure of the geological raster image vectorization device provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] A specific embodiment of the present invention, such as Figure 1 As shown, a method for vectorizing geological raster images is disclosed, including: S101, perform color layering and coarse classification of geological elements on the geological raster image to be processed, and obtain multiple color semantic channels and multiple coarse classification results. Based on the multiple color semantic channels and multiple coarse classification results, perform fine classification to obtain multiple fine classification results.

[0024] In this embodiment of the invention, the geological raster image to be processed may be a scanned historical geological map in TIFF or JPEG format, with three color channels: red, green, and blue. First, the geological raster image to be processed is subjected to color layering in the HSV color space, aiming to generate a set of binary mask images with clear geological semantic guidance. Specifically, the image is first converted from the red-green-blue color space to the HSV space, that is, each pixel is described by three components: hue, saturation, and brightness. The reason for choosing the HSV space is that the color differences on geological maps essentially stem from geologists' perception of different hues, shades, and brightness. The HSV space separates color information from brightness information, making the extraction rules for specific colors unaffected by shadows or uneven lighting during the scanning process, thus exhibiting greater robustness. While color layering is performed, coarse classification of geological elements is conducted in parallel. The purpose of coarse classification is not to directly identify specific geological body categories, but rather to perform the most basic primitive type classification of all visual elements on the map. A deep convolutional neural network pre-trained on a large number of geological maps is used as the encoder to perform preliminary classification on each pixel of the input image. This encoder network adopts a classic encoder-decoder structure. Its encoding part extracts multi-scale features through continuous convolution and pooling operations, while the decoding part restores the original image resolution through upsampling and outputs a classification probability map of the same size as the input image. Finally, fine classification is performed based on multiple color semantic channels and multiple coarse classification results to obtain multiple fine classification results. The specific classification methods for coarse and fine classification will be described in detail later in this invention.

[0025] S102, determine the uncertainty heatmap of the coarse classification result, identify the scale lines and coordinate numbers in the geological raster image to be processed based on the fine classification result, and pair the pixel coordinates in the geological raster image to be processed with the geological coordinates based on the scale lines and coordinate numbers to obtain the spatial registration classification result.

[0026] In this embodiment of the invention, during the coarse classification stage, the encoder network outputs the confidence probability of each pixel belonging to that category along with the categories of lines, text, and symbols. For regions with ambiguous classification, such as areas where text and lines overlap densely or where symbols are incomplete due to dirt, the maximum category probability output by the model will be significantly lower. The complement of the maximum category probability for each pixel is taken (i.e., 1 minus the probability value), followed by spatial smoothing, to obtain a continuous grayscale image. In this image, areas with higher brightness represent greater uncertainty in the coarse classification, meaning these may be difficult areas for the model to accurately distinguish. This uncertainty heatmap will be saved as a key verification map for subsequent corrections by the knowledge engine, guiding correction resources to be prioritized where they are most needed.

[0027] Furthermore, spatial registration is a core preliminary step in geological map vectorization. It assigns each pixel a true geographic coordinate, making the vectorized results spatially usable, allowing direct retrieval of primitives marked as coordinate grid lines and coordinate numbers from the fine-classification results. Since fine-classification separates grid lines from other lines, a clean, interference-free grid line layer can be obtained. Hough transform line detection is applied to this layer to extract all grid line segments, and based on their inclination angle and spacing, they are automatically grouped into two mutually perpendicular families of parallel lines, corresponding to the grid in the longitude and latitude directions, respectively. By calculating the intersections of the two families of parallel lines, a series of regularly arranged grid intersections are obtained; these intersections are potential control points. Each intersection has precise pixel coordinates.

[0028] For coordinate numbers, the pixel regions marked as coordinate numbers in the fine classification results are extracted to form text blocks. These text blocks are fed into a convolutional recurrent neural network specifically trained for geological map coordinate numbers for recognition. This recognition engine can handle numbers with different fonts, angles, and formats including degrees, minutes, seconds, or decimals, outputting their corresponding values, such as "114°30′" or "30.5°". Then, by calculating the spatial relationship between each text block and its nearest grid intersection point, the recognized coordinate values ​​are paired one-to-one with the intersection points. For example, a number located on the left side of the map frame, adjacent to a horizontal grid line, can be inferred to be the latitude value represented by that horizontal grid line.

[0029] Through multiple such pairings, a set of control point pairs between pixel coordinates and geological coordinates is obtained. The pixel-level fine-classification label image is then transformed pixel by pixel into a geospatial coordinate system, resulting in a classification result with precise spatial reference, i.e., a spatial registration classification result. At this point, each sub-category label is no longer associated with an image location, but rather with a precise geographic coordinate.

[0030] S103 performs multi-path parallel vectorization on the spatial registration and classification results and multiple color semantic channels to obtain the initial vectorization result. Combined with the preset geological domain knowledge engine and uncertain heat map, the initial vectorization result is corrected to obtain the target vectorization result.

[0031] In this embodiment of the invention, based on the unique category code in the spatial registration classification result, the classification result is split. For example, all pixels in the category of "boundary" are extracted to form a "boundary" layer; all pixels in the category of "fault" are extracted to form a "fault" layer; pixels in the "magenta-dotted line filled lithological area" are extracted to form an independent lithological planar layer, and so on. This splitting can generate dozens or even hundreds of single-category binary raster layers. Then, a vector conversion engine is started on all the above layers simultaneously. For planar feature layers, such as various lithological filled areas, the engine uses a boundary tracing algorithm to search along the contours of connected regions to generate closed boundary lines. For linear feature layers, such as faults and coordinate grids, the engine executes a centerline extraction algorithm to generate vector lines with a single width. All processed vector polygons and lines are merged and superimposed to form an initial vectorized result. This result is quite perfect in terms of geometry and spatial location, completely reconstructing the pattern on the geological map. Furthermore, by combining a pre-set geological knowledge engine and an uncertain heat map, the initial vectorization result is corrected to obtain the target vectorization result. The correction process for the vectorization result will be described in detail later in this invention.

[0032] The geological raster image vectorization method provided by this invention involves color layering and coarse classification of geological elements in the geological raster image to be processed, resulting in multiple color semantic channels and multiple coarse classification results. Based on these multiple color semantic channels and coarse classification results, fine classification is then performed to obtain multiple fine classification results. The geological raster image to be processed is color-layered, and subsequently vectorized based on the color semantic channels. This process of coarse classification followed by fine classification of geological elements in the raster image results in a more detailed and accurate division of geological elements. By determining the uncertainty heatmap of the coarse classification results, the scale lines and coordinate numbers in the geological raster image to be processed are identified based on the fine classification results. Based on the scale lines and coordinate numbers, the pixel coordinates in the geological raster image to be processed are paired with geological coordinates to obtain spatial registration classification results. The determination of the uncertainty heatmap of the coarse classification results facilitates subsequent correction of the vectorization results. By pairing the pixel coordinates of geological elements with geological coordinates, spatial registration classification results are generated and used in the subsequent vectorization of geological elements. By performing multi-path parallel vectorization on the spatial registration and classification results and multiple color semantic channels, an initial vectorization result is obtained. Combined with a preset geological knowledge engine and an uncertain heat map, the initial vectorization result is corrected to obtain the target vectorization result. The multi-path parallel vectorization operation has higher efficiency in vectorizing geological raster images. Furthermore, by combining the geological knowledge engine and the uncertain heat map to correct the initial vectorization result, the accuracy of the vectorization result is ensured. This invention achieves full automation of the vectorization process of geological raster images, without relying on manual labor, and the vectorization result is accurate.

[0033] In some possible embodiments of the present invention, such as Figure 2 As shown, color layering and coarse classification of geological elements are performed on the geological raster image to be processed, resulting in multiple color semantic channels and multiple coarse classification results, including: S201, the border of the geological raster image to be processed is cropped, and the cropped geological raster image to be processed is multi-channel color layered in the HSV color space to obtain four color semantic channels, including black lines, magenta lithology, purple pink lithology and white background. S202, using a preset encoder, coarsely classifies the pixels of the geological raster image to be processed into multiple coarse classification results, including lines, text and symbols.

[0034] In this embodiment of the invention, to eliminate unnecessary information outside the image frame, such as blank spaces at the edge of the image, binding holes, scanner background, etc., automatic border cropping is performed on the geological raster image to be processed. By detecting large, continuous bright areas and long straight line segments at the image edges, the position of the inner image frame is identified, and the image is cropped along this frame to contain only the effective qualitative content. The cropped image serves as the basic input for all subsequent processing operations. Specifically, the four outermost strong straight lines are detected using Hough lines, with a minimum line length ≥ 60% of the image width, to obtain the cropped image.

[0035] Furthermore, for the color system of standard geological maps, four core color semantic channels are predefined: black line channel, magenta lithology channel, purplish-pink lithology channel, and white background channel. The black line channel is used to extract all linear elements and text presented in black or dark gray on the map. By setting a low-brightness, very low-saturation ellipsoidal threshold range in the HSV space, all black primitives such as geological boundaries, fault lines, coordinate grids, map frames, and annotation text can be completely captured in this channel. The magenta and purplish-pink lithology channels correspond to the two most common lithology fill color systems in geological maps. Magenta typically represents acidic intrusive rocks, such as granite; purplish-pink often represents metamorphic rocks or specific sedimentary layers. Adaptive color clustering centers are established for magenta and purplish-pink in the HSV space, and appropriate tolerance ranges are set in the three dimensions of hue, saturation, and brightness. Pixels falling within the corresponding tolerance area are activated, generating a binary mask representing the distribution area of ​​that type of lithology. The precise extraction of these two channels provides reliable spatial constraints for subsequent identification of lithological filling textures. The white background channel is used to extract blank areas on the map that are not filled with any color. Obtaining this channel is relatively simple; by setting a threshold range of high brightness and extremely low saturation, the white background can be separated. The role of the white background channel is to delineate the range of effective lithological information and exclude these meaningless areas during vectorization.

[0036] Furthermore, the geological elements in the geological raster image to be processed are coarsely classified. The coarse classification results include lines, text, and symbols. The line category includes all features that appear as lines, regardless of their geological meaning—whether they are geological boundaries, fault lines, or coordinate grid lines—as long as they visually appear as thin, continuous, or discontinuous strokes. The text category covers character labels at all scales on the map, such as stratigraphic codes, coordinate numbers, map titles, and scale descriptions. These characters have unique textures and stroke characteristics that distinguish them from lines and symbols. The symbol category encompasses various standardized geological symbols, such as the "T"-shaped symbol indicating stratigraphic occurrence, the circular symbol indicating borehole location, and specific geometric shapes indicating mineral types. The encoder outputs three independent probability maps, representing the confidence level of each pixel belonging to a line, text, or symbol. By setting a threshold, three binary masks, i.e., multiple coarse classification results, can be obtained. These three masks accurately identify the spatial distribution of lines, text, and symbols on the map.

[0037] The coarse classification operation in this embodiment of the invention is equivalent to initially separating the geological information carriers from the auxiliary explanatory elements and decorative symbols on the map, so that the subsequent fine processing can proceed in their own way. This effectively avoids common errors such as misjudging text outlines as geological body boundaries and misjudging filled texture lines as structural lines, and provides strong primitive type constraints for high-precision fine classification.

[0038] In some possible embodiments of the present invention, such as Figure 3 As shown, based on multiple color semantic channels and multiple coarse classification results, fine classification is performed to obtain multiple fine classification results, including: S301, based on the semantic channels of magenta core and purplish-pink lithology, the filling region in the raster image to be processed is determined, and based on the preset multimodal feature fusion network, the filling region is subdivided into dotted lines, dashed lines, intersecting lines, wavy lines and solid lines; S302 uses geometric features to subdivide lines into boundaries, faults, grids, and coordinate axes; S303 subdivides symbols into attitude symbols and dip symbols using geometric patterns.

[0039] In this embodiment of the invention, the binary masks of the magenta lithology semantic channel and the purplish-pink lithology semantic channel are merged to obtain a complete lithology-filled region mask. This mask precisely delineates all areas on the map filled with magenta or purplish-pink. Within this region, color can no longer further distinguish lithology because geological map standards stipulate that different rock types are represented by different filling textures within the same color system. These textures include dotted lines, dashed lines, intersecting lines, wavy lines, and solid fills. To identify these textures, a multimodal feature fusion network was designed. The network input consists of two parts: one is a local texture slice of the original cropped color image within the filled region, and the other is information about the line mask at the corresponding position provided by the coarse classification result. The network first extracts the texture features of the image and the geometric structure features of the line mask through two independent convolutional branches. The image texture branch can capture the periodicity of dotted lines, the discontinuity of dashed lines, the grid-like feel of intersecting lines, etc., while the line mask branch can provide information on the thickness, direction, and arrangement of the lines themselves. Subsequently, the network concatenates and fuses these two sets of features along the channel dimension, and uses a classification head composed of fully connected layers to determine the texture category of pixels or superpixel blocks within each filled region, ultimately outputting one of five categories: dotted lines, dashed lines, intersecting lines, wavy lines, or solid lines. This multimodal fusion approach allows the network to see both the texture appearance of the original image and understand the structural skeleton abstracted by the line mask, greatly improving the accuracy and robustness of texture recognition. For example, relying solely on image texture, dotted lines and extremely fine dashed lines may be difficult to distinguish, but by using the length and spacing of segments in the line mask, a correct judgment can be easily made.

[0040] Further, the geological semantics of line primitives are subdivided. In the coarse classification results, all lines are grouped into one category. However, in the fine classification stage, we need to further assign them geological meaning. By introducing geometric features, lines are subdivided into four categories: boundaries, faults, grids, and coordinate axes. In specific implementation, connected component analysis is performed on the line mask to extract each independent line skeleton. For each skeleton, a set of preset geometric features are calculated, including but not limited to line length, curvature, average width, parallelism with adjacent lines, whether it intersects with the bounding box, and whether it exhibits a regular, equidistant arrangement. Then, these geometric feature vectors are input into a trained lightweight gradient boosting tree classifier, which classifies the lines into one of the four categories based on the feature combinations.

[0041] Specifically, boundary lines typically appear as smooth, continuous curves, often closely matching the contours of lithologically filled areas; fault lines possess specific symbolic structures, such as thicker red or black solid lines, often accompanied by signs of displacement on both sides, geometrically manifesting as sharp local turns or being cut by other lines; grid lines exhibit the most significant spatial regularity, being mutually orthogonal and strictly equidistant, running through the entire map, and often adjacent to coordinate figures; coordinate axes are the thickened straight lines at the innermost layer of the map frame, coinciding with the edge of the frame and forming a closed rectangle. This geometrically based classifier can efficiently and accurately separate mixed lines according to geological processes, avoiding the serious error of mistaking coordinate grids for faults.

[0042] Further, the geological semantic subdivision of symbol primitives is performed. For the coarse classification results, geometric pattern matching is mainly used for further subdivision to distinguish the two most important geological symbols: attitude symbols and dip symbols. Attitude symbols are usually composed of a long line segment and a short line segment or triangle, presenting a "T" or "┴" shape; dip symbols are often composed of a number and a short straight line, representing the dip angle of rock strata or fault planes. Specifically, multiple standard templates for these two types of symbols can be pre-constructed. During fine classification, each independent connected region in the symbol mask is traversed, its outline and skeleton shape are extracted, and similarity matching is performed with the template library. At the same time, location context information, such as whether the symbol is adjacent to a geological boundary or whether it appears in pairs with an attitude symbol, is combined to comprehensively determine its final category. For successfully matched symbols, its category label and key geometric parameters are output, such as the direction and dip indication of the long line segment of the attitude symbol, and the numerical value of the dip symbol.

[0043] After completing the above detailed classification, a highly informative multi-category label map was obtained, representing multiple detailed classification results. In this label map, each pixel is assigned a unique semantic code, such as "black - boundary line", "black - fault line", "magenta - dotted line filling lithological zone", "purple pink - intersecting line filling lithological zone", "occurrence symbol", and "coordinate number".

[0044] In some possible embodiments of the present invention, such as Figure 4 As shown, based on the fine classification results, the scale lines and coordinate numbers in the geological raster image to be processed are identified. Based on the scale lines and coordinate numbers, the pixel coordinates in the geological raster image to be processed are paired with geological coordinates to obtain spatial registration and classification results, including: S401, locate the pixel coordinates of the scale line based on its position in the geological raster image to be processed, and extract the coordinate numbers corresponding to the scale line; S402 uses multiple models to pair pixel coordinates and coordinate numbers, retains the pairing result of the model with the smallest residual, and obtains the spatial registration and classification result.

[0045] In this embodiment of the invention, pixel coordinate positioning is performed based on the spatial location of the tick marks in the geological raster image to be processed. Since the aforementioned fine classification step has already accurately separated the coordinate grid lines from other line types, this step directly extracts all pixels marked as coordinate grid lines from the fine classification results. Connectivity analysis and skeletonization are performed on the layer to obtain the single-pixel width skeleton of each tick mark. These tick marks exhibit a regular, equally spaced, orthogonal arrangement in the image. By performing Hough transform line fitting on the skeleton line segments, the precise linear equation parameters of each tick mark are extracted, and they are automatically grouped into two line families: horizontal and vertical. For the line segments within each line family, their spatial order is calculated to determine the row and column index of each line in the grid system. Thus, the specific position of each tick mark in the image coordinate system, i.e., its pixel coordinates, is accurately determined.

[0046] Simultaneously, the coordinate numbers corresponding to these scale lines are extracted. In the fine classification results, the coordinate numbers are labeled as independent semantic categories. All connected regions labeled as coordinate numbers are traversed and cropped into individual text image blocks. These text blocks are fed into a convolutional recurrent neural network specifically designed for geological map coordinate annotation. This network can accurately identify different types of coordinate annotation formats, such as degree-minute-second formats, decimal degree formats, and special representations with subscripts and superscripts, and outputs the recognition results in numerical form. The recognized coordinate numbers and their spatial location information in the image are preserved. Multiple models are used to pair pixel coordinates and coordinate numbers, and the pairing result of the model with the smallest residual is retained. Specifically, for a geological raster map, several scale line intersections are distributed around its frame. The pixel coordinates of each intersection are known, while its corresponding geological coordinates are given by the nearest coordinate numbers. First, based on the principle of spatial proximity, the coordinate numbers are automatically associated with the nearest scale line intersection, forming several pairs of pixel coordinates and geological coordinate control points. Based on the control point pairs, affine transformation, polynomial transformation, and block affine transformation models are fitted respectively. The transformation model with the smallest residual is automatically selected through leave-one-out cross-validation. Specifically, for example... Figure 5 As shown, the tick marks are automatically extracted from the segmentation results, and the coordinate axis tick marks (such as "4250", "3550", etc.) are read through the built-in lightweight OCR submodule to construct control point pairs. Then, based on the number of control points, affine transformations (≥3 pairs), second-order polynomial transformations (≥6 pairs), and block affine transformations (≥10 pairs) are attempted sequentially. The RMSE of each model is calculated using leave-one-out cross-validation (LOOCV). A simple model priority strategy is adopted. If the RMSE of a simple model meets the threshold of <1.0, it is directly selected; otherwise, more complex models are tried sequentially. If the RMSE of all models exceeds the limit, an error is reported, and control points need to be manually added. Specifically, as shown in Tables 1 and 2.

[0047] Table 1: Control Point Pair Table

[0048] Table 2: Model Selection Results

[0049] In some possible embodiments of the present invention, multi-path parallel vectorization includes line feature vectorization, region vectorization, lithological pattern texture classification, and text recognition; multi-path parallel vectorization of spatial registration classification results and multiple color semantic channels includes: The spatial registration and classification results are vectorized into line elements, classified into lithological patterns and textures, and recognized as text. The multi-color semantic channels are vectorized into regions.

[0050] In embodiments of the present invention, such as Figure 6 As shown, the vectorization process is divided into four parallel paths based on the type of address feature. Line feature vectorization includes skeletonization → contour tracing → Douglas-Peucker simplification → layer classification → transformation matrix → geological coordinates. Region vectorization uses only a color mask as input, without using semantic segmentation results; color mask → closed polygon → area filtering → topology cleaning → transformation matrix → geological coordinates. Lithological pattern texture classification includes fusing multimodal features into a network to classify 5 classes → HATCH mapping → transformation matrix → geological coordinates. OCR text recognition includes PaddleOCR detection + recognition → confidence-based splitting → TEXT entity → transformation matrix → geological coordinates. The results from the four paths are merged into a unified vector dataset, which is then fed into the subsequent geological knowledge constraint engine.

[0051] Specifically, the line feature classification rules are as follows: For each extracted line feature contour, calculate its principal direction angle, arc length, and line width, and classify it according to the following rules: If the contour is close to the edge of the map frame and nearly horizontal, it is classified as an axis; if the contour is nearly horizontal and its length is greater than 60% of the map width, it is classified as a grid line; if the contour line width is greater than 3px, it is classified as a fault line; the remaining contours are classified as stratigraphic boundaries, as shown in Table 3. Table 3: Vectorization Results of Line Elements

[0052] In some possible embodiments of the present invention, such as Figure 7 As shown, by combining a pre-set geological knowledge engine and an uncertain heatmap, the initial vectorization result is corrected to obtain the target vectorization result, including: S701 is a geological knowledge engine built based on preset geological topology rules. These rules include non-self-intersection of stratigraphic boundaries, fault cutting order, non-overlapping lithological regions, stratigraphic sequence law, continuity of fold axes, orthogonality of faults and boundaries, and consistency of attitude. S702 uses a geological knowledge engine to check the initial vectorization results for geological topology rules, and performs geological perception correction on the initial vectorization results based on the check results. When performing geological perception correction on the initial vectorization results, high-risk areas are corrected first by combining the uncertainty heat map.

[0053] In this embodiment of the invention, a geological knowledge constraint engine performs seven geological topological rule checks, including stratigraphic boundaries not self-intersecting, fault cutting order, non-overlapping lithological regions, stratigraphic sequence law, fold axis continuity, fault-boundary orthogonality, and attitude consistency. For violations, geological perception corrections are performed, such as multi-rule collaborative determination of overlapping areas, strike offset inference of cutting order, and selection of arc direction for anticline morphology. This is also linked to an uncertainty heatmap, prioritizing correction of high-risk areas. Specifically, stratigraphic boundary self-intersection correction involves breaking the line at the intersection point. The stratigraphic affiliation of each segment is determined by calculating the distance from the midpoint of each segment to the nearest lithological polygon, ensuring that the broken segments do not cross incorrect stratigraphic regions. Lithological region overlap correction includes assigning overlapping regions based on multi-rule collaborative determination. It integrates stratigraphic sequence law (extracting age codes from stratigraphic designations and determining the relative ages based on standard stratigraphic sequence tables), contact relationship type (conformity / unconformity / fault contact), and uncertainty metric (MC Dropout entropy) to rank overlapping regions, assigning them to the lithological region with the highest overall ranking. When both sequence law and contact relationship are undeterminable, an area-first strategy is adopted. Stratigraphic connector insertion involves inserting connectors for areas of spatial discontinuity within the same stratigraphic unit, requiring interactive confirmation of strike rationality. Axis continuity correction involves selecting the curvature direction of the connecting arc at anticline / syncline axis breaks based on structural morphology; anticlines use an upwardly convex arc, and synclines use a downwardly concave arc, using a cubic Bezier curve to smoothly connect the broken axis endpoints. All violations are sorted according to the uncertainty heatmap, with higher uncertainty being corrected first. Overlap checks are triggered by uncertainty linkage conditions, and overlap checks and corrections are only performed on high-risk areas where the uncertainty entropy value exceeds a preset threshold (default 1.5), rather than a full-map scan, thus distinguishing it from simple topology scanning repair methods.

[0054] In some possible embodiments of the present invention, such as Figure 8 As shown, the geological raster image vectorization method also includes: S801 performs multiple automatic quality checks on the target vectorization results. These automatic quality checks include coordinate accuracy, closure, topological consistency, feature integrity, area consistency, line accuracy, visual contrast, and optical character recognition accuracy. S802: Generate a difference overlay diagram and an uncertainty audit task list based on the inspection results of multiple automatic quality checks, and conduct manual interactive review of the difference overlay diagram and the uncertainty audit task list to obtain the processing strategy for the difference overlay diagram and the uncertainty audit task list, and process the difference overlay diagram and the uncertainty audit task list based on the processing strategy.

[0055] In embodiments of the present invention, such as Figure 9 As shown, eight automated QC checks are performed on the target vectorization results, including coordinate accuracy, closure, topological consistency, feature completeness, area consistency, line accuracy, visual contrast, and optical character recognition accuracy. A difference overlay map and an uncertainty review task list are generated, and interactive review is conducted through an interactive interface. The reviewed labeled samples are then fed back into the training set to form a closed loop. Specifically, the eight automated QC checks are shown in Table 4: Table 4: QC Checklist

[0056] The geologically constrained vector data is output in a 14-layer DXF engineering format, including POLYLINE line features, HATCH fill patterns, TEXT text labels, and INSERT attitude symbol block references. The DXF layer configuration table (14 layers) is shown in Table 5. Table 5: DXF Layer Configuration Table

[0057] At this point, the vectorization of the geological raster image to be processed is complete, and the corresponding file is output.

[0058] This invention automates the entire process from raster geological map input to engineering-grade DXF file output, reducing the processing time for a single geological map from several days of manual operation to just a few hours of automatic completion, significantly improving processing efficiency. A two-stage cascaded segmentation strategy addresses the insufficient discriminative power of black pixels across five categories, and the 12-category semantic segmentation accuracy is significantly superior to end-to-end direct 12-category segmentation. A geological knowledge constraint engine automatically detects and corrects geological violations in the vectorized results, drastically reducing the constraint violation rate and significantly decreasing the workload of manual post-processing. Uncertainty estimation automatically generates a high-risk area review task list, requiring reviewers to only confirm high-risk areas instead of checking the entire map one by one, significantly improving review efficiency. The 14-layer DXF engineering output includes complete line types, line widths, colors, hash patterns, and attitude symbol blocks, directly meeting the needs of CAD design work without requiring secondary processing.

[0059] To better implement the geological raster image vectorization method in this embodiment of the invention, based on the geological raster image vectorization method, correspondingly, as follows: Figure 10 As shown, this embodiment of the invention also provides a geological raster image vectorization device, the geological raster image vectorization device 1000 comprising: The classification module 1001 is used to perform color layering and coarse classification of geological elements in the geological raster image to be processed, to obtain multiple color semantic channels and multiple coarse classification results, and to perform fine classification based on the multiple color semantic channels and multiple coarse classification results, to obtain multiple fine classification results. The pairing module 1002 is used to determine the uncertainty heatmap of the coarse classification result, identify the scale lines and coordinate numbers in the geological raster image to be processed based on the fine classification result, and pair the pixel coordinates in the geological raster image to be processed with the geological coordinates based on the scale lines and coordinate numbers to obtain the spatial registration classification result. The vectorization module 1003 is used to perform multi-path parallel vectorization on the spatial registration and classification results and multiple color semantic channels to obtain the initial vectorization result. Combined with the preset geological domain knowledge engine and uncertain heat map, the initial vectorization result is corrected to obtain the target vectorization result.

[0060] The geological raster image vectorization device 1000 provided in the above embodiments can realize the technical solutions described in the above geological raster image vectorization method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above geological raster image vectorization method embodiments, and will not be repeated here.

[0061] like Figure 11 As shown, the present invention also provides an electronic device 1100. The electronic device 1100 includes a processor 1101 and a memory 1102. Figure 11 Only some components of the electronic device 1100 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0062] In some embodiments, processor 1101 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in memory 1102 or process data, such as the geological raster map vectorization method of the present invention.

[0063] In some embodiments, processor 1101 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 1101 may be local or remote. In some embodiments, processor 1101 may be implemented on a cloud platform. In some embodiments, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, etc., or any combination thereof.

[0064] In some embodiments, memory 1102 may be an internal storage unit of electronic device 1100, such as a hard disk or memory of electronic device 1100. In other embodiments, memory 1102 may also be an external storage device of electronic device 1100, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 1100.

[0065] Furthermore, the memory 1102 may include both internal storage units of the electronic device 1100 and external storage devices. The memory 1102 is used to store application software and various types of data installed on the electronic device 1100.

[0066] In some embodiments, when processor 1101 executes a geological raster map vectorization program in memory 1102, the following steps may be performed: Color layering and coarse classification of geological elements are performed on the geological raster image to be processed to obtain multiple color semantic channels and multiple coarse classification results. Based on the multiple color semantic channels and multiple coarse classification results, fine classification is performed to obtain multiple fine classification results. A heatmap of uncertainty in the coarse classification results is determined. Based on the fine classification results, the scale lines and coordinate numbers in the geological raster image to be processed are identified. Based on the scale lines and coordinate numbers, the pixel coordinates in the geological raster image to be processed are paired with the geological coordinates to obtain the spatial registration and classification results. The spatial registration and classification results and multiple color semantic channels are vectorized in multiple parallel paths to obtain the initial vectorization result. The initial vectorization result is then corrected by combining the preset geological domain knowledge engine and uncertain heat map to obtain the target vectorization result.

[0067] It should be understood that when the processor 1101 executes the geological raster map vectorization program in the memory 1102, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.

[0068] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 1100 mentioned. Electronic device 1100 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 1100 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0069] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions in the geological raster map vectorization methods provided in the above-described method embodiments.

[0070] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0071] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for vectorizing geological raster images, characterized in that, include: Color layering and coarse classification of geological elements are performed on the geological raster image to be processed to obtain multiple color semantic channels and multiple coarse classification results. Based on the multiple color semantic channels and the multiple coarse classification results, fine classification is performed to obtain multiple fine classification results. An uncertainty heatmap of the coarse classification result is determined. Based on the fine classification result, the scale lines and coordinate numbers in the geological raster image to be processed are identified. Based on the scale lines and coordinate numbers, the pixel coordinates in the geological raster image to be processed are paired with geological coordinates to obtain spatial registration and classification results. The spatial registration and classification results and the multiple color semantic channels are vectorized in multiple parallel paths to obtain an initial vectorization result. The initial vectorization result is then corrected by combining a preset geological domain knowledge engine and the uncertain heat map to obtain the target vectorization result.

2. The geological raster image vectorization method according to claim 1, characterized in that, The geological raster image to be processed is subjected to color layering and coarse classification of geological elements, resulting in multiple color semantic channels and multiple coarse classification results, including: The geological raster image to be processed is cropped by border, and the cropped geological raster image to be processed is multi-channel color layered in the HSV color space to obtain four color semantic channels, which include black lines, magenta lithology, purple pink lithology and white background. The pixels of the geological raster image to be processed are coarsely classified into multiple coarse classification results using a preset encoder. The coarse classification results include lines, text, and symbols.

3. The geological raster image vectorization method according to claim 2, characterized in that, The process of performing fine classification based on the multiple color semantic channels and the multiple coarse classification results yields multiple fine classification results, including: Based on the semantic channels of the magenta core and the purplish-pink lithology semantic channels, the filling region in the raster image to be processed is determined, and the filling region is subdivided into dotted lines, dashed lines, intersecting lines, wavy lines and solid lines based on a preset multimodal feature fusion network. The lines are further subdivided into boundaries, faults, grids, and coordinate axes using geometric features. The symbols are subdivided into attitude symbols and dip symbols using geometric patterns.

4. The method for vectorizing geological raster images according to claim 1, characterized in that, The process involves identifying the scale lines and coordinate numbers in the geological raster image to be processed based on the fine classification results, and pairing the pixel coordinates in the geological raster image to be processed with geological coordinates based on the scale lines and coordinate numbers to obtain spatial registration and classification results, including: Based on the position of the scale line in the geological raster image to be processed, locate the pixel coordinates of the scale line and extract the coordinate numbers corresponding to the scale line; Multiple models are used to pair the pixel coordinates and the coordinate numbers, and the pairing result of the model with the smallest residual is retained to obtain the spatial registration and classification result.

5. The method for vectorizing geological raster images according to claim 1, characterized in that, The multi-path parallel vectorization includes line feature vectorization, region vectorization, lithological pattern texture classification, and text recognition; the multi-path parallel vectorization of the spatial registration and classification results and the multiple color semantic channels includes: The spatial registration and classification results are vectorized into line elements, classified into lithological patterns and textures, and recognized as text. The multi-color semantic channels are vectorized into regions.

6. The geological raster image vectorization method according to claim 5, characterized in that, The process of combining a pre-set geological knowledge engine and the uncertain heatmap to correct the initial vectorization result and obtain the target vectorization result includes: A geological knowledge engine is constructed based on preset geological topological rules, which include non-self-intersection of stratigraphic boundaries, fault cutting order, non-overlapping lithological regions, stratigraphic sequence law, continuity of fold axes, orthogonality of faults and boundaries, and consistency of attitude. The initial vectorization result is checked for geological topology rules based on the geological knowledge engine, and the initial vectorization result is corrected for geological perception based on the check results. When correcting the initial vectorization result for geological perception, high-risk areas are corrected first in combination with the uncertainty heat map.

7. The method for vectorizing geological raster images according to claim 6, characterized in that, The method further includes: The target vectorization result is subjected to multiple automatic quality checks, including coordinate accuracy, closure, topological consistency, feature integrity, area consistency, line accuracy, visual contrast, and optical character recognition accuracy. Based on the inspection results of the multiple automatic quality checks, a difference overlay map and an uncertainty audit task list are generated. The difference overlay map and the uncertainty audit task list are then subject to manual interactive review to obtain a processing strategy for the difference overlay map and the uncertainty audit task list. The difference overlay map and the uncertainty audit task list are then processed based on the processing strategy.

8. A geological raster image vectorization device, characterized in that, include: The classification module is used to perform color layering and coarse classification of geological elements in the geological raster image to be processed, obtaining multiple color semantic channels and multiple coarse classification results. Based on the multiple color semantic channels and the multiple coarse classification results, fine classification is performed to obtain multiple fine classification results. The pairing module is used to determine the uncertainty heatmap of the coarse classification result, identify the scale lines and coordinate numbers in the geological raster image to be processed based on the fine classification result, and pair the pixel coordinates in the geological raster image to be processed with geological coordinates based on the scale lines and coordinate numbers to obtain the spatial registration classification result. The vectorization module is used to perform multi-path parallel vectorization on the spatial registration and classification results and the multiple color semantic channels to obtain an initial vectorization result. The initial vectorization result is then corrected by combining a preset geological domain knowledge engine and the uncertain heat map to obtain the target vectorization result.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the geological raster vectorization method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the geological raster vectorization method according to any one of claims 1 to 7.