Method for detecting porosity and predicting strength of coal gangue concrete based on image recognition
By processing SEM images of gangue concrete using image recognition technology, the problems of insufficient nonlinear factor mapping capability and high detection cost in existing technologies are solved, and high-precision, low-cost porosity detection and strength prediction are achieved.
Patent Information
- Application Number
- CN202510727377.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies for predicting the compressive strength of gangue concrete have insufficient capabilities for mapping nonlinear factors, high porosity detection costs and environmental pollution, and it is difficult to balance efficiency and accuracy in existing methods.
An image recognition-based method was used to obtain SEM images of gangue concrete using an electron microscope. Adaptive median filtering and Gaussian blur processing were performed. Combined with gradient-direction adaptive histogram equalization, image segmentation and threshold detection were performed. The porosity was calculated using the grayscale-texture dual feature fusion algorithm and shape factor weighting, and a strength prediction model was established.
It achieves high-precision, low-cost porosity detection, improves the accuracy and efficiency of compressive strength prediction of gangue concrete, reduces detection costs and reduces environmental pollution.
Smart Images

Figure CN120635012A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building material performance evaluation, and in particular to a method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition. Background Art
[0002] Concrete strength design is crucial to the safety of building structures. Accurately predicting the compressive strength of gangue concrete is a key requirement for engineering construction. Existing methods for predicting the compressive strength of gangue concrete have many problems:
[0003] (1) Traditional empirical formulas usually rely on regression analysis of a large amount of test data under specific mix ratios and raw material conditions. In essence, they are strength prediction models based on linear fitting. When the gangue material, chemical activity, and particle size distribution change, or when auxiliary cementitious materials such as fly ash and slag are introduced to form a complex admixture system, they lack the ability to map nonlinear factors.
[0004] (2) Existing technologies are expensive and pollute the environment when testing porosity. Although the traditional mercury intrusion method can obtain pore size distribution information, the test process requires applying a pressure of up to 200 MPa, which will artificially induce the expansion of concrete microcracks, causing the test results to deviate from the actual pore structure; a single test requires the consumption of about 50-100g of mercury reagent, which is expensive, and improper disposal of waste mercury can easily cause soil and water pollution. Although the helium porosity method avoids the pollution problem, it requires a vacuum system and high-purity helium, and the cost of a single test is high. The non-destructive testing technology based on CT scanning, with its submillimeter resolution, cannot identify pores smaller than 50μm, and there is a technical bottleneck that is difficult to balance efficiency and accuracy.
[0005] Based on the above problems, there is an urgent need for a high-efficiency and low-cost method for predicting the compressive strength of gangue concrete. Summary of the Invention
[0006] In order to solve the problems that the existing methods for predicting the compressive strength of gangue concrete are difficult to detect porosity efficiently and the prediction accuracy of the compressive strength of gangue concrete is low, a method for predicting the strength of gangue concrete based on porosity detection based on image recognition is proposed. The SEM images of gangue concrete are subjected to preliminary image enhancement processing, and then the segmentation ratio is determined according to the resolution of the image. The segmented sub-images are binarized to segment the pores in the image, and the image edges are filled with information to accurately identify the porosity, and then the compressive strength of gangue concrete is predicted based on the porosity.
[0007] To achieve the above objectives, the present invention proposes a method for predicting the strength of coal gangue concrete based on porosity detection based on image recognition, comprising:
[0008] Step 1: Take the cured gangue concrete specimen as the test object, conduct an electron microscope imaging experiment on the test object, scan the test object, and obtain a clear SEM image of the gangue concrete.
[0009] Step 2: The SEM image is processed by cascading adaptive median filtering and Gaussian blurring, and directional contrast enhancement is performed using adaptive histogram equalization based on gradient direction to obtain a preprocessed image;
[0010] Step 3: Determine the segmentation ratio based on the resolution of the SEM image, and perform equal-proportion segmentation on the pre-processed image to obtain multiple sub-images;
[0011] Step 4: Use the grayscale-texture dual feature fusion algorithm to perform dynamic threshold detection on each sub-image to obtain the threshold T;
[0012] Step 5: Generate a binary image based on the threshold T, and perform edge filling and weighting calculation on the binary image;
[0013] Step 6: Calculate the porosity of the object according to the area of the pore region in the binary image by combining the shape factor weighting and the spatial position weighting;
[0014] Step 7: Given the mix ratio of coal gangue concrete, calculate the cement content;
[0015] Step 8: Establish a strength prediction model and calculate the compressive strength of gangue concrete by combining cement content, porosity, theoretical strength of gangue concrete and experimental coefficient.
[0016] Furthermore, the step 2 specifically includes:
[0017] Step 2.1: Adaptive median filtering is performed on the SEM image. The window size (3×3 to 7×7) is dynamically adjusted according to the noise density in the local area, with the pore edge details being prioritized and isolated noise points being removed.
[0018] Step 2.2: Use a Gaussian kernel with a value of σ = 1.5 to 2.5 to smooth the image, weaken the surface reflection noise of the mineral crystals, and highlight the grayscale difference between the pores and the matrix;
[0019] Step 2.3: Based on the gradient directions of 0°, 45°, 90°, and 135°, adaptive histogram equalization is performed on the sub-images in each direction to enhance the contrast of pore edges in different directions. The enhancement results of the four directions are fused to retain the edge details of complex pores and avoid noise caused by over-enhancement.
[0020] This method is used to enhance the heterogeneity of coal gangue concrete. It employs multimodal noise suppression to reduce common electronic noise (such as salt and pepper noise and Gaussian noise) and interference from mineral particle reflections in SEM images. It performs adaptive histogram equalization (CLAHE) on each directional subimage to enhance the contrast of pore edges along different orientations. The four-directional enhancement results are then combined to preserve edge details of complex pores (such as cracks and interconnected pores) while avoiding the over-enhancement caused by traditional CLAHE.
[0021] Furthermore, the step 3 specifically includes:
[0022] Step 3.1: Adopt hierarchical adaptive segmentation based on the SEM image resolution (usually 500 × 500 to 2000 × 2000 pixels) and pore size variation (micrometer to submillimeter). The initial segmentation ratio is 1 / 4 to 1 / 8 (automatically calculated based on the resolution, e.g., a 1000 × 1000 pixel image is segmented into 8 × 8 subimages) to ensure that each subimage contains 50 to 200 typical pores.
[0023] Step 3.2: The sub-images with porosity greater than 15% or less than 5% after segmentation are further segmented into 2×2 sub-regions to avoid the pores in the large-size sub-image being masked by the matrix or the small-size sub-image having too high a proportion of noise.
[0024] Traditional segmentation extracts areas with the same grayscale value in the image based on grayscale differences. This method segments the original image based on the resolution of the SEM image and the scale of the shooting. Its main function is to determine whether to further refine the accuracy based on the SEM shooting accuracy to extract pores of different sizes to ensure accurate identification.
[0025] Furthermore, the step 4 specifically includes:
[0026] Step 4.1: Grayscale threshold: Use Otsu algorithm to calculate the global initial threshold Tg;
[0027] Texture thresholding: extract local binary pattern texture features of each sub-image, calculate the texture complexity threshold Tt, and remove pseudo-pores with texture complexity higher than that of the matrix (such as pits on the surface of coal gangue particles);
[0028] Step 4.2: The threshold T is shown in formula (1):
[0029] T = 0.6Tg + 0.4Tt (1);
[0030] Among them, 0.6 and 0.4 are weighted, and the distinction between pores and non-pores is improved through weighted fusion.
[0031] The traditional Otsu algorithm is based solely on grayscale histograms, ignoring the texture characteristics of pores in gangue concrete. This method improves the distinction between pores and non-pores (such as gangue particles and cement hydration products) through weighted fusion.
[0032] A binary image is generated based on the threshold T, and the pore part is clearly highlighted, achieving effective separation of pores and non-pore areas.
[0033] Furthermore, the edge filling in step 5 includes:
[0034] First, a 3×3 diamond structuring element is used to perform a dilation operation. By expanding the pore edge pixels toward the periphery, the fracture gaps of adjacent pores are effectively connected, so that the originally separated pore fragments are merged into a complete connected area. Subsequently, a 3×3 diamond structuring element of the same size is used for an erosion operation. By shrinking the outer boundary of the expanded pore, unnecessary pixels introduced during the dilation process are accurately removed, and the true geometric outline of the pore is restored.
[0035] Furthermore, the weighted calculation in step 5 includes shape factor weighting and spatial position weighting:
[0036] The form factor weightings include:
[0037] The shape factor F is calculated for each pore area using formula (2):
[0038] F=4πA / P(2);
[0039] Where A is the two-dimensional area of a single pore, and P is the perimeter of a single pore;
[0040] The shape factor is weighted according to the size of the calculated shape factor F. When the pores with F≤0.7 (elongated cracks) have a weight of 1.2, and the pores with F>0.7 (nearly circular pores) have a weight of 1.0, thus correcting the underestimation of the 3D pore volume by 2D slices.
[0041] Spatial position weighting includes:
[0042] The porosity weight of the sub-image located at the edge (there may be edge damage during SEM sample preparation) is 0.9, and the porosity weight of the sub-image located at the center is 1.
[0043] Furthermore, the step 6 specifically includes:
[0044] Step 6.1: Obtain the number of pixels A occupied by each independent pore in the two-dimensional image;
[0045] Step 6.2: Based on the porosity calculation formula (3), use the shape factor to weight the sub Figure 2 Maintenance positive porosity formula (4):
[0046] Praw = number of pore pixels / total number of pixels × 100% (3);
[0047] P a =∑(A×shape factor weighting coefficient) / total number of pixels in the sub-image×100% (4);
[0048] Step 6.3: Based on formula (4), introduce spatial position weighting to calculate the total number of pixels of the edge sub-image and the center sub-image respectively as shown in formulas (5)-(6);
[0049] Edge correction value = P a1 ×S1×0.9(5);
[0050] Center correction value = P a2 ×S2×1(6);
[0051] Among them, P a1 is the two-dimensional corrected porosity of the edge, S1 is the total area of the subgraph located at the edge, P a2 is the two-dimensional corrected porosity at the center, S2 is the total area of the subgraph located at the center;
[0052] Step 6.4: Calculate the porosity of the test object based on formulas (3), (5), and (6) as shown in formula (7):
[0053] P 总 =(edge correction value+center correction value) / total area×100% (7).
[0054] Furthermore, the intensity prediction model in step 8 is shown in formula (8):
[0055] σ=Kσ0C(1-P 总 ) (8);
[0056] Among them, σ is the predicted compressive strength of coal gangue concrete, σ0 is the ideal strength of coal gangue concrete when the porosity is 0, σ0 is only related to the cement grade and aggregate type, K is the test coefficient, P 总 is the porosity, C represents the cement content, 0<C≤1.
[0057] Through the above technical solution, the beneficial effects of the present invention are:
[0058] (1) The present invention achieves accurate and convenient porosity detection. High-resolution SEM images of gangue concrete specimens are obtained using an electron microscope. Adaptive median filtering and Gaussian blur cascade processing are used to remove salt and pepper noise, Gaussian noise, and mineral reflection interference. At the same time, adaptive histogram equalization is performed based on the four gradient directions of 0°, 45°, 90°, and 135° to enhance the edge contrast of pores with different orientations. The image is then layered and segmented into multiple sub-images at a ratio of 1 / 4 to 1 / 8 based on image resolution and pore size differences, and the porosity anomaly sub-images are further refined and segmented. The global grayscale threshold is calculated using the Otsu algorithm and combined with the local binary pattern texture feature threshold for dual feature fusion. A dynamic threshold is determined to separate pores from non-porous areas. The fractured edges of the pores are repaired through the expansion-erosion operation of 3×3 diamond structure elements. The porosity is calculated based on the dual correction of the pore shape factor and spatial position. This method accurately extracts pore features, corrects two-dimensional detection deviations, and obtains high-precision porosity.
[0059] (2) The present invention calculates cement content based on porosity and establishes a strength prediction model based on cement content, porosity, theoretical strength of gangue concrete, and experimental coefficient. The compressive strength of gangue concrete is predicted using the strength prediction model. Compared with existing technologies, this method has the advantages of high accuracy, simple detection, and low detection cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a workflow diagram of the method for predicting the strength of coal gangue concrete based on porosity detection based on image recognition of the present invention;
[0061] Figure 2 The present invention is a flowchart of the steps of a method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition. DETAILED DESCRIPTION
[0062] Example 1
[0063] like Figures 1-2 As shown, the method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition includes:
[0064] Step 1: Take the cured gangue concrete specimen as the test object, conduct an electron microscope imaging experiment on the test object, scan the test object, and obtain a clear SEM image of the gangue concrete.
[0065] Step 2: The SEM image is processed by cascading adaptive median filtering and Gaussian blurring, and directional contrast enhancement is performed using adaptive histogram equalization based on gradient direction to obtain a preprocessed image;
[0066] Step 3: Determine the segmentation ratio based on the resolution of the SEM image, and perform equal-proportion segmentation on the pre-processed image to obtain multiple sub-images;
[0067] Step 4: Use the grayscale-texture dual feature fusion algorithm to perform dynamic threshold detection on each sub-image to obtain the threshold T;
[0068] Step 5: Generate a binary image based on the threshold T, and perform edge filling and weighting calculation on the binary image;
[0069] Step 6: Calculate the porosity of the object according to the area of the pore region in the binary image by combining the shape factor weighting and the spatial position weighting;
[0070] Step 7: Given the mix ratio of coal gangue concrete, calculate the cement content;
[0071] Step 8: Establish a strength prediction model and calculate the compressive strength of gangue concrete by combining cement content, porosity, theoretical strength of gangue concrete and experimental coefficient.
[0072] The step 2 specifically includes:
[0073] Step 2.1: Adaptive median filtering is performed on the SEM image. The window size is dynamically adjusted according to the noise density in the local area, with the pore edge details being prioritized and isolated noise points being removed.
[0074] Step 2.2: Use a Gaussian kernel with a value of σ = 1.5 to 2.5 to smooth the image, weaken the surface reflection noise of the mineral crystals, and highlight the grayscale difference between the pores and the matrix;
[0075] Step 2.3: Based on the gradient directions of 0°, 45°, 90°, and 135°, adaptive histogram equalization is performed on the sub-images in each direction to enhance the contrast of pore edges in different directions. The enhancement results of the four directions are fused to retain the edge details of complex pores and avoid noise caused by over-enhancement.
[0076] The step 3 specifically includes:
[0077] Step 3.1: Adopt hierarchical adaptive segmentation based on the SEM image resolution and pore size differences. The initial segmentation ratio is 1 / 4 to 1 / 8 to ensure that each sub-image contains 50 to 200 typical pores.
[0078] Step 3.2: The sub-images with porosity greater than 15% or less than 5% after segmentation are further segmented into 2×2 sub-regions to avoid the pores in the large-size sub-image being masked by the matrix or the small-size sub-image having too high a proportion of noise.
[0079] The step 4 specifically includes:
[0080] Step 4.1: Grayscale threshold: Use Otsu algorithm to calculate the global initial threshold Tg;
[0081] Texture thresholding: extract the local binary pattern texture features of each sub-image, calculate the texture complexity threshold Tt, and remove pseudo-pores with texture complexity higher than that of the matrix;
[0082] Step 4.2: The threshold T is shown in formula (1):
[0083] T = 0.6Tg + 0.4Tt (1);
[0084] Among them, 0.6 and 0.4 are weighted, and the distinction between pores and non-pores is improved through weighted fusion.
[0085] The edge filling in step 5 includes:
[0086] First, a 3×3 diamond structuring element is used to perform a dilation operation. By expanding the pore edge pixels toward the periphery, the fracture gaps of adjacent pores are effectively connected, so that the originally separated pore fragments are merged into a complete connected area. Subsequently, a 3×3 diamond structuring element of the same size is used for an erosion operation. By shrinking the outer boundary of the expanded pore, unnecessary pixels introduced during the dilation process are accurately removed, and the true geometric outline of the pore is restored.
[0087] The weighted calculation in step 5 includes shape factor weighting and spatial position weighting:
[0088] The form factor weightings include:
[0089] The shape factor F is calculated for each pore area using formula (2):
[0090] F=4πA / P(2);
[0091] Where A is the two-dimensional area of a single pore, and P is the perimeter of a single pore;
[0092] The shape factor is weighted according to the size of the calculated shape factor F. When the pore weight is F≤0.7, it is set to 1.2, and when the pore weight is F>0.7, it is set to 1.0, thereby correcting the underestimation of the 3D pore volume by the 2D slice.
[0093] Spatial position weighting includes:
[0094] The porosity weight of the subgraph at the edge is 0.9, and the porosity weight of the subgraph at the center is 1.
[0095] The step 6 specifically includes:
[0096] Step 6.1: Obtain the number of pixels A occupied by each independent pore in the two-dimensional image;
[0097] Step 6.2: Based on the porosity calculation formula (3), use the shape factor to weight the sub Figure 2 Maintenance positive porosity formula (4):
[0098] Praw = number of pore pixels / total number of pixels × 100% (3);
[0099] P a =∑(A×shape factor weighting coefficient) / total number of pixels in the sub-image×100% (4);
[0100] Step 6.3: Based on formula (4), introduce spatial position weighting to calculate the total number of pixels of the edge sub-image and the center sub-image respectively as shown in formulas (5)-(6);
[0101] Edge correction value = P a1 ×S1×0.9 (5);
[0102] Center correction value = P a2 ×S2×1(6);
[0103] Among them, P a1 is the two-dimensional corrected porosity of the edge, S1 is the total area of the subgraph located at the edge, P a2 is the two-dimensional corrected porosity at the center, S2 is the total area of the subgraph located at the center;
[0104] Step 6.4: Calculate the porosity of the test object based on formulas (3), (5), and (6) as shown in formula (7):
[0105] P 总 =(edge correction value+center correction value) / total area×100% (7).
[0106] The intensity prediction model in step 8 is shown in formula (8):
[0107] σ=Kσ0C(1-P 总 ) (8);
[0108] Among them, σ is the predicted compressive strength of coal gangue concrete, σ0 is the ideal strength of coal gangue concrete when the porosity is 0, σ0 is only related to the cement grade and aggregate type, K is the test coefficient, Ptotal is the porosity, C represents the cement content ratio, 0<C≤1.
[0109] σ0 and K are obtained through regression fitting of a large amount of experimental data and the classic compressive strength prediction model. The values of σ0 and K for different aggregates are shown in Table 1.
[0110] Table 1 Values of σ0 and K for different aggregates
[0111]
[0112] In order to demonstrate the effect of the present invention, three experiments were conducted using the method of the present invention as shown in Table 2:
[0113] Table 2
[0114]
[0115] In the experiment, the porosity P (7.98%, 9.01% and 10.33%) was first calculated using the method of the present invention. Then, the experimental constants σ0 and K values of the gangue aggregate were determined based on the cement content C and Table 1. Finally, the predicted strength was obtained according to the strength prediction model formula (8).
[0116] It can be seen from Table 2 that the predicted strength obtained using the method of the present invention is very close to the uniaxial compressive strength, indicating that the method has high accuracy in predicting the compressive strength of coal gangue concrete and can be applied not only to concrete strength prediction but also to concrete strength mix design.
[0117] The embodiments described above are only preferred embodiments of the present invention and do not limit the scope of implementation of the present invention. Therefore, any equivalent changes or modifications made according to the structure, characteristics and principles described in the patent scope of the present invention should be included in the scope of the patent application of the present invention.
Claims
1. A method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition, characterized in that: include: Step 1: Take the cured gangue concrete specimen as the test object, conduct an electron microscope imaging experiment on the test object, scan the test object, and obtain a clear SEM image of the gangue concrete. Step 2: The SEM image is processed by cascading adaptive median filtering and Gaussian blurring, and directional contrast enhancement is performed using adaptive histogram equalization based on gradient direction to obtain a preprocessed image; Step 3: Determine the segmentation ratio based on the resolution of the SEM image, and perform equal-proportion segmentation on the pre-processed image to obtain multiple sub-images; Step 4: Use the grayscale-texture dual feature fusion algorithm to perform dynamic threshold detection on each sub-image to obtain the threshold T; Step 5: Generate a binary image based on the threshold T, and perform edge filling and weighting calculation on the binary image; Step 6: Calculate the porosity of the object according to the area of the pore region in the binary image by combining the shape factor weighting and the spatial position weighting; Step 7: Given the mix ratio of coal gangue concrete, calculate the cement content; Step 8: Establish a strength prediction model and calculate the compressive strength of gangue concrete by combining cement content, porosity, theoretical strength of gangue concrete and experimental coefficient.
2. The method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition according to claim 1, characterized in that: The step 2 specifically includes: Step 2.1: Adaptive median filtering is performed on the SEM image. The window size is dynamically adjusted according to the noise density in the local area, with the pore edge details being prioritized and isolated noise points being removed. Step 2.2: Use a Gaussian kernel with a value of σ = 1.5 to 2.5 to smooth the image, weaken the surface reflection noise of the mineral crystals, and highlight the grayscale difference between the pores and the matrix; Step 2.3: Based on the gradient directions of 0°, 45°, 90°, and 135°, adaptive histogram equalization is performed on the sub-images in each direction to enhance the contrast of pore edges in different directions. The enhancement results of the four directions are fused to retain the edge details of complex pores and avoid noise caused by over-enhancement.
3. The method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition according to claim 1, characterized in that: The step 3 specifically includes: Step 3.1: Adopt hierarchical adaptive segmentation based on the SEM image resolution and pore size differences. The initial segmentation ratio is 1 / 4 to 1 / 8 to ensure that each sub-image contains 50 to 200 typical pores. Step 3.2: The sub-images with porosity greater than 15% or less than 5% after segmentation are further segmented into 2×2 sub-regions to avoid the pores in the large-size sub-image being masked by the matrix or the small-size sub-image having too high a proportion of noise.
4. The method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition according to claim 1, characterized in that: The step 4 specifically includes: Step 4.1: Grayscale threshold: Use Otsu algorithm to calculate the global initial threshold Tg; Texture thresholding: extract the local binary pattern texture features of each sub-image, calculate the texture complexity threshold Tt, and remove pseudo-pores with texture complexity higher than that of the matrix; Step 4.2: The threshold T is shown in formula (1): T = 0.6Tg + 0.4Tt (1); Among them, 0.6 and 0.4 are weighted, and the distinction between pores and non-pores is improved through weighted fusion.
5. The method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition according to claim 1, characterized in that: The edge filling in step 5 includes: First, a 3×3 diamond structuring element is used to perform a dilation operation. By expanding the pore edge pixels toward the periphery, the fracture gaps of adjacent pores are effectively connected, so that the originally separated pore fragments are merged into a complete connected area. Subsequently, a 3×3 diamond structuring element of the same size is used for an erosion operation. By shrinking the outer boundary of the expanded pore, unnecessary pixels introduced during the dilation process are accurately removed, and the true geometric outline of the pore is restored.
6. The method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition according to claim 5, characterized in that: The weighted calculation in step 5 includes shape factor weighting and spatial position weighting: The form factor weightings include: The shape factor F is calculated for each pore area using formula (2): F=4πA / P (2); Where A is the two-dimensional area of a single pore, and P is the perimeter of a single pore; The shape factor is weighted according to the size of the calculated shape factor F. When the pore weight is F≤0.7, it is set to 1.2, and when the pore weight is F>0.7, it is set to 1.0, thereby correcting the underestimation of the 3D pore volume by the 2D slice. Spatial position weighting includes: The porosity weight of the subgraph at the edge is 0.9, and the porosity weight of the subgraph at the center is 1.
7. The method for predicting the strength of coal gangue concrete by detecting porosity based on image recognition according to claim 6, characterized in that: The step 6 specifically includes: Step 6.1: Obtain the number of pixels A occupied by each independent pore in the two-dimensional image; Step 6.2: Based on the porosity calculation formula (3), the shape factor is weighted to obtain the sub-graph two-dimensional corrected porosity formula (4): Pra w = number of pore pixels / total number of pixels × 100% (3); P a =∑(A×shape factor weighting coefficient) / total number of pixels in the sub-image×100% (4); Step 6.3: Based on formula (4), introduce spatial position weighting to calculate the total number of pixels of the edge sub-image and the center sub-image respectively as shown in formulas (5)-(6); Edge correction value = P a1 ×S1×0.9 (5); Center correction value = P a2 ×S2×1 (6); Among them, P a1 is the two-dimensional corrected porosity of the edge, S1 is the total area of the subgraph located at the edge, P a2 is the two-dimensional corrected porosity at the center, S2 is the total area of the subgraph located at the center; Step 6.4: Calculate the porosity of the test object based on formulas (3), (5), and (6) as shown in formula (7): P 总 =(edge correction value+center correction value) / total area×100% (7).
8. The method for predicting the strength of coal gangue concrete based on porosity detection based on image recognition according to claim 1, characterized in that: The intensity prediction model in step 8 is shown in formula (8): σ=Kσ0C(1-P 总 ) (8); Among them, σ is the predicted compressive strength of coal gangue concrete, σ0 is the ideal strength of coal gangue concrete when the porosity is 0, σ0 is only related to the cement grade and aggregate type, K is the test coefficient, P 总 is the porosity, C represents the cement content, 0<C≤1.