Method for extracting original information of earth-rock mixed material structure
Through Matlab image processing technology, the color images of earth-rock mixed materials are preprocessed, fine-tuned and partially fine-tuned, solving the problem of insufficient image recognition accuracy of earth-rock mixed materials, realizing accurate quantification and information extraction of component features, and supporting engineering material analysis.
Patent Information
- Application Number
- CN202510750138.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-06
AI Technical Summary
In the prior art, the image recognition accuracy of soil and rock mixed materials is significantly affected by the shooting environment and equipment noise, and there is a lack of effective soil particle removal technology for surface cladding of block stones, resulting in the inability to accurately obtain the original structure information.
Matlab image processing technology is used to pre-process, fine-tune and partially fine-tune the color image files of earth and rock mixed materials, including grayscale processing, noise reduction, block and stone edge repair, hole filling, morphological processing and edge smoothing, realizing the quantification of the meticulous characteristics of earth and rock mixed materials.
Effectively obtain information on the maximum particle size, length and fine ratio, roughness, area difference ratio, edge and angle index, orientation and stone content of soil and stone mixed materials, providing advanced technical means for engineering material analysis without damaging block and stone materials.
Smart Images

Figure CN120259132A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition, and particularly relates to a method for extracting the original information of the fabric of soil-rock mixture materials. Background Art
[0002] Soil-rock mixture materials are binary medium materials widely existing in natural surfaces and engineering construction. Different from the brittle failure of rocks and the plastic failure of soils, the mechanical properties of soil-rock mixture materials are significantly affected by fabric characteristics. When the block content is significantly lower than that of the soil, the fabric is in a suspension-dense fabric; when the block content is significantly higher than that of the soil, it is in a skeleton-void structure; and when the block content is appropriate, it is in a skeleton-dense structure.
[0003] At present, the fabric characteristics of soil-rock mixture materials are mostly evaluated by obtaining indexes such as the stone content and particle size distribution of soil-rock mixture materials through sieving tests. In this process, there is substantial damage to natural materials, especially during the sieving vibration process, particle sorting is likely to cause fragmentation of soft rock particles, especially jointed rock masses with a large aspect ratio and soft rocks with poor roundness. There are significant differences between the results obtained from sieving tests and the actual engineering materials.
[0004] With the development of information technology, image processing has been applied to the identification of soil-rock mixture materials, such as Computed Tomography (CT), etc. However, the equipment accuracy of geotechnical CT machines is limited, and the block boundaries need to be manually corrected. The obtained results are subject to certain subjective human influences. The gray-scale image recognition technology has been concerned in recent years because it can obtain the particle size distribution of materials through photos, but its recognition accuracy is significantly affected by the shooting environment and equipment noise, and there is a lack of technical means for removing soil particles attached to the surface of blocks. Summary of the Invention
[0005] The purpose of the present invention is to overcome the technical defects in the gray-scale image recognition technology in the prior art, such as being significantly affected by the environment and equipment noise and lacking technical means for removing soil particles attached to the surface of blocks, and to provide a method for extracting the original information of the fabric of soil-rock mixture materials to solve the technical problem of accurately extracting the original information in engineering materials.
[0006] In a first aspect, a method for extracting the original information of the fabric of soil-rock mixture materials includes the following steps: Step 1: Take a color image of the soil-rock mixture material to be processed, and preprocess the color image file; the preprocessing includes: performing gray-scale processing and noise reduction processing on the whole color image file to obtain a preprocessed image file; Step 2: Fine-tune the preprocessed image file in Step 1, and the fine-tuning includes: restoring the edge shape of the blocks in the image file and repairing the internal holes of the blocks to obtain an intermediate image file; Step 3: Perform local fine-tuning on the intermediate graph file in Step 2. The local fine-tuning includes: performing area filtering to eliminate non-block stone areas in the intermediate graph file, and smoothing the edges of the block stones in the image to obtain the final graph file.
[0007] In the technical solution of the present invention, in order to overcome the technical defects that the image recognition accuracy of soil-rock mixture materials is significantly affected by the shooting environment and equipment noise, and the lack of technical means for removing soil particles attached to the surface of block stones results in technicians being unable to fully obtain the original information of the soil-rock mixture structure, a method for extracting the original information of the soil-rock mixture structure is proposed. Through the image processing technology of Matrix Laboratory (Matlab), according to means such as preprocessing, fine-tuning, and local fine-tuning, the quantification of the mesoscopic characteristics of the soil-rock mixture is realized. Matlab has a powerful preprocessing function, which can optimize the defects existing in the gray-scale image recognition technology, and then form the extraction of the original information of the soil-rock mixture structure characteristics, providing an advanced technical means for engineering material analysis. Effectively obtain information such as the maximum particle size, aspect ratio, roughness, area difference ratio, angularity index, orientation, and stone content of the soil-rock mixture materials, providing support for material science evaluation and engineering applications. And it will not cause irreversible damage to the block stone materials.
[0008] As a preferred solution of the present invention, in Step 1, the preprocessing is carried out in the following manner: Step 11: First, perform gray-scale processing on the color image file to establish a gray-scale histogram of gray-level - pixel number; and perform correction processing on the positions of under-exposure and over-exposure in the image file; Step 12: Perform noise reduction processing on the image file. The noise reduction processing uses median filtering with a 3×3 template to perform noise reduction on the image, and uses the Medfilt 2 function in Matlab to implement median filtering, as shown in Equation 4 below: medfilt 2 Equation 4 In the formula, —Original gray-scale image; —Image after median filtering.
[0009] In the method of the present invention, the purpose of preprocessing is to simplify the processing data of the color graph file through gray-scale processing and improve the image quality through noise reduction, and lay a foundation for subsequent analysis (such as feature extraction, target recognition, etc.). In the image processing process of this application, gray-scale processing is performed first and then noise reduction processing is performed. Noise reduction is performed on the single-channel gray-scale image, with less computational complexity and avoiding noise interference between color channels. Gray-scale conversion of color images can reduce unnecessary information in the image processing process and improve the image processing efficiency.
[0010] Further preferably, gray processing is implemented through the Rgb2gray function: Quantize the gray function matrix of the color image file from Equation 1 to Equation 2: Equation 1 Equation 2 where M represents the pixel size in the horizontal direction and N represents the pixel size in the vertical direction; represents the converted grayscale image function; , and represent the RGB components in the color image, where represents the component of the Red channel, represents the component of the Green channel, represents the component of the Blue channel.
[0011] There are many methods for grayscale conversion of color images. The common methods mainly include the component method, the maximum value method, the average value method, and the weighted average method. The MATLAB software can use the rgb2gray function to perform grayscale conversion of color images. The rgb2gray function adopts the weighted average method, and obtains the grayscale value by weighted summation of the three-component brightness in the color image file. The three-component brightness is the image feature of the color image. The specific component weights are determined according to the color image features of the specific soil-rock mixture. Aiming at the original color characteristics of the yellow soil and the gray-white rock, and the purpose of highlighting the rock, the weights of the Green (G) channel and Blue (B) channel components are increased after trial calculation, that is, R = 0.15 - 0.35, G = 0.30 - 0.50, B = 0.25 - 0.55. Preferably, the darkness to brightness of the image is expressed in the range of 0 to 255, the number of pixels corresponding to the grayscale level of each pixel is counted, and a grayscale histogram is established; the abscissa represents the grayscale level from 0 to 255, and the ordinate represents the number of pixels. The image contrast and darkness / brightness characteristics are determined through the number of pixels.
[0012] Grayscale histogram stretching is to adjust the pixel distribution in the histogram, expand the difference between the foreground and background grayscales, and thus enhance the image contrast. Therefore, the histogram can be used to enhance images with overexposure or underexposure, and has a good effect on images with too bright or too dark backgrounds.
[0013] The images captured by the imaging device are all digital images composed of pixels. Any one pixel contains two important attributes: pixel grayscale value and pixel position. The amount of light perceived by the human eye system can be represented by the pixel distribution of the grayscale value, and the computer can represent the darkness to brightness of the image in the range of 0 to 255.
[0014] Count the number of pixels corresponding to each gray level, which is the gray histogram. In the gray histogram, the abscissa represents the gray level and the ordinate represents the number of pixels. We can intuitively obtain the relationship between any pixel gray level and its number of pixels. Therefore, the contrast and light-dark characteristics of the image can be determined by the number of pixels at each gray level of the image.
[0015] Although the number of pixels at each gray level can be clearly and intuitively represented in the gray histogram, the specific position of the gray-level pixels cannot be shown. Thus, each image has its definite histogram, but one histogram can correspond to multiple images. Histogram equalization is based on this feature, using the cumulative function to adjust the gray value, thereby enhancing the contrast of a specific image.
[0016] Preferably, perform gamma correction on the gray histogram. Specifically: Equation 3 Among them, when the exposure is insufficient, take γ < 1 to achieve the purpose of non-linearly enhancing the brightness of the dark part; when the exposure is excessive, take γ > 1 to reduce the overall brightness.
[0017] During the image acquisition process, due to the influence of the shooting equipment and environment, the image processing process is often affected by noise, which will cause the image to become blurred, reduce the image quality, and affect the accuracy of data analysis. The noise reduction process usually adopts a filtering method. Filtering is to filter specific frequencies in the image signal, which is beneficial to suppressing noise.
[0018] Through comparison of various noise reduction methods, it is found that the median filter in this application is simple to calculate and has a good effect.
[0019] Preferably, in step 2, the fine adjustment is carried out as follows: Step 21: Remove the soil particles attached to the surface of the block stone in the preprocessed map file through binarization processing. Adopt the local adaptive threshold segmentation method to distinguish the block stone and the soil body, and realize the extraction of the block stone target to obtain the intermediate first map file; As follows: Equation 5 In the formula, is the function representation after binarization; represents the binarization threshold; Step 22: Fill the holes in the closed area of the image in the intermediate first map file through the Imfill(BW, Holes) function in Matlab to obtain the intermediate second map file; Step 23: First, perform image erosion on the intermediate second image file using an opening operation, and then perform dilation processing to obtain an intermediate third image file.
[0020] To further process the aggregate surface adhesion situation in the image, the preprocessed image file needs to be binarized. For images with a large difference in gray levels between the target and the background, the threshold segmentation method is usually adopted. According to the difference in gray levels between the target object and other objects, a reasonable gray level value is selected as the threshold. Through the comparison operation between the image pixel value and the threshold, the image is divided into the target object and the background, achieving the effect of image segmentation. The key to binarizing a gray image lies in setting a reasonable threshold. T , due to different principles for selecting the threshold, the effects after segmentation by various threshold segmentation methods vary greatly. Currently, the following several common threshold segmentation methods are mainly used: the bimodal method, the Otsu method, the self-set threshold method, and the local adaptive threshold method. The local adaptive threshold segmentation method can capture small-scale features such as pores and particle boundaries in the soil-rock mixture, avoiding misjudgment of locally contrast-sensitive regions by other methods.
[0021] Specifically, the present invention proposes to combine the 5-mm soil-rock threshold feature of the soil-rock mixture and constrain the threshold selection through an energy function as follows:
[0022] In the formula, P seg represents the proportion of particles with a particle size ≥ 5 mm in the segmented image, that is, the proportion of block stones; P exp represents the true proportion measured by on-site sampling and sieving; is the regularization coefficient. Through iterative segmentation, P seg is obtained, and T is adjusted to make P seg approach P exp , and a threshold that conforms to the actual situation can be obtained. T . During the iterative process, if P seg and P exp have a large difference, then is increased to strengthen the physical constraint.
[0023] It should be noted that Image_Loss( T ) represents the image segmentation loss term, which is used to quantify the difference between the result after segmentation using the threshold T and the ideal segmentation. The information loss of the unsupervised loss is compensated by the physical constraint of the soil-rock threshold. Specifically, after normalizing the image segmentation loss term and the physical constraint term, , as shown in the following formula:
[0024] In the embodiments of the present invention, after calculation T the value is taken as 170.
[0025] After the image is calculated, due to the complex surface texture of the aggregate particles, the presence of impurities during the rock property process, or the influence of the shooting light, there are small holes on the surface of the aggregate particles, which will affect the subsequent statistics of the pixel points of the aggregate particles. It is necessary to fill the holes. Call the MATLAB function imfll(BW,holes) to fill the holes in the image. This function can fill the holes in the closed area of the image.
[0026] Preferably, in step 23, the edge shape of the block stone is restored and the internal holes are further repaired through image morphological processing. Considering the characteristics that there is adhesion between particles and local protrusions at the boundary in the binary image of the soil-rock mixture, the opening processing operation is used to first perform image erosion to eliminate the protruding and meaningless points at the edge of the block stone image and disconnect the small connections caused by soil particles between the block stones. This process uses element A to perform erosion calculation on the target block stone B, denoted as , which is represented by the mathematical set as formula 6: Formula 6 In formula 6, A c represents the complement set of set A; Preferably, after the erosion treatment, image dilation treatment is performed to expand the edge of the block stone outward. The dilation operation expands the edge of the image target outward, which can be used to shrink or eliminate the holes inside the image target, shrink or eliminate the holes inside the block stone image, and repair the depression at the edge of the block stone. This process uses element B to perform dilation operation on the target block stone A, denoted as A B, which is represented by the mathematical set as formula 7: Formula 7 In formula 7: ( B ) z represents the mapping of set B translated by z; z represents the translation distance.
[0027] In the actual application process of image processing, neither erosion nor dilation operations alone can achieve better processing effects. By combining the two operations, operations such as opening and closing are formed. When the target A is first dilated by the structuring element B and then eroded by B, A is subjected to the morphological closing operation by B; when the target A is first eroded by the structuring element B and then dilated by B, A is subjected to the morphological opening operation by B. The closing operation can fill the small holes and narrow gaps inside the object and smooth the contour of the target; the opening operation can eliminate the small protrusions on the target edge, disconnect the small connections, and at the same time can smooth the target contour. According to the characteristics of the binary image of the mixture, such as particle adhesion and small protrusions at the boundary, the opening operation is selected to perform morphological operations on the binary image of the mixture.
[0028] There are small particle points in the background of the image after the opening operation, which are small particles that have not been mixed with the binder; in addition, a small amount of cement mortar adheres to the surface of the large-size aggregate, resulting in holes inside the large particles in the image. To reduce the statistical error of the particle area caused by the above two situations in the image, the bwareaopen function in MATLAB can be used to filter out the small particles in the image, and the imfl function can be used to fill the holes in the aggregate in the image.
[0029] Morphological processing is to extract useful image components that express and depict the shape of the region from the image, which is beneficial for subsequent recognition work to capture the essential features of the target object. The basic idea is to measure or extract the corresponding shapes and characteristics in the image with a certain structuring element. Morphological processing mainly includes operations such as dilation, erosion, opening, and closing. Among them, erosion and dilation operations are the basis of morphological image processing. The binary image of the mixture can be better restored to the structural shape of the aggregate edge and the holes that appear inside the aggregate in the image by using morphological processing.
[0030] In the image after dilation processing, there are still some small-scale connected non-block regions remaining in the image processing due to the incomplete exposure of the block stones and the voids between soil and stones.
[0031] Therefore, further preferably, the bwareaopen(BW, P) function in Matlab is used for area filtering to eliminate the non-block regions after dilation processing, and then a Gaussian filter is used for edge smoothing of the block stones in the image.
[0032] The Gaussian smoothing filter is very effective in suppressing noise that follows a normal distribution. It can smooth the image while retaining more of the overall gray distribution characteristics of the image. One-dimensional zero-mean Gaussian function The discrete approximation is as follows:
[0033] In the formula, is the standard deviation, is the variance, x is the random variable, and e is the natural constant, taking the value of 2.718.
[0034] Two-dimensional Gaussian distribution function : .
[0035] determines the degree of data dispersion and is the most important parameter in Gaussian filtering. When is smaller, the amplitude at the center of the Gaussian kernel template is larger, and the rate of decrease of the surrounding values is faster. This Gaussian kernel cannot achieve a good smoothing effect on the image; on the contrary, when is larger, the coefficients of the Gaussian kernel are relatively smooth and can be regarded as performing mean filtering on the image, and the smoothing effect is similar to that of mean filtering.
[0036] Using the Gaussian kernel as the convolution kernel is one of the cores of the Gaussian filter, which can be used to remove excessive details and noise to blur the image while retaining the main part. For convenience in actual operation, only the values within 3 times the standard deviation around the data mean are considered, and the information provided by the rest is too little to be taken into account.
[0037] Preferably, it further includes step 4: extracting the original fabric information of the soil-rock mixture from the final map file. By measuring and positioning the block stones in the final map file, the original information of the block stones in the image can be obtained; the original information includes: maximum particle size, aspect ratio, roughness, area difference ratio, angularity index, orientation, and stone content information.
[0038] Preferably, the boundaries of the block stones in the image are highlighted by the Canny edge detection algorithm, and the soil particles and the image background in the image are eliminated to obtain the first final processed image. By measuring and positioning the block stones in the first final processed image, the original information of the block stones in the image can be obtained.
[0039] Further preferably, the optimization and improvement of the Canny edge detection are groundbreaking. Based on the principle of the first-order differential of the Sobel operator, an optimization method of adding hysteresis threshold double-threshold judgment and non-maximum suppression is added. This effectively avoids the appearance of multi-response edges, accurately locates the edges and improves the positioning accuracy at the same time; the double-threshold judgment further improves the detection accuracy of the edges.
[0040] Compared with the prior art, the beneficial effects of the present invention: In the technical solution of the present invention, in order to overcome the technical defects that the image recognition accuracy of soil-rock mixture materials is significantly affected by the shooting environment and equipment noise, and the lack of technical means for removing the soil particles attached to the surface of block stones results in technicians being unable to fully obtain the original information of the soil-rock mixture structure, a method for extracting the original information of the soil-rock mixture structure is proposed. Through Matlab image processing technology, this solution realizes the quantification of the mesoscopic characteristics of the soil-rock mixture by means of preprocessing, fine-tuning, and local fine-tuning of the color image file of the soil-rock mixture. Matrix Laboratory (Matlab) has a powerful preprocessing function, which can optimize the defects existing in the gray-scale image recognition technology, and then form the extraction of the original information of the soil-rock mixture structure characteristics, providing an advanced technical means for engineering material analysis. It can effectively obtain information such as the maximum particle size, aspect ratio, roughness, area difference ratio, angularity index, orientation, and stone content of the soil-rock mixture, providing support for material science evaluation and engineering applications. And it will not cause irreversible damage to the block stone material. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of the extraction method of the present invention.
[0042] Figure 2 It is a schematic diagram of the initial image file after gray-scale processing in Embodiment 1 - Embodiment 3 of the present invention. Figure 2 Among them, a1 is the color image file to be processed in Embodiment 1, b1 is the gray-scale processed image of the color image file to be processed in Embodiment 1, a2 is the color image file to be processed in Embodiment 2, b2 is the gray-scale processed image of the color image file to be processed in Embodiment 2, a3 is the color image file to be processed in Embodiment 3, and b3 is the gray-scale processed image of the color image file to be processed in Embodiment 3.
[0043] Figure 3 It is the gray-scale histogram established for the initial image file in Embodiment 1 - Embodiment 3 of the present invention. Figure 3 Among them, b1 is the gray-scale histogram of Embodiment 1, b2 is the gray-scale histogram of Embodiment 2, and b3 is the gray-scale histogram of Embodiment 3.
[0044] Figure 4 It is a schematic diagram of the initial image file after noise reduction processing in Embodiment 1 - Embodiment 3 of the present invention. Figure 4 Among them, b1 is the noise reduction processed image of Embodiment 1, b2 is the noise reduction processed image of Embodiment 2, and b3 is the noise reduction processed image of Embodiment 3.
[0045] Figure 5 It is a schematic diagram of the initial image file after binarization in Embodiment 1 - Embodiment 3 of the present invention. Figure 5Among them, b1 is the binarization processing diagram of Embodiment 1, b2 is the binarization processing diagram of Embodiment 2, and b3 is the binarization processing diagram of Embodiment 3.
[0046] Figure 6 It is a schematic diagram of the initial graphic file after hole filling in Embodiments 1 - 3 of the present invention. Figure 6 Among them, b1 is the schematic diagram after hole filling in Embodiment 1, b2 is the schematic diagram after hole filling in Embodiment 2, and b3 is the schematic diagram after hole filling in Embodiment 3.
[0047] Figure 7 It is a schematic diagram of the initial graphic file after dilation in Embodiments 1 - 3 of the present invention. Figure 7 Among them, b1 is the schematic diagram after dilation in Embodiment 1, b2 is the schematic diagram after dilation in Embodiment 2, and b3 is the schematic diagram after dilation in Embodiment 3.
[0048] Figure 8 It is a schematic diagram of the initial graphic file after erosion in Embodiments 1 - 3 of the present invention. Figure 8 Among them, b1 is the schematic diagram after erosion in Embodiment 1, b2 is the schematic diagram after erosion in Embodiment 2, and b3 is the schematic diagram after erosion in Embodiment 3.
[0049] Figure 9 It is a schematic diagram of the initial graphic file after area filtering in Embodiments 1 - 3 of the present invention. Figure 9 Among them, b1 is the schematic diagram after area filtering in Embodiment 1, b2 is the schematic diagram after area filtering in Embodiment 2, and b3 is the schematic diagram after area filtering in Embodiment 3.
[0050] Figure 10 It is a schematic diagram of the initial graphic file after edge smoothing in Embodiments 1 - 3 of the present invention. Figure 10 Among them, b1 is the schematic diagram after edge smoothing in Embodiment 1, b2 is the schematic diagram after edge smoothing in Embodiment 2, and b3 is the schematic diagram after edge smoothing in Embodiment 3.
[0051] Figure 11 It is a schematic diagram of the initial graphic file after edge detection in Embodiments 1 - 3 of the present invention. Figure 11 Among them, b1 is the schematic diagram after edge detection in Embodiment 1, b2 is the schematic diagram after edge detection in Embodiment 2, and b3 is the schematic diagram after edge detection in Embodiment 3. Detailed implementation manners
[0052] The present invention will be further described in detail below in conjunction with specific embodiments. However, this should not be construed as limiting the scope of the above - mentioned subject matter of the present invention to the following embodiments. All technologies implemented based on the content of the present invention belong to the scope of the present invention.
[0053] Example 1 This example provides a method for extracting the original information of the soil-rock mixture structure, referring to the flowchart in Figure 1 .
[0054] Among them, the processing object is Figure 2 a1 in Figure 2 . It can be seen from a1 in
[0055] that the rock blocks are obvious and have a large particle size. Specifically, the figure file is processed according to the following method: Figure 2 Step 1. Preprocess the a1 file in ; The preprocessing includes: performing grayscale processing and noise reduction processing on the entire color image file to obtain a preprocessed figure file; Specifically, the preprocessing is performed as follows: Figure 2 Step 11. First, perform grayscale processing on the color image file. The grayscale processing is implemented by the Rgb2gray function in Matlab. The three-component brightness in the color image file is weighted and summed to obtain the grayscale value. Specifically, the component weight values are determined according to the color image characteristics of the specific soil-rock mixture, and the weight value range is: R = 0.15 - 0.35, G = 0.30 - 0.50, B = 0.25 - 0.55; Equation 1 Equation 2 In the formula, M represents the pixel size in the horizontal direction, and N represents the pixel size in the vertical direction; represents the converted grayscale image function; , and represent the RGB components under the color image.
[0056] Among them, the component weight values are determined according to the color image characteristics of the soil-rock mixture. For example, Figure 1 the soil in Figure 2 is yellow, with high R and G and low B characteristics, and the rock is grayish white (R≈G≈B). Therefore, the weight of B needs to be significantly increased so that the grayish white rock is prominently displayed in the grayscale. In this example, R = 0.25, G = 0.45, G = 0.30; obtain The image brightness is expressed in the range of 0 to 255, and the number of pixels corresponding to the gray level of each pixel is counted to establish a gray histogram (the horizontal axis represents the gray level 0 to 255, and the vertical axis represents the number of pixels). The image contrast and brightness characteristics are determined by the number of pixels. Establish a gray histogram of gray level-pixel number, such as Figure 3 As shown in b1 of FIG. 1 , and correction processing is performed on the underexposed and overexposed positions in the image file; Specifically, gamma correction is performed on the grayscale histogram: Formula 3 When the exposure is insufficient, γ<1 is used to achieve the purpose of nonlinearly improving the brightness of the dark part; when the exposure is excessive, γ>1 is used to reduce the overall brightness.
[0057] Step 12: Perform noise reduction processing on the image file. The noise reduction processing adopts a 3×3 template median filter to perform noise reduction processing on the image. The median filter is implemented using the Medfilt 2 function in Matlab, as shown in Formula 4 below: medfilt 2 Formula 4 In the formula, —Original grayscale image; —Image after median filtering. Figure 4 b1 is a schematic diagram after noise reduction processing.
[0058] Step 2, fine-tuning the pre-processed image file in step 1, wherein the fine-tuning includes: restoring the edge shape of the block stone in the image file, repairing the internal holes of the block stone, and obtaining an intermediate image file; More specifically, the fine tuning is performed in the following manner: Step 21, removing the soil particles attached to the surface of the block stone in the pre-processed image file by binarization processing, using a local adaptive threshold segmentation method to distinguish between the block stone and the soil, extracting the block stone target, and obtaining the first intermediate image file; Figure 5 The b1 shows the binarized image; As follows: Formula 5 In the formula, is the binary function expression; represents the binarization threshold; To further process the aggregate surface adhesion situation in the image, it is necessary to binarize the preprocessed image file. For images with a large gray-scale difference between the target and the background, the threshold segmentation method is usually adopted. According to the gray-scale difference between the target object and other objects, a reasonable gray-scale value is selected as the threshold. By comparing the pixel values of the image with the threshold, the image is divided into the target object and the background, achieving the effect of image segmentation. The key to binarizing a grayscale image lies in setting a reasonable threshold T. Due to different principles of threshold selection, the effects after segmentation by various threshold segmentation methods vary greatly. In this embodiment, the local adaptive threshold segmentation method is preferably used in images with more variegated materials. However, for areas with less variegated materials, the local adaptive method is prone to produce incorrect segmentation problems. For the second-level fresh mixture image, the gray-scale value of the variegated area in the image is set to 170, that is, when the gray-scale value exceeds 170, the pixel points in the image may be variegated areas. To reduce the problems caused by the local adaptive threshold segmentation method, the intersection operation is performed on the binary image with a self-set threshold of 170 and the binary image obtained by local adaptive threshold segmentation, that is, when the same pixel point in both images is non-zero, it is white, and in other cases, it is black.
[0059] Step 22: Fill the holes in the closed area of the image in the intermediate first image file through the Imfill(BW, Holes) function in Matlab to obtain the intermediate second image file; after the image is processed through operations, due to the complex surface texture of aggregate particles, the existence of impurities during the rock property process, or the influence of the shooting light, there are small holes on the surface of aggregate particles, which will affect the subsequent statistics of aggregate particle pixel points and need to fill the holes. Call the MATLAB function imfll(BW, holes) to fill the holes in the image. This function can fill the holes in the closed area of the image. As shown in b1 in Figure 6 is the schematic diagram after hole filling.
[0060] Step 23: First perform image erosion on the intermediate second image file using the opening operation, and then perform dilation processing to obtain the intermediate third image file.
[0061] Restore the edge shape of the block stone and further repair the internal holes through image morphological processing. Considering the characteristics that there are adhesions between particles and local protrusions at the boundary in the binary image of the soil-rock mixture, the opening operation is first used for image erosion to eliminate the protruding and meaningless points at the edge of the block stone image and disconnect the fine connections caused by soil particles between the block stones. This process uses element A to perform erosion calculation on the target block stone B, denoted as , which is represented by the mathematical set as Equation 6: Equation 6 In Equation 6, A cDenotes the complement of set A; the image after erosion is as shown in Figure 7 b1 in it is the schematic diagram after dilation.
[0062] After the erosion process, image dilation is performed to expand the edge of the block stone outward. The dilation operation expands the edge of the image target outward, which can be used to shrink or eliminate the holes inside the image target, shrink or eliminate the holes inside the block stone image, and repair the depression on the edge of the block stone. This process uses element B to perform a dilation operation on the target block stone A, denoted as A B, which is represented by mathematical set as Equation 7: Equation 7 In Equation 7: ( B ) z Denotes the mapping of set B translated by z; z represents the translation distance.
[0063] The image after dilation is as shown in Figure 8 b1 in it is the schematic diagram after erosion.
[0064] Step 3: Perform local fine-tuning on the intermediate graph file in Step 2. The local fine-tuning includes: performing area filtering to eliminate the non-block stone areas in the intermediate graph file, and smoothing the edges of the block stones in the image to obtain the final graph file.
[0065] There are still some small-scale connected non-block stone areas remaining in the image processing due to the incomplete exposure of the block stones and the gaps between soil and stones after the dilation process. Further preferably, the bwareaopen(BW, P) function in Matlab is used for area filtering to eliminate the non-block stone areas after dilation, as shown in Figure 9 b1 in it is the image after area filtering.
[0066] Then, a Gaussian filter is used to smooth the edges of the block stones in the image. As shown in Figure 10 b1 in it is the image after smoothing.
[0067] The Gaussian smoothing filter is very effective in suppressing noise that follows a normal distribution. It can smooth the image while retaining more of the overall gray distribution characteristics of the image. The discrete approximation of the one-dimensional zero-mean Gaussian function is as follows:
[0068] In the formula, is the standard deviation, is the variance, and x is the random variable; Two-dimensional Gaussian distribution:
[0069] The standard deviation σ of the Gaussian distribution determines the degree of data dispersion and is the most important parameter in Gaussian filtering. When σ is small, the amplitude at the center of the Gaussian kernel template is larger, and the surrounding values decrease faster. This Gaussian kernel cannot achieve a good smoothing effect on the image. On the contrary, when σ is large, the coefficients of the Gaussian kernel are relatively smooth, which can be regarded as performing mean filtering on the image, and the smoothing effect is similar to that of mean filtering. Using the Gaussian kernel as the convolution kernel is one of the cores of the Gaussian filter, which can be used to remove excessive details and noise, blur the image, and retain the main part. For convenience in actual operation, only the values within 3 times the standard deviation around the mean are concerned, and the information provided by the rest is too little to be taken into account.
[0070] Preferably, it further includes step 4. By using the Canny edge detection algorithm, the boulder boundaries in the image are highlighted, and the soil particles and the image background in the image are eliminated to obtain the first final processed image. As shown in b1 in Figure 11 which is the schematic diagram after edge detection. Extract the original fabric information of the soil-rock mixture from the final map file. By measuring and positioning the boulders in the final map file, the original information of the boulders in the image can be obtained. The original information includes: maximum particle size, aspect ratio, roughness, area difference ratio, angularity index, orientation, and stone content information. As shown in Table 1.
[0071] Example 2 This example provides a method for extracting the original fabric information of soil-rock mixture. Among them, the processing object is Figure 2 a2 in Figure 2 where the boulders in a2 are wrapped and the particle size is relatively small; Adopt the extraction method described in Example 1 to perform Figure 2 feature extraction on the color graphic file of a2 in Figure 2 The map files of each step include Figure 11 b2 of
[0072] Example 3 This example provides a method for extracting the original fabric information of soil-rock mixture. Among them, the processing object is Figure 2 a3 in
[0073] where the boulders in a3 are obviously wrapped and the particle size is small. Figure 2 Adopt the extraction method described in Example 1 to perform
[0074] feature extraction on the color graphic file of b3 in Figure 2 The map files of each step include Figure 11 b3 of
[0075] Table 1 isFigure 2 Summary Table of Information Parameters of Three Color Earth-Rock Documents in
[0076] The technical solution of the present invention aims to overcome the technical defects that the image recognition accuracy of earth-rock mixed materials is significantly affected by the shooting environment and equipment noise, and there is a lack of technical means for removing the soil particles attached to the surface of the block stones, resulting in the inability of technicians to fully obtain the original information of the earth-rock mixed material structure. The above-mentioned method for extracting the original information of the earth-rock mixed material structure is proposed. Through the image processing technology of Matrix Laboratory (Matlab), the color image files of the earth-rock mixed materials are processed by means of preprocessing, fine-tuning and local fine-tuning, etc., to realize the quantification of the mesoscopic characteristics of the earth-rock mixture. Matlab has a powerful preprocessing function, which can optimize the defects existing in the gray-scale image recognition technology, and then form the extraction of the original information of the earth-rock mixed material structure, providing an advanced technical means for engineering material analysis. The maximum particle size, aspect ratio, roughness, area difference ratio, angularity index, orientation and stone content of the earth-rock mixed materials can be effectively obtained, providing support for material science evaluation and engineering applications. And it will not cause irreversible damage to the block stone materials.
[0077] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for extracting the original information of the structure of a soil-rock mixture, characterized in that, It includes the following steps: Step 1: Take a color image of the soil-rock mixture to be processed and preprocess the color image file; The preprocessing includes: performing grayscale processing and noise reduction processing on the entire color image file to obtain a preprocessed image file; Step 2: Fine-tune the preprocessed image file in Step 1. The fine-tuning includes: restoring the edge shape of the block stones in the image file and repairing the internal holes of the block stones to obtain an intermediate image file; Step 3: Perform local fine-tuning on the intermediate image file in Step 2. The local fine-tuning includes: performing area filtering to eliminate non-block stone areas in the intermediate image file, and smoothing the edges of the block stones in the image to obtain a final image file.
2. The method for extracting the original information of the soil-rock mixture structure according to claim 1, characterized in that In Step 1, the preprocessing is carried out in the following manner: Step 11: First, perform grayscale processing on the color image file, establish a grayscale histogram of grayscale level - number of pixels; and perform correction processing on the positions of under-exposure and over-exposure in the image file; The grayscale processing is implemented through the Rgb2gray function in Matlab, and the three-component brightness in the color image file is weighted and summed to obtain the grayscale value; Step 12: Perform noise reduction processing on the image file. The noise reduction processing uses median filtering with a 3×3 template to perform noise reduction on the image, and the Medfilt2 function in Matlab is used to implement median filtering, as shown in Equation 4 below: medfilt 2 Equation 4 In the formula, — The original grayscale image; — The image after median filtering.
3. The method for extracting the original information of the soil-rock mixture structure according to claim 2, characterized in that Perform gamma correction on the grayscale histogram through Equation 3: Formula 3 Among them, when it is under-exposed, take γ < 1 to achieve the purpose of non-linearly enhancing the brightness of the dark part; when it is over-exposed, take γ > 1 to reduce the overall brightness.
4. The method for extracting the original information of the soil-rock mixture structure according to claim 1, characterized in that In Step 2, the fine-tuning is carried out according to the following method: Step 21: Remove the soil particles attached to the surface of the block stones in the preprocessed image file through binarization processing, use the local adaptive threshold segmentation method to distinguish the block stones and the soil body, and realize the extraction of the block stone target to obtain an intermediate first image file; As shown in the following formula: Formula 5 In the formula, is the function expression after binarization; represents the binarization threshold; Step 22: Fill the holes in the closed area of the image in the intermediate first image file through the Imfill(BW, Holes) function in Matlab to obtain an intermediate second image file; Step 23: First perform image erosion on the intermediate second image file using the opening operation, and then perform dilation processing to obtain an intermediate third image file.
5. The method for extracting the original information of the soil-rock mixture structure according to claim 4, characterized in that The binarization threshold: T is set to 170.
6. The method for extracting the original information of the soil-rock mixture structure according to claim 4, characterized in that In the said step 23, the image erosion is performed as follows: the target block stone B is eroded and calculated by using the element A, denoted as , which is represented by the mathematical set as shown in Equation 6: Formula 6; In Formula 6, A c represents the complement of set A; The expansion processing method is as follows: perform an expansion operation on the target block stone A using element B, denoted as A B, which is represented by the mathematical set as shown in Equation 7: Formula 7; In the formula: (B)z — the mapping of set B translated by z; z — the translation distance.
7. The method for extracting the original information of the soil-rock mixture structure according to claim 1, characterized in that, In Step 3, use the bwareaopen(BW, P) function in Matlab for area filtering to eliminate the non-block stone areas after dilation processing, and then use a Gaussian filter to smooth the edges of the block stones in the image. The variable BW is the input binary image, and P is the maximum number of pixels of the object.
8. The method for extracting the original information of the soil-rock mixture structure according to claim 7, wherein, One-dimensional zero-mean Gaussian function The discrete approximation is as follows: In the formula, is the standard deviation, is the variance, x is a random variable; e is the natural constant, taking 2.718; Two-dimensional Gaussian distribution function : 。 9. The method for extracting the original information of the soil-rock mixture structure according to claim 8, characterized in that, Only consider the information corresponding to the values within 3 standard deviations around the mean. 10. The method for extracting the original information of the soil-rock mixture structure according to claim 1, characterized in that, It also includes Step 4: Highlight the boundaries of the block stones in the image through the Canny edge detection algorithm, and eliminate the soil particles and the image background in the image to obtain a final image file. Measure and locate the block stones in the final image file, and the original information of the block stones in the image can be obtained; The original information includes: maximum particle size, aspect ratio, roughness, area difference ratio, angularity index, orientation, and stone content information.
Citation Information
Patent Citations
Soil crack feature information extraction method
CN110264459A
Ore image granularity detection algorithm based on image processing technology
CN111047555A
Line extraction method, line extraction equipment and computer storage medium
CN116205939A
Iron ore detection method and system based on artificial intelligence
CN116977827A
Screw flaw detection and feeding control method and system based on machine vision
CN119016362A