Rock CT image analysis processing method

Through image preprocessing and segmentation technology, the noise and resolution problems in rock CT images are solved, the image quality and analysis accuracy are improved, the accurate identification and quantitative analysis of pores, fissures and minerals are achieved, and the use of rock CT images in geological exploration is enhanced. application effect.

CN118587271AActive Publication Date: 2024-09-03CHINA UNIV OF GEOSCIENCES (BEIJING)

Patent Information

Application Number
CN202410870024.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-09-03
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

In practical applications, rock CT images are often affected by noise, resulting in low image quality, making it difficult to accurately analyze pore structure and mineral distribution, and it is difficult to balance resolution and field of view, resulting in biased analysis results.

Method used

Use image preprocessing methods, including OpenCV image denoising and enhancement, use non-local mean denoising algorithm to remove noise, and process image edges through pixel value filtering, combine with PIL for image segmentation and automatic analysis, segment and calculate the area based on color thresholds , area ratio and particle size.

Benefits of technology

Improved image quality and clarity, highlighted details and features in rock images, enhanced segmentation accuracy and efficiency, achieved pore and crack extraction and identification of different minerals, performed automatic analysis of mineral content and particle size, and improved Accuracy and readability of analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587271A
    Figure CN118587271A
Patent Text Reader

Abstract

The invention discloses a rock CT image analysis and processing method, which comprises the steps of image preprocessing, image segmentation and automatic analysis, processing and analysis are carried out on an image by using OpenCV and PIL, and the image preprocessing comprises image denoising and image enhancement; the method comprises the following steps: setting a threshold value to carry out image segmentation, carrying out statistics on parameter information after image segmentation, creating a zero matrix color mask with the same dimension as an input image, updating an outmask and the color mask according to a threshold value range of colors, finding contours in the color mask by using a cv2. FindContours function, creating a zero matrix echo mask with the same dimension as the outmask for each contour, and drawing a current contour; the method comprises the following steps of: applying a color to an echo to generate the echo, and calculating a total area, an area proportion and an equivalent diameter for all contours of each color; according to the rock CT image analyzing and processing method, a systematic rock CT image processing method is provided, and the image quality is improved; and hole fracture extraction and different mineral phase identification can be effectively carried out, and automatic analysis of mineral content and granularity can be carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of rock image processing, and in particular to a rock CT image analysis and processing method. Background Art

[0002] As global energy demand continues to grow, the exploration and mining of metal deposits have become increasingly important. In this process, accurate rock pore structure analysis and processing and mineral quantitative characterization are crucial for resource assessment and exploration and mining. X-ray computed tomography (CT) technology has become a key tool in geological research because of its ability to provide high-resolution three-dimensional images, which can reveal the complex pore network and mineral distribution inside the rock. CT technology can obtain three-dimensional images of the internal structure of rocks non-destructively, which is of great significance for understanding the pore network of rocks, the geometry of pores and fractures, and the distribution of minerals. High-resolution CT images can accurately display the location and morphology of tiny pores and mineral particles, thereby helping to understand the mechanism of fluid flow in low-permeability rocks and the mineralization process.

[0003] However, despite the significant advantages of CT technology, it still faces several challenges in practical applications, which limit its comprehensive application in rock analysis and processing. First, the obtained CT images are often affected by noise, which may come from the electronic noise of the scanning equipment, sample heterogeneity and interference from the external environment. These noises reduce the image quality and lead to deviations in the analysis and processing of pore structure and mineral distribution. In addition, there is a contradiction between resolution and field of view that is difficult to balance in CT images. The field of view of high-resolution images is small, and it is difficult to fully cover a large volume of rock samples; while the resolution of large field of view images is very low, and it is impossible to accurately characterize tiny pores and mineral structures. During the scanning process, the unevenness of light will also lead to uneven brightness of the obtained CT images. This brightness unevenness has an adverse effect on the subsequent processing and analysis of the image. For example, when performing threshold segmentation of different components, it often leads to a larger segmentation range, which causes deviations in the quantitative analysis and processing results.

[0004] Therefore, it is urgent for those skilled in the art to provide a rock CT image analysis and processing method that can improve image quality and accurately perform quantitative characterization and analysis of pores, fractures and minerals, so as to enhance its application effect in geological exploration and mineral resource development. Summary of the invention

[0005] The purpose of the present invention is to provide a rock CT image analysis and processing method to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a rock CT image analysis and processing method, comprising the following steps: S1: Image preprocessing, using OpenCV to preprocess the input image, the image preprocessing includes image denoising and image enhancement; noise is the random interference introduced during image acquisition, transmission or processing, which will affect the quality and usability of the image. Image denoising can eliminate the noise in the image, making the image clearer, easier to analyze and process. In addition, since the edge of the original image is abnormally bright, this part needs to be weakened. Image enhancement can make the image more natural, further highlight the pores, cracks and mineral information in the image, and make the image more readable in terms of visual effects, contrast, brightness, etc.

[0007] S2: Image segmentation and automatic analysis, using PIL for image analysis: S2.1, image segmentation according to the set threshold; S2.2, initialize a dictionary for storing parameter statistics of each color segmentation result, including the threshold range, area, area ratio and particle size of different colors; S2.3, traverse the dictionary initialized in S2.2, and for each color, create a zero matrix color_mask with the same dimension as the input image to mark the segmented area of ​​the current color; S2.4, update out_mask and color_mask according to the color threshold range, wherein out_mask records the segmentation results of all colors, and color_mask only records the currently processed color; S2.5, use the cv2.findContours function to find the contours in color_mask to represent the segmented area of ​​the current color. For each contour, create a zero matrix each_mask with the same dimension as out_mask, and draw the current contour in each_mask; S2.6, image output and target parameter output: Apply color_mask to each_mask to generate each_color_mask, which is used to represent the instantiation area of ​​the current contour. For all contours of each color, calculate the total area, area ratio (area divided by the total number of pixels in the image), and equivalent diameter calculated based on the area.

[0008] Furthermore, the image denoising in S1 uses filtering technology to denoise the image, specifically using Python code to import the OpenCV library, read the image, call the fastNlMeansDenoisingColored method, and denoise the image based on the Non-Local Means Denoising algorithm using the information of similar regions in the image. The present invention uses the information of all similar regions in the image to reduce noise, not just the information of the local region.

[0009] Furthermore, the image enhancement in S1 uses pixel value filtering to enhance the image. Specifically, the eliminate_bright_single function is used to process the edge position of a single image, and the filter interval range is set, for example: thres1, thres2, and the image is traversed pixel by pixel from left to right and from top to bottom to obtain the height and width of the new image. For each pixel point, if the mask is true, that is, at the edge position, 50 consecutive pixel values ​​are taken from the current pixel position, and the number of pixels within the threshold range (thres1, thres2) is counted.

[0010] Furthermore, if the number of pixels is greater than 1, linear interpolation is performed on these pixels until the linear interpolation pixel value gradually decreases to a set range; a threshold is set: if the number is 1, the pixel value within the threshold range is set, and the pixel threshold is set according to the statistical target number (for example: if one mineral needs to be counted, the pixel value within the threshold range is set to thres1; if three minerals need to be counted, the pixel value within the threshold range is set to thres1 thres2 thres3), and finally the pixel value of the new image is updated, and the processed image is returned.

[0011] Furthermore, the setting range is a value in which the pixel value is reduced to a number of pixels equal to 1.

[0012] Furthermore, the specific steps of image segmentation in S2.1 are as follows: for a given color mapping, use Python code to traverse each color range, assign pixels in the image to different categories according to the color range, and then count and save the pixel information, which includes the area occupied by each color category, area ratio and particle size information.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: a rock CT image analysis and processing method of the present invention not only provides a systematic rock CT image processing method and improves image quality; but also can effectively extract pores and fractures and identify different mineral phases, and automatically analyze mineral content and particle size.

[0014] (1) The present invention adopts an image preprocessing method and uses image denoising to improve the quality and clarity of rock images, making subsequent analysis more accurate and reliable; it uses image enhancement to highlight the details and features in rock images, further improving the readability of the images and the analysis effect; (2) The present invention uses a color threshold segmentation method to segment different regions or objects in the rock CT image, further improving the accuracy and efficiency of segmentation; (3) The present invention further improves the analysis accuracy of the image by automatically extracting and analyzing the features of the segmented image area, can effectively extract pores and cracks and identify different mineral phases, and automatically analyze the content and particle size, which is helpful for subsequent research. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a flow chart of a rock CT image analysis and processing method of this embodiment; Figure 2 is the original CT image of the rock in this embodiment; Figure 3 This is a rock CT image after image noise reduction and image enhancement in this embodiment; Figure 4 This is the distribution image of pyrite after segmentation in the rock CT image of this embodiment; Figure 5 This is a statistical table of information related to pyrite particles after image segmentation generated in this embodiment. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The numbers in the present embodiments, i.e., the drawings, are only used for illustration and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0017] Example

[0018] Please see attached Figure 1-5 This embodiment takes the marble ore of the Guocheng gold deposit in Jiaodong as an example, and uses a rock CT image analysis and processing method of the present invention to perform statistical analysis on pyrite particles in the marble ore. Specifically, it includes the following steps: S1: Image preprocessing, using OpenCV to preprocess the input image. The preprocessing includes image denoising and image enhancement. Image denoising uses filtering technology to denoise the image. In this embodiment, Python code is used to import the OpenCV library, read the input image, call the fastNlMeansDenoisingColored method, and use the information of similar areas in the image for denoising based on the Non-LocalMeans Denoising algorithm; image enhancement uses pixel value filtering to enhance the image. Specifically, the eliminate_bright_single function is used to process the edge position of a single image, and the filter interval range is set: thres1, thres2. The image is traversed pixel by pixel from left to right and from top to bottom to obtain the height and width of the new image. For each pixel point, if the mask is true, that is, at the edge position, 50 consecutive pixel values ​​are taken from the current pixel position, and the values ​​within the threshold range (thres1, thres2); if the number of pixels is greater than 1, these pixels are linearly interpolated until the linearly interpolated pixel value gradually decreases to the set range, and the set range is that the pixel value is reduced to the number of pixels equal to 1; set the threshold: if the number is 1, the pixel threshold is set according to the statistical target number (for example: if one mineral needs to be counted, the pixel value within the threshold range is set to thres1; if three minerals need to be counted, the pixel value within the threshold range is set to thres1 thres2 thres3). In this embodiment, only one mineral needs to be counted, so the pixel value within the threshold range is set to thres1, and finally the pixel value of the new image is updated, and the processed image is returned; S2: Image segmentation and automatic analysis, using PIL for image analysis: S2.1, image segmentation based on set thresholds: for a given color map, use Python code to traverse each color range, assign pixels in the image to different categories based on the color range, and then count and save pixel information (area occupied by each color category, area ratio, and particle size information); S2.2, initialize a dictionary for storing parameter statistics of each color segmentation result, including the threshold range, area, area ratio and particle size of different colors; S2.3, traverse the dictionary initialized in S2.2, and for each color, create a zero matrix color_mask with the same dimension as the input image to mark the segmented area of ​​the current color; S2.4, update out_mask and color_mask according to the color threshold range, wherein out_mask records the segmentation results of all colors, and color_mask only records the currently processed color; S2.5, use the cv2.findContours function to find the contours in color_mask to represent the segmented area of ​​the current color. For each contour, create a zero matrix each_mask with the same dimension as out_mask, and draw the current contour in each_mask; S2.6, image output and target parameter output: Apply color_mask to each_mask to generate each_color_mask, which is used to represent the instantiation area of ​​the current contour. For all contours of each color, calculate the total area, area ratio (area divided by the total number of pixels in the image), and equivalent diameter calculated based on the area.

[0019] Attached Figure 2 This is a 2D slice of the original CT data of marble ore, where the white bright blocks are pyrite and the black dots are pores. Figure 3 This is the image obtained after image denoising in the image preprocessing in step S1. It can be clearly seen that the image quality is enhanced, the noise is reduced, and the boundaries between pyrite (white bright blocks) and pores (black dots) are more obvious; Figure 4 This is the pyrite distribution image obtained after image segmentation, where the selected threshold range is (150, 255). The bright red blocks in the figure are the extracted pyrite.

[0020] Through the above steps, the relevant information of pyrite particles after segmentation of marble ore CT image is obtained, including area, area percentage, and particle size. Figure 5 , attached Figure 5 The first column of the table is the number of the extracted pyrite particles, and there are 4 pyrite particles in total; the second column of the table is that the pyrite particles are defined as red, which is convenient for subsequent threshold segmentation of other minerals or pores to prevent color duplication and difficulty in distinguishing; the third column of the table is the area occupied by each pyrite particle, in pixels; the fourth column of the table is the percentage of area occupied by each pyrite particle in this field of view; the fifth column of the table is the equivalent diameter of each pyrite particle, that is, the particle size. This can make the specific location of pyrite clearer, further improve the readability and analysis effect of the image; thereby improving the accuracy and efficiency of segmentation, and can effectively extract pores and cracks and identify different mineral phases, and automatically analyze content and particle size.

[0021] Noise is random interference introduced during image acquisition, transmission or processing, which will affect the quality and usability of the image. Image denoising can eliminate the noise in the image, making the image clearer, easier to analyze and process. In addition, since the edge of the original image is abnormally bright, this part needs to be weakened. Image enhancement can make the image more natural, further highlight the information of pores, cracks and minerals in the image, and make the image more readable in terms of visual effects, contrast, brightness, etc. In this embodiment, the information of all similar areas in the image is used to reduce noise, not just the information of the local area.

[0022] The beneficial effects of this embodiment are as follows: a rock CT image analysis and processing method of this embodiment improves the quality and clarity of rock images by using image denoising through image preprocessing, making subsequent analysis more accurate and reliable; highlights the details and features in the rock image through image enhancement, further improving the readability and analysis effect of the image; segments different areas or objects in the rock CT image through a color threshold segmentation method, providing a basis for subsequent analysis and further improving the accuracy and efficiency of segmentation; and further improves the analysis accuracy of the image by automatically extracting and analyzing the segmented image areas, effectively extracting pores and fractures and identifying different mineral phases, and automatically analyzing the content and particle size.

[0023] The systematic rock CT image processing method of this embodiment not only improves the image quality, but also can effectively extract pores and fractures, identify different mineral phases, and automatically analyze mineral content and particle size, thereby enhancing its application effect in geological exploration and mineral resource development.

[0024] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A rock CT image analysis and processing method, Features: The steps include: S1: Image preprocessing, using OpenCV to preprocess the input image, the image preprocessing includes image denoising and image enhancement; S2: Image segmentation and automatic analysis, using PIL for image analysis: S2.1, image segmentation; S2.2, initialize a dictionary for storing parameter statistics of each color segmentation result, including the threshold range, area, area ratio and particle size of different colors; S2.3, traverse the dictionary initialized in S2.2, and for each color, create a zero matrix color_mask with the same dimension as the input image to mark the segmented area of ​​the current color; S2.4, update out_mask and color_mask according to the color threshold range, wherein out_mask records the segmentation results of all colors, and color_mask only records the currently processed color; S2.5, use the cv2.findContours function to find the contours in color_mask, for each contour, create a zero matrix each_mask with the same dimension as out_mask, and draw the current contour in each_mask; S2.6, image output and target parameter output: Apply color_mask to each_mask to generate each_color_mask, and for all contours of each color, calculate the total area, area percentage, and equivalent diameter calculated based on the area.

2. A rock CT image analysis and processing method according to claim 1, Features: The image denoising in S1 uses filtering technology to denoise the image. Specifically, Python code is used to import the OpenCV library, read the image, call the fastNlMeansDenoisingColored method, and denoise the image based on the non-local mean denoising algorithm using the information of similar areas in the image.

3. A rock CT image analysis and processing method according to claim 2, Features: The image enhancement in S1 uses pixel value filtering to enhance the image. Specifically, the eliminate_bright_single function is used to process the edge position of a single image, and the filter interval range is set. The image is traversed pixel by pixel from left to right and from top to bottom to obtain the height and width of the new image. For each pixel point, if the mask is true, 50 consecutive pixel values ​​are taken from the current pixel position, and the number of pixels within the threshold range is counted.

4. A rock CT image analysis and processing method according to claim 3, Features: If the number of pixels is greater than 1, linear interpolation is performed on these pixels until the linear interpolation pixel value gradually decreases to a set range; if the number is 1, the pixel value within the threshold range is set, and the pixel threshold is set according to the statistical target number. Finally, the pixel value of the new image is updated and the processed image is returned.

5. A rock CT image analysis and processing method according to claim 3, Features: The setting range is the amount by which the pixel value is reduced to the number of pixels equal to 1.

6. A rock CT image analysis and processing method according to claim 2, Features: The specific steps of image segmentation in S2.1 are as follows: for a given color mapping, use Python code to traverse each color range, assign pixels in the image to different categories according to the color range, and then count and save the pixel information, which includes the area occupied by each color category, area ratio and particle size information.

Citation Information

Patent Citations

  • X-ray image enhancement method based on image pyramid

    CN110021031A

  • Rock core mineral component identification method

    CN110873722A

  • Automobile glass sub-pixel contour extraction method and automobile glass detection method

    CN111415376A

  • Permeable asphalt mixture communication gap identification method based on color channel combination

    CN113096099A

  • Deep learning-based rock hole-crack and impurity characteristic evaluation method

    CN114037693A

Cited By

  • Quantitative detection method and detection system for mesoscopic defects of soil-rock aggregate based on CT (Computed Tomography) image multi-threshold segmentation

    CN120298326A