Rock fracture extraction method fusing morphological top-hat transformation
By fusing morphological top-hat transformation and interactive thresholding, the edges of rock microfractures are enhanced and dynamically weighted, solving the problem of accurate extraction of main fractures and microfractures in CT images, and realizing complete reconstruction and high-precision identification of rock fracture networks.
Patent Information
- Application Number
- CN202511456759.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-01-09
AI Technical Summary
Existing technologies struggle to accurately extract major and micro fractures from CT images, resulting in incomplete fracture network reconstruction, particularly poor micro fracture identification. Furthermore, global threshold segmentation can easily lead to changes in the volume of major fractures or noise interference.
A method combining morphological top-hat transformation with interactive threshold segmentation and anti-sharpening mask is adopted to enhance the microcrack edges through top-hat transformation. The Arithmetic algorithm is then used for dynamic weighted fusion to achieve high-precision separation and reconstruction of the main crack and microcrack.
It effectively identifies and reconstructs rock fracture networks, improves the accuracy of fracture structure feature identification and extraction, overcomes the limitations of global grayscale threshold segmentation, preserves micro-fracture details, and suppresses noise interference.
Smart Images

Figure CN121304454A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of digital core analysis, and particularly relates to a rock fissure extraction method fusing morphological top-hat transformation. BACKGROUND
[0002] As the main channel for fluid migration in geological reservoirs, fissure network has the characteristics of complex morphology and strong spatial distribution heterogeneity. The geometric morphology, spatial connectivity and dynamic evolution law of fissure directly affect the enrichment degree of resources such as natural gas hydrate. X-ray computed tomography (CT) as a non-invasive high-resolution imaging method is widely used in digital core modeling, which can realize the three-dimensional visualization reconstruction of fissure network, so as to effectively obtain the microstructure information inside the core and provide important data basis for the identification and analysis of fissures.
[0003] For the gray-scale image obtained by CT scanning, the existing technology usually adopts the method of interactive threshold segmentation to identify fissures. However, the interactive threshold segmentation is essentially a threshold segmentation for global gray scale, so the identification effect of main fissures with large difference in gray value and rock matrix is remarkable, while the identification effect of micro fissures with small difference in gray value and rock matrix is poor, and the specific application has certain limitations. When there are many micro fissures with high gray value and small volume inside the core, these micro fissures are often ignored due to the limitation of CT imaging density resolution and the interference of image volume effect. It is also difficult to correct the threshold value on this basis, for example: when the gray threshold value between fissures and rock matrix is adjusted to the low direction, only the main fissure area with low gray can be retained in the image, and the low gray porosity or background noise is also included in the segmentation result, at the same time, part of the micro fissures is lost due to the close gray to the matrix; when the threshold value is adjusted to the high direction, the rock matrix with small density which does not belong to the fissure is easily misjudged as the fissure space, resulting in the overlarge fissure volume.
[0004] For example, the invention patent with publication number
CN113963130A
CN118506104A
[0005] How to maximize the accurate extraction of all main fractures and micro-fractures in the CT image, identify micro-fractures without causing the volume of main fractures to increase or decrease, and reconstruct the complete core fracture network is a difficult problem that currently restricts the fine characterization of rock structure. Therefore, a new rock fracture extraction method is needed to improve the identification and extraction accuracy of rock fracture structure features. SUMMARY
[0006] In view of the problem of restricting the fine characterization of rock structure in the prior art, the present application proposes a rock fracture extraction method fusing morphological top-hat transformation, which extracts rock micro-fractures based on top-hat transformation and dynamically weighted fusion with rock main fractures extracted by threshold segmentation, realizes complete reconstruction of the core fracture network, and effectively improves the identification and extraction accuracy of rock fracture structure features.
[0007] To achieve the above purpose, the present application provides the following technical scheme: a rock fracture extraction method fusing morphological top-hat transformation, comprising the following steps: Step A, extracting rock main fractures based on interactive threshold segmentation; By setting one or more threshold values, the gray scale histogram of the core sample is divided into different intervals, and the different material compositions in the sample are identified according to the gray scale from low to high. The gray scale value of the fracture is generally between the gas phase and the rock matrix, and then the rock main fracture is extracted; Step B, extracting rock micro-fractures based on inverse unsharp masking and top-hat transformation; The morphological characteristics of the non-main fissure present bifurcation and discontinuous distribution, and are distributed in a radial manner along the extension direction of the main fissure, reflecting the structural dependence on the micro scale, and forming a sharp contrast with the continuous linear structure of the main fissure. In the morphological performance, the edge of the non-main fissure often presents a fuzzy burr or sawtooth shape, which is different from the smooth linear edge of the main fissure. This feature is closely related to the gradient enhancement effect of the structural element on the micro fissure edge in the top-hat transformation. The original CT scanning gray image is processed for micro fissure extraction in the present scheme, including image enhancement, mode type determination, structural element size determination, neighborhood type determination of the structural element geometry, top-hat operation and the like. Step B1, the contrast of the fissure edge is enhanced by using the inverse sharpening mask to highlight the fissure edge details; The image edge and details are enhanced. By setting the edge size, edge contrast, brightness threshold and other parameters, the edge of the micro fissure in the rock image is highlighted to improve the definition and sharpness of the image; Step B2, top-hat transformation is performed on the enhanced CT image to enhance the dark details in the image; (1) Select the type of top-hat transformation (white top-hat or black top-hat), white top-hat extracts elements brighter than the surrounding background, and black top-hat extracts elements darker than the background; (2) Select the neighborhood type, define the pixel neighborhood range considered in the morphological operation, and a smaller neighborhood range is helpful to capture small dark details, but it may be more sensitive to noise in the image; (3) Set the size of the structural element, which is used to determine which pixels in the neighborhood of each pixel in the image will be considered in the dilation and erosion operations. The structural element should be slightly larger than the size of the target to be extracted to cover its details; (4) Based on the morphological operation (the difference between the closed operation result of the image and the original image), the top-hat operation is performed to highlight the dark details such as micro fissures, and the structural element neighborhood type of the morphological operation is defined to enhance the low contrast features such as fissures in real time; Step B3, after completing the top-hat transformation, the enhanced image micro fissure is extracted by interactive threshold segmentation; The lower limit of the gray scale is set by histogram analysis to exclude background noise interference. In the operation process, the size is gradually reduced to the critical point where the main fissure disappears, so as to quickly approach the optimal parameter combination. The low contrast fissure can be preserved while the noise is suppressed, and finally the high-precision separation of micro fissure and rock matrix is realized.
[0008] Step C, the rock main fissure and micro fissure are dynamically weighted and fused based on the Arithmetic algorithm, and finally the rock fissure extraction is realized.
[0009] Compared with the prior art, the present application has the advantages and positive effects that: This scheme, based on interactive threshold segmentation of CT scan grayscale images, introduces desharpening masks and morphological black hat transform to achieve targeted extraction of fine cracks, thus compensating for the masking of local details of cracks in the image by interactive threshold segmentation. Through desharpening masks and morphological image processing methods, low-contrast cracks are highlighted while suppressing image noise, ultimately achieving high-precision separation of main and micro cracks from the rock matrix. This scheme overcomes the limitation of traditional global grayscale threshold segmentation algorithms for CT images, which can only extract main cracks, and can effectively identify tiny cracks that are easily overlooked during the binarization of rock core images, achieving accurate extraction of microstructural information inside the rock core, and providing support for better serving the establishment and application of various rock physics models. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the rock fracture extraction method based on the fusion of top cap transformation as described in an embodiment of the present invention; Figure 2 This is a schematic diagram of a grayscale CT scan image before crack extraction in an embodiment of the present invention; Figure 3 This is a schematic diagram of the main crack extracted after interactive threshold segmentation in an embodiment of the present invention; Figure 4 This is a schematic diagram of the microcracks extracted after the top cap was changed in an embodiment of the present invention; Figure 5 The image shown is the overall crack image obtained by weighted integration in the embodiments of the present invention. Detailed Implementation
[0011] To better understand the above-described objects, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. Many specific details are set forth in the following description to provide a thorough understanding of the present invention; however, the present invention may be practiced in other ways than those described herein, and therefore, the present invention is not limited to the specific embodiments disclosed below.
[0012] This embodiment proposes a method for extracting rock fractures by incorporating morphological cap transformation, combined with... Figure 1 As shown, it includes the following steps: Step A: Extract the main fracture using threshold segmentation; This embodiment extracts main rock fractures based on an interactive threshold segmentation method. By setting one or more thresholds, the grayscale histogram of the core sample is divided into different intervals. Combined with the known composition of different substances within the sample, fractures are identified according to their grayscale values from low to high. The grayscale value of the fractures generally lies between that of the gas phase and the rock matrix. Since the grayscale values of micro-fractures are very close to those of the rock matrix, the extracted fractures are mainly the main fractures whose grayscale values differ significantly from those of the rock matrix.
[0013] Step B: Extract rock microfractures based on anti-sharpening mask and top cap transformation; Step B1: Enhance the contrast of the crack edges using an anti-sharpening mask to highlight the details of the crack edges. Specifically: (1) Select an appropriate Gaussian blur kernel to process the original image and obtain a blurred image; subtract the blurred image from the original image to calculate the sharpened image and obtain a mask with enhanced edge information; superimpose the mask on the original image and adjust the parameters to highlight the details of the crack edge and make the structure of the crack more obvious.
[0014] (2) Determine the spatial scale of the detected edge. Smaller edge size (1-3 pixels) is suitable for enhancing the details of tiny cracks.
[0015] (3) Adjust the sharpening intensity to enhance edge contrast. Smaller edge sizes are suitable for lower edge contrast to avoid over-sharpening or artifacts.
[0016] (4) By setting a brightness threshold, areas with low contrast or small brightness changes are filtered out to avoid enhancing background noise and ensure that enhancement only occurs in areas with obvious crack features. The brightness threshold is usually set between 0 and 0.05. At small edge sizes, a low brightness threshold can ensure that details are sufficiently enhanced.
[0017] Step B2: Perform black cap transformation on the enhanced CT image to enhance dark details. Specifically, this includes: (1) The neighborhood type of the structural element in morphological operations is defined through the Neighborhood module. The neighborhood type determines the geometry of the structural element and affects the local coverage of the erosion / dilation operation. The neighborhood type is divided into 2D and 3D modes, and the neighborhood type is dynamically adjusted according to the physical characteristics of the target crack. Among them: the 2D mode considers the neighborhood relationship at each slice level, which is suitable for planar cracks or microcracks with layered structures; the 6-connectivity in the 3D mode considers the vertical, horizontal, front and back neighborhoods of the pixel in the x, y, and z directions, which is suitable for relatively isolated or few connected microcracks; the 18-connectivity in the 3D mode adds 3D face diagonal connection on the basis of 6-connectivity, which is suitable for microcracks with good connectivity; the 26-connectivity in the 3D mode includes all adjacent pixels (including corner neighborhoods and edge neighborhoods), which is suitable for microcracks with complex structures.
[0018] (2) Set the size of the structuring element. This size directly affects the range of action of the erosion and dilation operations. The larger the size, the more obvious the effect of erosion or dilation. For example, when the average width of the crack is 10 pixels, the radius of the structuring element is usually set to 12 to 15 pixels to completely cover the crack area and avoid noise interference. If there is a lot of noise in the image, the size of the structuring element can be increased appropriately to remove the noise, but excessive erosion or dilation should be avoided to prevent the loss of fine structures.
[0019] (3) Apply black hat transformation to the crack image based on morphological opening operation to enhance dark details in the image, such as small cracks. The effect of black hat transformation is affected by the neighborhood type and the size of the structuring element. If the enhancement effect of dark details is not obvious, the size of the structuring element can be increased or the neighborhood type can be adjusted. If the dark details are over-enhanced, resulting in noise or artifacts in the image, the size of the structuring element can be reduced or the neighborhood type can be changed.
[0020] Step B3: After completing the top-hat transformation, interactive thresholding segmentation is required to extract micro-cracks from the enhanced image. Histogram analysis is used to set a lower limit for grayscale to eliminate background noise interference. During the operation, the size is gradually reduced to the critical point where the main crack disappears, thus quickly approaching the optimal parameter combination. This allows for the preservation of low-contrast cracks while suppressing noise, ultimately achieving high-precision separation of micro-cracks from the rock matrix.
[0021] Step C: Dynamic weighted fusion of main rock fractures and microfractures based on the Arithmetic algorithm To integrate the crack information obtained through interactive thresholding and top-hat interactive segmentation in a weighted manner, the Arithmetic algorithm is used to perform pixel-by-pixel (or voxel-by-voxel) mathematical operations on the input image to enhance image features.
[0022] formula: (1) Among them, w1 and w2 are weighting coefficients, which need to be dynamically adjusted according to the image characteristics to balance the contributions of each method.
[0023] If the threshold segmentation result is reliable (high-contrast cracks), increase w1 (e.g., 0.5); if the image has a lot of noise, increase the top-hat weight w2 to enhance details. Ensure that the image size and resolution of the outputs from multiple algorithms are consistent to avoid misalignment; modify the weight expression in real time, observe the fusion effect, and gradually optimize the coefficients. For cracks of different scales, set weights in layers; for example, large cracks rely on threshold segmentation, while small cracks rely on top-hat segmentation.
[0024] Example: Core samples, 10mm in diameter and 15mm in height, were prepared from drilled rocks in the permafrost region of the Qilian Mountains. CT scans and three-dimensional reconstructions were then performed to obtain grayscale slice images of the core interiors, such as... Figure 2As shown. Interactive threshold segmentation was used, setting the grayscale threshold for fractures and core matrix to 21450. Areas with grayscale values below this threshold were considered fractures, while areas with grayscale values above this threshold were considered core matrix. Figure 3 The image shown represents the main fracture within the core sample. To enhance edge and detail and improve image clarity, image enhancement parameters were set to a threshold: edge size was set to 2 pixels, edge contrast to 3, and brightness threshold to 0.03. Next, a black cap was applied to the sharpened image to further enhance the dark details of the micro-fractures. Interactive segmentation dynamically adjusted the structuring element size, setting the structuring element radius to 14 pixels to fully cover the fracture area and avoid noise interference. After the black cap transformation, the enhanced image underwent secondary filtering using an interactive threshold segmentation method. Histogram analysis was used to set a lower limit for grayscale (e.g., 10%-20% of the matrix grayscale) to eliminate background noise interference. By setting a histogram grayscale lower limit (e.g., 15% of the rock matrix grayscale) to eliminate background noise interference, the morphological characteristics of the micro-fractures were obtained, as shown in the image. Figure 4 As shown. Threshold segmentation is performed using the Arithmetic algorithm ( Figure 3 ) and top hat transformation results ( Figure 4 After dynamic weighted fusion ( Figure 5 The characterization quality of the fracture network was significantly improved.
[0025] As shown in the attached figures, in the main crack region, the fusion algorithm effectively suppressed the spiky artifacts caused by gray-level fluctuations in traditional threshold segmentation, while preserving the continuous linear structural features of the main crack. Its boundary smoothness and topological integrity are significantly improved compared to the single algorithm. For the secondary crack distribution area, micro-cracks and discontinuous bifurcation structures that were not detected by the original threshold segmentation are highlighted in the weighted fused image.
[0026] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for extracting rock fractures by incorporating morphological cap transformation, characterized in that, Includes the following steps: Step A: Extract the main rock fractures based on interactive threshold segmentation; Step B: Extract rock microfractures based on desharpening mask and top cap transformation; Step B1: Enhance the contrast of the crack edges using an anti-sharpening mask; Step B2: Perform top-cap transformation on the enhanced CT image to enhance dark details in the image; Step B3: After completing the top-hat transformation, extract micro-cracks from the enhanced image using interactive thresholding. Step C: Dynamically weighted and fused the main and micro fractures in the rock to ultimately extract the rock fractures.
2. The method for extracting rock fractures by incorporating morphological cap transformation according to claim 1, characterized in that: Step B1 is implemented in the following manner: Based on anti-sharpening mask filtering, the sharpness and clarity of rock images are improved by highlighting the edges of micro-cracks in the rock images by setting parameters such as edge size, edge contrast, and brightness threshold.
3. The method for extracting rock fractures by incorporating morphological cap transformation according to claim 1, characterized in that: Step B2 is implemented in the following manner: (1) Select the type of top hat transformation. White top hat extracts elements that are brighter than the surrounding background, and black top hat extracts elements that are darker than the background. (2) Select the neighborhood type, define the range of pixel neighborhoods to be considered when performing morphological operations, and dynamically adjust the neighborhood type according to the physical characteristics of the target crack; (3) Set the size of the structuring element to determine the number of pixels to be considered in the neighborhood of each pixel in the image when performing dilation and erosion operations; (4) Perform top-hat operation based on morphological operation, define the neighborhood type of structuring element of morphological operation, and enhance the low-contrast feature of the crack in real time.
4. The method for extracting rock fractures by incorporating morphological cap transformation according to claim 1, characterized in that: Step B3 is implemented in the following manner: By setting a lower limit for grayscale through histogram analysis to eliminate background noise interference, the size is gradually reduced to the critical point where the main fracture disappears during the operation, so as to quickly approach the optimal parameter combination. While preserving low-contrast fractures, noise is suppressed, and finally, high-precision separation of microfractures and rock matrix is achieved.
Citation Information
Patent Citations
Construction method of fracture network model for rock core fractures
CN113963130A
