Image enhancement method for low voltage leakage protection in coal mines
By employing techniques such as multi-scale decomposition, adaptive thresholding, nonlinear mapping, and anisotropic diffusion, combined with morphological top-hat transformation and directional filters, the accuracy issues of image enhancement and leakage current detection in underground coal mines have been resolved, achieving high-quality image enhancement and real-time leakage current detection.
Patent Information
- Application Number
- CN202411131566.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional image enhancement methods struggle to capture details in both bright and dark areas in underground coal mine environments, and existing technologies are unable to achieve high-quality image enhancement and detail extraction under extreme lighting and various noise conditions, leading to inaccurate leakage current detection.
By employing techniques such as multi-scale decomposition, adaptive thresholding, nonlinear mapping functions, anisotropic diffusion, and local binary pattern features, combined with morphological top-hat transformation and directional filters, the brightness, contrast, and texture details of underground coal mine images are enhanced, enabling real-time leakage detection.
It significantly improves the quality and detail of underground coal mine images, enhances the accuracy of identifying low-voltage leakage characteristics, enables real-time detection and alarm, and ensures safety in underground coal mines.
Smart Images

Figure CN118657917B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image enhancement, and in particular relates to an image enhancement method for low-voltage leakage protection in underground coal mines. Background Art
[0002] Low-voltage leakage is a common electrical fault in coal mines, which may cause serious safety accidents such as fire and explosion. Traditional low-voltage leakage detection methods mainly rely on the monitoring of electrical parameters such as current, voltage and grounding resistance. However, in the complex environment of coal mines, these parameters are easily interfered by noise, and the detection results are often not accurate enough. Through image enhancement technology, the clarity and detail of the image can be significantly improved, so that the characteristics of low-voltage leakage can be more accurately detected using image analysis and intelligent recognition technology. Specifically, image enhancement can help to see the status of cables, grounding devices and other electrical equipment more clearly, and identify early signs of electrical faults such as arc discharge, insulation damage and overheating. The environment of coal mines is complex, the lighting conditions are poor, and there is a lot of dust and noise, which seriously affects the image quality. In this environment, traditional image processing methods are difficult to meet the requirements of safety monitoring and management. In the existing technology, methods such as image enhancement, denoising and detail extraction are usually used to improve image quality, but these methods often show some shortcomings when facing the specific environment of coal mines. Traditional image enhancement methods mainly include histogram equalization, contrast stretching and gamma correction. These methods enhance the visibility of images by adjusting the brightness and contrast of images. However, in coal mines, due to extreme lighting conditions and uneven distribution of light sources, traditional enhancement methods often cannot provide sufficient detail enhancement. Histogram equalization has limited effect in areas with too little light, and gamma correction can easily cause images to be overexposed or too dark.
[0003] The lighting conditions in coal mines are extremely uneven, and traditional image enhancement methods are difficult to balance the details of bright and dark areas. Histogram equalization and contrast stretching methods are not ideal when processing low-light and high-contrast scenes, which can easily lead to overexposure or loss of details. There are many types of noise in coal mine images, such as coal dust and equipment noise. Traditional denoising methods (such as mean filtering, Gaussian filtering, etc.) often blur image details while removing noise, which cannot meet the needs of actual applications. Although advanced denoising methods have good effects, they have high computational complexity and are not suitable for real-time monitoring. Although edge detection and sharpening can enhance image details, these methods will amplify noise in noisy environments, causing further deterioration of image quality. Existing detail extraction technologies are difficult to strike a balance between retaining details and suppressing noise when processing coal mine images. Most existing image processing technologies are designed for general scenarios and lack specialized solutions for the complex environment of coal mines. The coal mine environment has unique challenges, such as extreme lighting conditions and various types of noise. Existing technologies are difficult to achieve high-quality image enhancement and detail extraction under these conditions. Summary of the invention
[0004] The main purpose of the present invention is to provide an image enhancement method for low-voltage leakage protection in coal mines. The present invention significantly improves the quality of images in coal mines. Through image enhancement technology, the quality and detail of the image are improved; through feature extraction and classification models, accurate recognition and judgment of low-voltage leakage characteristics are achieved; through edge computing, real-time leakage detection and alarm are achieved.
[0005] In order to solve the above problems, the technical solution of the present invention is achieved as follows:
[0006] A method for image enhancement for low-voltage leakage protection in underground coal mines, the method comprising:
[0007] Step S1: Acquire an underground coal mine image and perform image enhancement on the underground coal mine image;
[0008] Step S2: judging whether a low voltage leakage occurs based on the enhanced image;
[0009] The step S1 specifically includes:
[0010] Step 1: Perform multi-scale decomposition on the coal mine underground image, and then apply an adaptive threshold to suppress coal dust noise to obtain the first intermediate image;
[0011] Step 2: Apply a nonlinear mapping function to the first intermediate image for low-light enhancement to obtain a second intermediate image;
[0012] Step 3: Perform rock texture enhancement on the second intermediate image by combining anisotropic diffusion and local binary pattern features to obtain a third intermediate image;
[0013] Step 4: Use morphological top hat transform and directional filter combination to detect and enhance coal seam cracks on the third intermediate image to obtain an enhanced image.
[0014] Furthermore, in step 3, the process of enhancing the rock texture of the second intermediate image by combining anisotropic diffusion and local binary pattern features specifically includes: setting initial edge sensitivity parameters, similarity control parameters and local binary pattern feature influencing parameters; calculating multi-scale local binary pattern features of the second intermediate image; using the gradient of the second intermediate image to construct a structure tensor, and then iteratively executing the following process until the set number of iterations is reached: based on the structure tensor, calculating the diffusion tensor and constructing an anisotropic diffusion equation; defining a nonlinear diffusion function to control the diffusion process, reducing diffusion near the edge and increasing diffusion in flat areas; during the diffusion process, updating the edge sensitivity parameters, similarity control parameters and local binary pattern feature influencing parameters, and solving the anisotropic diffusion equation to update the image.
[0015] Furthermore, in step 4, the process of using the morphological top hat transformation and the directional filter combination to detect and enhance the coal seam fissures and obtain the enhanced image specifically includes:
[0016] Step 4.1: construct multiple linear structural elements in different directions, construct a corresponding directional Gaussian filter for each direction, and perform directional processing on each direction, specifically including: using the structural element to perform an opening operation on the third intermediate image, eliminating bright areas smaller than the structural element, and separating possible cracks; calculating the difference between the third intermediate image and the result of the opening operation, and performing a top-hat transformation; multiplying the result of the top-hat transformation with the corresponding directional Gaussian filter;
[0017] Step 4.2: For each pixel of the third intermediate image, compare the results after processing in all directions, select the maximum response value, and form a crack feature map; add the crack feature map to the third intermediate image to obtain an enhanced image.
[0018] Furthermore, the coal mine underground image is decomposed at multiple scales by the following formula, and then an adaptive threshold is applied to suppress the coal dust noise to obtain the first intermediate image:
[0019] ;
[0020] in, is the first intermediate image; represents the inverse wavelet transform operation; represents the wavelet coefficients, where: represents the decomposition scale level, represents the spatial position at a specific scale, Represents pixel coordinates; is the horizontal axis coordinate; is the vertical axis coordinate; is a scale-dependent threshold parameter, which changes with the decomposition scale It changes with the change of , which is used to control the noise suppression strength at different scales; Represents the wavelet coefficients Neighborhood of; Representation calculation The sum of squares of wavelet coefficients in the neighborhood represents the local energy; and is in the neighborhood The coordinates within; is a soft threshold function used to suppress noise: if the square root of the local energy is less than the threshold , the coefficients will be set to 0; otherwise, the coefficients will be shrunk, and the degree of shrinkage depends on the ratio of the local energy to the threshold parameter.
[0021] Furthermore, a nonlinear mapping function is applied to the first intermediate image for low-light enhancement by the following formula to obtain a second intermediate image:
[0022] ;
[0023] in, is the second intermediate image; It is a logarithmic transformation enhancement parameter with a preset value range of 0.2 to 0.5. It controls the strength of the logarithmic transformation. The higher the value, the stronger the enhancement effect on dark areas; It is a contrast enhancement parameter with a preset value range of 0.6 to 0.8. It controls the degree of local contrast enhancement. The value corresponds to a larger contrast enhancement effect; is the global mean of the first intermediate image, representing the average brightness level of the first intermediate image; is the global standard deviation of the first intermediate image, which indicates the discrete degree of the brightness distribution of the first intermediate image. Further, the initial edge sensitivity parameter is set to a value range between 1 and 3 as , the similarity control parameter with a value range of 0.7 to 1.2 is , the local binary pattern feature influence parameter with a value range of 0.9 to 1.4 is ; Use the following formula to calculate the multi-scale local binary pattern features of the second intermediate image:
[0024] ;
[0025] ;
[0026] ;
[0027] in, For the location At , the multi-scale local binary pattern feature with a radius of R; is the radius; is the number of sampling points, which is 8 or 16; is the index of the current sampling point; is the gray value of the central pixel of the second intermediate image; is the threshold function, which converts the grayscale difference into a binary value. is the independent variable of the threshold function; represents a rotationally invariant uniform pattern; is the conversion threshold set; represents a measure of uniformity; Indicated in radius On The gray value of each sampling point; Indicated in radius On The gray value of the sampling point.
[0028] Furthermore, the structure tensor is constructed using the gradient of the second intermediate image by the following formula:
[0029] ;
[0030] in, is the structure tensor, a 2x2 matrix; The standard deviation is Gaussian kernel of is the standard deviation of the Gaussian kernel; Represents the convolution operation; is the gradient of the second intermediate image in the horizontal direction; is the gradient of the second intermediate image in the longitudinal direction; according to the structure tensor, the diffusion tensor is calculated using the following formula :
[0031] ;
[0032] in, and Both are structural tensors The eigenvector of and Both are structural tensors The characteristic value of is the first nonlinear diffusion function; is the second nonlinear diffusion function; is the cross nonlinear diffusion function; is the gradient of the second intermediate image;
[0033] ;
[0034] ;
[0035] ;
[0036] in, is the magnitude of the gradient of the second intermediate image.
[0037] Furthermore, in step 3, the constructed anisotropic diffusion equation is expressed using the following formula:
[0038] ;
[0039] in, Update for iteration The second intermediate image after Update for iteration The second intermediate image after Adaptive update function for edge sensitivity parameters; Adaptive update function for similarity control parameters; An adaptive update function for the local binary pattern feature influence parameter;
[0040] ;
[0041] ;
[0042] ;
[0043] in, For the location The radius is Multi-scale local binary pattern features.
[0044] The image enhancement method for low-voltage leakage protection in coal mines of the present invention has the following beneficial effects: in the coal mine environment, the lighting conditions are extremely poor, and it is difficult for traditional image enhancement methods to take into account the details of bright and dark parts. The present invention performs low-light enhancement through a nonlinear mapping function to effectively improve the overall brightness and contrast of the image. Through the combination of logarithmic transformation and contrast enhancement, the details of the dark area are highlighted, avoiding the problem of overexposure or overdarkness, so that the image is still clearly visible under low-light conditions. Anisotropic diffusion technology is one of the cores of the present invention. By constructing a structure tensor and a diffusion tensor, the diffusion intensity of the image is dynamically adjusted. In the edge area of the image, the diffusion intensity is small and the details are retained; in the flat area, the diffusion intensity is large and the noise is smoothed. In this way, the edges and details of the image are significantly enhanced, while the noise is effectively suppressed, and the overall image quality is greatly improved. The present invention combines multi-scale local binary pattern (MS-LBP) features to enhance the texture details of the image. The MS-LBP feature provides a description of the image details by analyzing the local texture information of the image. The feature influencing parameters are adaptively updated according to the gradient information of the image, ensuring that the image detail information can still be effectively preserved and enhanced in the case of low contrast and high noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A method flow chart of step 1 of the method for image enhancement for low-voltage leakage protection in underground coal mines provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0047] Example 1: Reference Figure 1 , a method for image enhancement for low-voltage leakage protection in coal mines, the method comprising:
[0048] Step S1: Acquire an underground coal mine image and perform image enhancement on the underground coal mine image;
[0049] Step S2: judging whether a low voltage leakage occurs based on the enhanced image;
[0050] The step S1 specifically includes:
[0051] Step 1: Perform multi-scale decomposition on the coal mine underground image, and then apply an adaptive threshold to suppress coal dust noise to obtain the first intermediate image;
[0052] Multiscale decomposition is an image processing technology based on frequency domain analysis. It decomposes the image into frequency subbands of different scales so that various features in the image can be fully expressed at different scales. In coal mine underground image processing, multiscale decomposition usually uses methods such as wavelet transform or Laplace pyramid. These methods can decompose the original image into a series of sub-images with different resolutions and frequencies, corresponding to the details and overall structure of the image respectively. For example, wavelet transform decomposes the image in the spatial domain and frequency domain by selecting appropriate wavelet basis functions, thereby capturing the detail changes and edge information in the image. Laplace pyramid decomposes the image layer by layer through a series of low-pass filtering and downsampling operations to form a pyramid structure, each layer representing an image of different resolutions. After multiscale decomposition, the coal dust noise in the coal mine underground image is mainly concentrated in the high-frequency subband, while the main structure and important features of the image are retained in the low-frequency subband. In order to effectively suppress these noises, it is necessary to apply adaptive threshold processing methods on each subband. Adaptive threshold processing is a technology that dynamically adjusts the threshold according to the local statistical characteristics of the image. It can remove noise while retaining the image details to the maximum extent. In specific operations, the adaptive threshold is usually calculated based on the local mean and standard deviation of the image. For each scale sub-image, the mean and standard deviation of its local area are first calculated, and then a suitable threshold is determined based on these statistical characteristics. This threshold can not only adapt to the noise level changes of sub-images of different scales, but also effectively distinguish the real features of noise and images. In this way, the adaptive threshold processing can dynamically adjust the threshold of each pixel, so that the detail information of the image is retained while denoising. In the image enhancement method for low-voltage leakage protection in coal mines of the present invention, the quality of the image can be significantly improved through multi-scale decomposition and adaptive threshold processing. First, multi-scale decomposition decomposes the image into sub-images of different frequencies, so that high-frequency noise and low-frequency features can be optimized separately during the processing process. This decomposition process can carefully process each part of the image, avoiding the problem of detail loss and image blurring that may be caused by a one-size-fits-all rough denoising method. Secondly, the adaptive threshold processing dynamically adjusts the threshold according to the local statistical characteristics, which can more accurately distinguish between noise and image features, thereby retaining the details and edge information of the image to the maximum extent while denoising. This method is particularly suitable for processing images in complex environments underground in coal mines, because coal dust noise is highly irregular and random. Through adaptive threshold processing, this complex noise can be effectively dealt with and the clarity and recognizability of the image can be improved.
[0053] Step 2: Apply a nonlinear mapping function to the first intermediate image for low-light enhancement to obtain a second intermediate image;
[0054] The underground environment of coal mines is usually insufficiently illuminated, resulting in dim images, low contrast, and difficult to discern details. In order to effectively enhance the quality of these low-light images, nonlinear mapping functions are introduced. These functions can effectively improve the overall brightness and local contrast of the image by performing nonlinear transformations on the image pixel values, so that the image can still be clearly displayed under low-light conditions. Nonlinear mapping functions usually include gamma correction and logarithmic transformation. Gamma correction is a commonly used brightness adjustment method. By performing exponential transformations on the image pixel values, the brightness and contrast of the image can be significantly improved. Specifically, gamma correction changes the grayscale distribution of the image by adjusting the gamma value of the pixel value, so that the dark details are improved and the bright details are retained. For low-light images in coal mines, gamma correction can show the details of the dark area, thereby improving the visibility of the image. Logarithmic transformation is another commonly used nonlinear transformation method. By taking the logarithm of the pixel value, the pixel value of the high-brightness area can be compressed and the pixel value of the low-brightness area can be expanded, thereby achieving the effect of improving the dark details. This transformation is particularly suitable for images with low contrast. Through logarithmic transformation, the overall contrast of the image can be effectively enhanced, making the details more clearly visible. In the image enhancement method for low-voltage leakage protection in coal mines of the present invention, the brightness and contrast of the image can be significantly improved by applying a nonlinear mapping function. First, the nonlinear mapping function can retain the detailed information of the image while improving the brightness by transforming the pixel values of the image. For an environment with complex lighting conditions such as coal mines, nonlinear mapping can be adaptively adjusted according to the brightness distribution of the image, so that the dark area of the image is enhanced, and the bright area is not overexposed. Secondly, the nonlinear mapping function can effectively improve the local contrast of the image, making the edges and textures of the image clearer. Through this method, important features and details in the image can still be clearly identified under low light conditions, providing high-quality image data for subsequent image processing and analysis. In addition, the nonlinear mapping function also has a certain denoising effect when processing low-light images. Due to the complex environment of coal mines, images are often accompanied by noise interference. The nonlinear mapping function can suppress noise to a certain extent by transforming the pixel values, making the image purer and clearer. This is of great significance for improving the quality and availability of images.
[0055] Step 3: Perform rock texture enhancement on the second intermediate image by combining anisotropic diffusion and local binary pattern features to obtain a third intermediate image;
[0056] Anisotropic diffusion is a technique for image smoothing and edge preservation. It achieves image smoothing by iteratively solving partial differential equations. Unlike traditional isotropic diffusion, anisotropic diffusion can adaptively adjust the diffusion coefficient according to the local gradient information of the image, so that the diffusion process is smooth in the internal area of the image, while the edge area remains clear. This method is particularly suitable for image processing in coal mines, because the underground environment of coal mines is complex, the rock texture is rich in details, and the noise interference is serious. Through anisotropic diffusion, the edge and texture information in the image can be retained while suppressing noise, making the rock texture more prominent and clear. In the specific implementation, anisotropic diffusion dynamically adjusts the diffusion coefficient by calculating the gradient information of each pixel in the image. Areas with larger gradients usually correspond to the edges and details of the image. In these areas, the diffusion coefficient is small to avoid edge blur; while areas with smaller gradients usually correspond to smooth areas of the image. In these areas, the diffusion coefficient is large to achieve a smoothing effect. In this way, anisotropic diffusion can adaptively adjust the diffusion intensity in different areas, thereby achieving fine processing of the image. This process can not only effectively remove the noise in the image, but also retain and enhance the texture features of the rock formation, making the geological information in the image clearer and easier to identify. Next, Local Binary Pattern (LBP) is a method for describing the local texture features of an image. LBP generates a binary code by comparing the grayscale values of a pixel with its neighboring pixels, thereby extracting the local texture information of the image. In coal mine underground image processing, LBP can effectively capture the microscopic texture features of the rock formation and enhance the detail expression ability of the image. Specifically, the LBP algorithm first selects a pixel as the center point, and then compares the grayscale values of the center point with the surrounding pixels. If the grayscale value of the surrounding pixels is greater than the grayscale value of the center point, the position is recorded as 1, otherwise it is recorded as 0. The binary code finally obtained represents the local texture features of the center point. In the image enhancement method for low-voltage leakage protection in coal mines of the present invention, anisotropic diffusion and LBP feature extraction are combined to effectively enhance the texture of the rock formation. Anisotropic diffusion first smoothes the image to remove noise while retaining edge and texture information; then, LBP further enhances the details and texture of the rock layer by extracting local texture features of the image. In this way, the clarity and contrast of the rock layer texture in the image can be significantly improved, making the geological information more prominent and easy to analyze. In addition, the combination of anisotropic diffusion and LBP feature extraction can also effectively cope with the complex noise and lighting changes in the underground environment of coal mines. Anisotropic diffusion can achieve targeted smoothing in different areas and suppress noise interference by adaptively adjusting the diffusion coefficient; while LBP can enhance the local contrast and detail of the image by extracting the local binary pattern of the image, so that the rock layer texture can still be clearly identified under different lighting conditions.This is of great significance for improving the quality and reliability of coal mine underground images. In the present invention, by combining anisotropic diffusion and LBP feature extraction, the comprehensive enhancement of rock stratum texture in coal mine underground images is achieved. First, anisotropic diffusion adaptively adjusts the diffusion coefficient to effectively remove noise while retaining the image edge and texture, making the rock stratum texture clearer. Secondly, LBP further enhances the details and contrast of the image by extracting the local texture features of the image, making the microstructure of the rock stratum more prominent. Through this method, the quality and recognizability of coal mine underground images can be significantly improved, providing high-quality image data support for subsequent geological analysis and safety monitoring.
[0057] Step 4: Use morphological top hat transform and directional filter combination to detect and enhance coal seam cracks on the third intermediate image to obtain an enhanced image.
[0058] Specifically, the top hat transform performs an opening operation on the image and then subtracts the original image from the image after the opening operation, thereby highlighting the small areas in the image that are brighter than the structural elements. In the image processing of coal mines, the top hat transform can effectively extract the cracks and small structures in the coal seam, making these details more obvious in the image. Due to the complex environment of coal mines and the large differences in lighting conditions, cracks and small structures are often difficult to be clearly displayed in the original image. Through the top hat transform, these details can be effectively enhanced, making the crack features more prominent and easy to identify in the image. When performing the top hat transform, choosing a suitable structural element is the key. The size and shape of the structural element directly affect the effect of the transformation. For the detection and enhancement of coal seam cracks, linear or rectangular structural elements are usually selected. These structural elements can better match the shape and direction of the cracks, thereby improving the accuracy of detection and enhancement. Through the top hat transform, the cracks and small structures in the coal seam are effectively extracted and enhanced, laying the foundation for the subsequent directional filtering process. Directional filter is a filtering technology used to extract features in a specific direction in an image. In the image processing of coal mine underground, cracks often have specific directional characteristics, and these characteristics can be effectively detected and enhanced by using directional filters. Directional filters usually use directional gradient filters or Gabor filters, which can extract and enhance features in specific directions according to the local directional information of the image. Specifically, the directional filter calculates the gradient of each pixel in the image in different directions, selects the direction with the largest gradient as the main direction, and then performs filtering processing in this direction, thereby enhancing the directional characteristics in the image. In the image enhancement method for low-voltage leakage protection in coal mines of the present invention, by combining top hat transformation and directional filters, coal seam cracks can be accurately detected and enhanced. First, the top hat transformation extracts and enhances the cracks and small structures in the image, making these features more prominent in the original image. Then, the directional filter further enhances these features according to the directional characteristics of the cracks, making the cracks clearer and more significant in the image. Through this method, the detection accuracy and enhancement effect of coal seam cracks can be significantly improved, making the geological information in the image richer and more reliable. In addition, combined with top hat transformation and directional filters, it can also effectively cope with complex noise and illumination changes in the coal mine underground environment. The top hat transform can suppress background noise and make crack features clearer by extracting small targets and details in the image; the directional filter can maintain the clarity and recognizability of cracks under different lighting conditions by enhancing the directional features in the image. This is of great significance for improving the quality and reliability of coal mine underground images.
[0059] In step S2, first, the enhanced image obtained in step S1 ensures that important features in the image, such as cables, grounding devices, and other electrical equipment, are still clearly visible in low-light and noisy environments. At this point, the image has removed most of the noise, enhanced the details under low light, and highlighted the rock texture and coal seam fissures. In this process, the judgment of low-voltage leakage mainly relies on feature extraction and intelligent recognition technology in the image. Specifically, it can be divided into the following links: image preprocessing, feature extraction, model training, feature matching, and decision judgment. First, image preprocessing is performed. Although the image has been enhanced, in order to further improve the accuracy of recognition, image standardization is required. Standardization includes adjusting the contrast and brightness of the image to ensure that all images are analyzed under similar lighting and contrast conditions. In addition, image cropping and scaling are required to ensure that the target area in the image (such as cables and grounding devices) is in the central position of the image to facilitate subsequent feature extraction and analysis. Next, feature extraction is performed. The purpose of this step is to extract key features related to low-voltage leakage from the enhanced image. Feature extraction can be divided into manual feature extraction and automatic feature extraction. Manual feature extraction mainly relies on manually designed features, such as edge features, texture features, and shape features. For example, edge detection algorithms (such as Canny edge detection) can be used to extract edge information in images, and possible leakage areas can be identified by analyzing the edge shapes of cables and grounding devices. Texture features can be extracted through methods such as gray-level co-occurrence matrix (GLCM) to reflect the texture differences in different areas of the image. Shape features can be extracted through contour detection and shape matching algorithms to identify the shape changes of cables. Automatic feature extraction mainly relies on deep learning algorithms, especially convolutional neural networks (CNNs). By training a deep convolutional neural network, high-level features in images can be automatically learned. Specifically, a deep convolutional neural network can be constructed, and the enhanced image is input into the network. After processing through multiple layers of convolution, pooling, and fully connected layers, the key features in the image are extracted. The convolution layer is responsible for extracting local features in the image, such as edges and textures; the pooling layer is responsible for reducing the dimension and enhancing the robustness of the features; the fully connected layer maps the features to a high-dimensional space for the final classification judgment. After feature extraction, model training is required. The purpose of this step is to build a classification model that can identify low-voltage leakage. Model training usually includes steps such as data annotation, model selection, and parameter optimization. First, a large number of coal mine underground images need to be collected and annotated to mark the areas with low-voltage leakage and abnormal areas in the images. These annotated data will be used to train the classification model. Next, select an appropriate classification model. Commonly used classification models include support vector machines (SVM), decision trees, random forests, and deep neural networks.In the present invention, considering the complexity and diversity of image features, it is more appropriate to select a deep neural network as a classification model. Finally, parameter optimization is performed. Through methods such as cross-validation and grid search, the hyperparameters of the classification model are optimized to ensure the generalization ability and classification accuracy of the model. After the model training is completed, the trained classification model is applied to the actual image classification task. When performing feature matching and decision judgment, the enhanced image is first input into the trained classification model, the features in the image are extracted, and the features are matched with the leakage features predefined in the model. The feature matching process mainly depends on the output of the classification model. The model will judge whether there are low-voltage leakage features in the image based on the features of the input image. Specifically, when the model detects the leakage feature in the image, it will output a leakage probability value. If the leakage probability value exceeds the preset threshold, it is judged that a low-voltage leakage has occurred. In order to improve the accuracy of the judgment, a comprehensive judgment can be made in combination with multiple features. For example, the edge features, texture features and shape features in the image can be analyzed simultaneously, and the judgment results of each feature can be combined by weighted average method to finally draw a conclusion of leakage judgment. In addition, in order to improve the real-time performance of leakage detection, the image enhancement and feature extraction process can be integrated into the edge computing device for real-time processing on-site in the coal mine. The edge computing device can quickly process images, extract features, and transmit the features to the central server for classification and judgment. In this way, real-time low-voltage leakage detection and alarm can be achieved, leakage faults can be discovered and handled in a timely manner, and the safety of coal mines can be improved.
[0060] Embodiment 2: The process of enhancing the rock texture of the second intermediate image in combination with anisotropic diffusion and local binary pattern features in step 3 specifically includes: setting initial edge sensitivity parameters, similarity control parameters and local binary pattern feature influencing parameters; calculating multi-scale local binary pattern features of the second intermediate image; using the gradient of the second intermediate image to construct a structure tensor, and then iteratively executing the following process until a set number of iterations is reached: calculating the diffusion tensor based on the structure tensor and constructing an anisotropic diffusion equation; defining a nonlinear diffusion function to control the diffusion process, reducing diffusion near the edge and increasing diffusion in flat areas; during the diffusion process, updating the edge sensitivity parameters, similarity control parameters and local binary pattern feature influencing parameters, and solving the anisotropic diffusion equation to update the image.
[0061] Specifically, at the beginning, setting the initial edge sensitivity parameter, similarity control parameter and local binary pattern feature influence parameter is the key. The setting of these parameters directly affects the sensitivity of edge detection in image processing, the processing intensity of similar regions, and the role of local binary pattern features in the whole process. The edge sensitivity parameter is used to detect and retain edge information in the image, because in the complex environment of coal mines, the edge characteristics of rock formations are crucial for identification and analysis. The similarity control parameter is used to adjust the processing intensity of similar regions in the image to ensure that the image coherence is maintained while enhancing details. The local binary pattern feature influence parameter determines the contribution of local binary pattern features to image enhancement during the processing process, which helps to capture the subtle texture information of the image. Calculating the multi-scale local binary pattern features of the second intermediate image is the basis of the enhancement process. Local Binary Pattern (LBP) is an effective texture description method that generates a binary code by comparing the grayscale values of a pixel with its neighboring pixels, thereby describing the local texture characteristics of the image. In multi-scale analysis, by decomposing the image at different scales, various texture information in the image from details to the whole can be captured. This is particularly important for processing coal mine images, because the complexity and diversity of the underground environment require comprehensive analysis and enhancement of texture features at different scales. Using the gradient of the second intermediate image to construct a structure tensor is a prerequisite for anisotropic diffusion. The structure tensor can describe the structural information of the local area in the image, including the direction and intensity of the gradient. By calculating the image gradient and constructing the structure tensor, the local structural information of each pixel in the image can be obtained, providing a basis for subsequent anisotropic diffusion. Anisotropic diffusion is a technology for image smoothing and edge preservation, which realizes image smoothing by iteratively solving partial differential equations. Unlike traditional isotropic diffusion, anisotropic diffusion can adaptively adjust the diffusion coefficient according to the local gradient information of the image, so that the diffusion process is smoothed in the internal area of the image, while the edge area remains clear. In the specific implementation, anisotropic diffusion dynamically adjusts the diffusion coefficient by calculating the gradient information of each pixel in the image. Regions with larger gradients usually correspond to the edges and details of the image, where the diffusion coefficient is smaller to avoid edge blurring; regions with smaller gradients usually correspond to smooth regions of the image, where the diffusion coefficient is larger to achieve a smoothing effect. In this way, anisotropic diffusion can adaptively adjust the diffusion intensity in different regions to achieve fine processing of the image. This process can not only effectively remove noise from the image, but also retain and enhance the texture characteristics of the rock formation, making the geological information in the image clearer and easier to identify.
[0062] The nonlinear diffusion function plays a key role in controlling the diffusion process. By designing a nonlinear diffusion function, diffusion can be reduced near the edge and increased in the flat area. This nonlinear diffusion function depends on the size of the image gradient. It reduces the diffusion intensity in the area with a large gradient (i.e., the edge area) to retain the edge details; while it increases the diffusion intensity in the area with a small gradient (i.e., the flat area) to achieve a smoothing effect. In this way, the nonlinear diffusion function can adaptively adjust the diffusion process, making the image processing more refined and accurate. During the diffusion process, the edge sensitivity parameter, similarity control parameter, and local binary pattern feature influence parameter are dynamically updated to ensure the stability and effect of the diffusion process. By iteratively solving the anisotropic diffusion equation, the image is continuously updated, and the rock texture features in the image are gradually enhanced. This dynamic adjustment and iterative solution method enables the image processing process to adaptively cope with the complex noise and illumination changes in the underground coal mine environment, improving the quality and usability of the image. In the image enhancement method for low-voltage leakage protection in coal mines of the present invention, by setting initial parameters, calculating multi-scale local binary pattern features, constructing structure tensors, defining nonlinear diffusion functions, and iteratively executing these steps, the rock stratum texture features in the image can be effectively enhanced. Anisotropic diffusion achieves image smoothing and edge preservation by adaptively adjusting the diffusion process; local binary pattern feature extraction enhances image details and contrast by capturing multi-scale texture information.
[0063] Embodiment 3: In step 4, the process of using morphological top hat transformation and directional filter combination to detect and enhance coal seam fissures and obtain enhanced images specifically includes:
[0064] Step 4.1: construct multiple linear structural elements in different directions, construct a corresponding directional Gaussian filter for each direction, and perform directional processing on each direction, specifically including: using the structural element to perform an opening operation on the third intermediate image, eliminating bright areas smaller than the structural element, and separating possible cracks; calculating the difference between the third intermediate image and the result of the opening operation, and performing a top-hat transformation; multiplying the result of the top-hat transformation with the corresponding directional Gaussian filter;
[0065] First, construct multiple linear structural elements in different directions. These structural elements are the core tools of morphological operations, and their selection and design directly affect the effect of crack detection. Linear structural elements are usually designed as elongated rectangles or straight lines to match the shape and direction of coal seam cracks. By constructing structural elements in different directions (such as 0 degrees, 45 degrees, 90 degrees, 135 degrees, etc.), effective detection can be ensured in various possible crack directions. Next, directional processing is performed on each direction. Directional processing includes three main steps: opening operation using structural elements, top hat transformation, and directional Gaussian filtering. First, the third intermediate image is opened using structural elements. Opening operation is an important operation in morphology, including two steps: corrosion and expansion. The corrosion step moves the structural element on the image so that the part of the structural element that is completely contained in the image becomes the minimum value of the image, thereby eliminating the bright area smaller than the structural element. Next, the expansion step moves the structural element on the image so that the part of the structural element that partially overlaps with the image becomes the maximum value of the image, thereby restoring the overall shape of the image, but without restoring the eliminated bright area. In this way, the opening operation can effectively remove small bright spots in the image and retain larger structures, which helps to separate coal seam cracks. Secondly, the difference between the third intermediate image and the result of the opening operation is calculated to perform a top hat transform. The top hat transform can highlight small areas in the image that are brighter than the structural elements by calculating the difference between the original image and its opening operation result. For coal seam crack detection, the top hat transform can effectively enhance the crack features in the image, making these details more prominent and obvious in the image. Specifically, the top hat transform can remove most of the background information in the image, retain and enhance the fine crack features, so that these features are easier to identify and enhance in subsequent processing steps. Finally, the result of the top hat transform is multiplied by the corresponding directional Gaussian filter. The Gaussian filter is a tool for image smoothing and enhancement. By performing a convolution operation on the image, it can suppress noise and enhance the main features in the image. The directional Gaussian filter is a Gaussian filter in a specific direction. By applying it in different directions, the directional features in the image can be enhanced. Specifically, the Gaussian filter smoothes the image after the top hat transform, making the crack features more obvious and suppressing non-directional noise. Multiplying the top-hat transformation result with the directional Gaussian filter can further enhance the crack features, making them more prominent in specific directions. Through these steps, multiple linear structural elements in different directions are constructed, and each direction is processed by opening operation, top-hat transformation and directional Gaussian filtering. The result after each direction processing contains the enhanced crack features in that direction.
[0066] Step 4.2: For each pixel of the third intermediate image, compare the results after processing in all directions, select the maximum response value, and form a crack feature map; add the crack feature map to the third intermediate image to obtain an enhanced image.
[0067] First, for each pixel of the third intermediate image, compare the results after processing in all directions and select the maximum response value. Specifically, the image has been processed in multiple different directions in the previous step 4.1, and there is a processing result in each direction, which contains the enhanced crack features in that direction. In order to effectively detect and enhance crack features in all directions, it is necessary to integrate the results after processing in these directions. In the specific implementation, for each pixel point, record its response value in the processing results of all directions, and then select the maximum response value. This maximum response value represents the intensity of the pixel point in the crack feature map. Because the response value of the crack will be different in different directions, by selecting the maximum response value, it can be ensured that the most significant crack feature is selected. This process can be expressed by the following formula:
[0068] ;
[0069] in, It's a pixel The response value in the crack characteristic diagram, Is the pixel in the direction The response value after processing, is the set of all directions. Through this operation, a crack feature map containing the maximum response value can be obtained. This feature map retains the most significant crack information in each direction. Next, the crack feature map is added to the third intermediate image to obtain an enhanced image. The purpose of this step is to combine the extracted crack features with the original image information, so as to significantly enhance the crack features while retaining the details of the original image. Specifically, the crack feature map contains the enhanced information of the cracks in the image. By adding it to the third intermediate image, these crack features can be highlighted in the enhanced image, so that the final image is improved in both detail expression and feature recognition. In the specific implementation, this process can be expressed by the following formula:
[0070] ;
[0071] in, is the enhanced image pixel value, is the pixel value of the third intermediate image, is the pixel value in the crack feature map. Through this operation, the enhanced image not only retains the overall structure and details of the original image, but also significantly enhances the crack features, making these features clearer and more significant in the final image. In the image enhancement method for low-voltage leakage protection in coal mines of the present invention, through the implementation of step 4.2, the processing results in different directions can be effectively integrated to extract and enhance the crack features of the coal seam. First, by comparing the processing results in each direction and selecting the maximum response value, it can be ensured that the most significant crack features are extracted. This process can effectively deal with the performance differences of cracks in different directions. Secondly, by adding the crack feature map to the third intermediate image, the crack features can be significantly enhanced while retaining the details of the original image, so that the final enhanced image has significant improvements in detail performance and feature recognition. For the processing in each direction, a directional Gaussian filter is used to enhance the features in that direction. For example, in the 0 degree direction, the filter enhances the linear features (such as cracks) in that direction. After applying the filter, each pixel point of the image will get a new value, which is the "response value" of the pixel point in that direction. The top hat transform highlights small areas (such as cracks) in the image by calculating the difference between the image and the result of its opening operation. The result of the top hat transform also affects the response value of each pixel because it highlights and enhances these small features in a specific direction. After performing the above processing in multiple directions (such as 0 degrees, 45 degrees, 90 degrees, and 135 degrees), each direction of processing will generate an enhanced image, and each pixel in these images has a corresponding response value. For the same pixel, the processing results in different directions will be different, so there will be multiple response values.
[0072] Embodiment 4: The coal mine underground image is decomposed at multiple scales by the following formula, and then an adaptive threshold is applied to suppress the coal dust noise to obtain a first intermediate image:
[0073] ;
[0074] in, is the first intermediate image; represents the inverse wavelet transform operation; represents the wavelet coefficients, where: represents the decomposition scale level, represents the spatial position at a specific scale, Represents pixel coordinates; is the horizontal axis coordinate; is the vertical axis coordinate; is a scale-dependent threshold parameter, which changes with the decomposition scale It changes with the change of , which is used to control the noise suppression strength at different scales; Represents the wavelet coefficients Neighborhood of; Representation calculation The sum of squares of wavelet coefficients in the neighborhood represents the local energy; and is in the neighborhood The coordinates within; is a soft threshold function used to suppress noise: if the square root of the local energy is less than the threshold , the coefficients will be set to 0; otherwise, the coefficients will be shrunk, and the degree of shrinkage depends on the ratio of the local energy to the threshold parameter.
[0075] Specifically, first, the coal mine underground image is decomposed into multiple scales. This process is achieved through wavelet transform, which is a powerful mathematical tool that can decompose the image into detail parts and approximation parts of different scales. Corresponding to the characteristics of the image at this scale, the specific position The wavelet coefficients It represents the image information at that location. Through this decomposition, various features of the image can be captured at different scales, thus laying the foundation for subsequent noise suppression and detail enhancement. In order to effectively suppress coal dust noise, the adaptive threshold method is introduced. The core idea of the adaptive threshold method is to dynamically adjust the threshold according to the local statistical characteristics of the image, so as to remove noise while retaining the image details to the maximum extent. In the formula, the adaptive threshold is a scale-dependent parameter that changes with the scale The choice of this threshold is crucial because it determines the strength of noise suppression at each scale. In order to calculate the local energy of each wavelet coefficient, its neighborhood is considered. The sum of the squares of the wavelet coefficients in This local energy reflects the energy distribution of the image in this area. By calculating the square root of the local energy, it can be determined whether the area mainly contains noise or detailed features of the image. If the square root of the local energy is less than the threshold , then the area is considered to be mainly noise, and the corresponding wavelet coefficients will be set to 0; if the square root of the local energy is greater than the threshold, then the area is considered to contain useful image information, and the wavelet coefficients will be scaled down proportionally.
[0076] The soft threshold function in the formula It plays a key role. When the local energy is low, the function sets the wavelet coefficient to 0 to suppress the noise; when the local energy is high, the wavelet coefficient is appropriately shrunk to retain the image details. In this way, the adaptive threshold method can effectively distinguish between noise and image features, achieve dynamic suppression of noise and retention of details. After completing these processes, the inverse wavelet transform is used to Convert the processed wavelet coefficients back to the original image space to obtain the first intermediate image . The role of the inverse wavelet transform is to reconstruct the wavelet coefficients that have been thresholded back into the image and restore it to the spatial domain. This step ensures that the image after noise suppression has better clarity and detail in the spatial domain. In this way, the coal dust noise in the coal mine underground image can be effectively suppressed, and the important detail information in the image can be retained. Multi-scale decomposition can capture various features of the image at different scales, and the adaptive threshold method can effectively suppress noise by dynamically adjusting the threshold. Finally, through the inverse wavelet transform, the processed wavelet coefficients are converted back to the original image space to obtain the first intermediate image after noise suppression. This method can significantly improve the quality and recognizability of the image in the complex underground coal mine environment, and provide high-quality image data support for coal mine safety monitoring and management.
[0077] Embodiment 5: A nonlinear mapping function is applied to the first intermediate image to perform low-light enhancement by the following formula to obtain a second intermediate image:
[0078] ;
[0079] in, is the second intermediate image; It is a logarithmic transformation enhancement parameter with a preset value range of 0.2 to 0.5. It controls the strength of the logarithmic transformation. The higher the value, the stronger the enhancement effect on dark areas; It is a contrast enhancement parameter with a preset value range of 0.6 to 0.8. It controls the degree of local contrast enhancement. The value corresponds to a larger contrast enhancement effect; is the global mean of the first intermediate image, representing the average brightness level of the first intermediate image; is the global standard deviation of the first intermediate image, which indicates the degree of discreteness of the brightness distribution of the first intermediate image.
[0080] Specifically, the brightness of the image is enhanced by logarithmic transformation. Logarithmic transformation is a commonly used nonlinear mapping method. By mapping pixel values to the logarithmic domain, the dark details in the image can be significantly improved. Specifically, logarithmic transformation compresses the pixel values into a smaller range by introducing a logarithmic function, which is particularly effective in dark areas. The intensity of the logarithmic transformation can be controlled by adjusting the enhancement parameters of the logarithmic transformation. A larger parameter value will produce a stronger enhancement effect on dark areas, thereby improving the image brightness under low light conditions. The logarithmic transformation part in the formula reflects this process. By applying the logarithmic function, the brightness of the image can be improved, making the dark details of the image more obvious. Next, contrast enhancement is performed to improve the local contrast of the image. The contrast enhancement part is achieved by standardization, which specifically includes subtracting the global mean of the image and dividing it by the global standard deviation. The purpose of this step is to eliminate the unevenness of the image brightness and enhance the local contrast. The global mean represents the average brightness level of the image, and the global standard deviation represents the discrete degree of the image brightness distribution. Through standardization, the brightness distribution of the image can be adjusted to make it more balanced, and this effect can be further amplified by adjusting the contrast enhancement parameters. A larger contrast enhancement parameter value corresponds to a greater contrast enhancement effect, making the details of the image clearer. In summary, the final nonlinear mapping function formula combines logarithmic transformation and contrast enhancement to achieve comprehensive enhancement of coal mine underground images. The logarithmic transformation part increases the brightness of the dark area so that the image shows more details under low light conditions; the contrast enhancement part significantly improves the local contrast of the image through standardization and contrast amplification, further enhancing the image details. In this way, the quality of coal mine underground images can be effectively enhanced under low light conditions. The logarithmic transformation part increases the brightness of the dark area through nonlinear mapping, so that more details can be identified; the contrast enhancement part improves the local contrast of the image by adjusting the distribution of pixel values, making the details of the image clearer and easier to identify. Finally, through the combination of these two parts, a high-quality image with balanced brightness and enhanced contrast can be obtained under low light conditions, providing reliable image data support for coal mine safety monitoring and management.
[0081] Example 6: Setting the initial edge sensitivity parameter in the range of 1 to 3 to , the similarity control parameter with a value range of 0.7 to 1.2 is , the local binary pattern feature influence parameter with a value range of 0.9 to 1.4 is ; Use the following formula to calculate the multi-scale local binary pattern features of the second intermediate image:
[0082] ;
[0083] ;
[0084] ;
[0085] in, For the location At , the multi-scale local binary pattern feature with a radius of R; is the radius; is the number of sampling points, which is 8 or 16; is the index of the current sampling point; is the gray value of the central pixel of the second intermediate image; is the threshold function, which converts the grayscale difference into a binary value. is the independent variable of the threshold function; represents a rotationally invariant uniform pattern; is the conversion threshold set; represents a measure of uniformity; Indicated in radius On The gray value of each sampling point; Indicated in radius On The gray value of the sampling point.
[0086] Specifically, Multi-Scale Local Binary Pattern (MS-LBP) is a powerful image texture description method that generates binary codes by comparing the grayscale values of the central pixel with its neighboring pixels, thereby describing the local texture features of the image. In the specific implementation, a rotationally invariant uniform pattern ( ) to calculate LBP features, which has good rotation invariance and robustness. The calculation of local binary pattern (LBP) features involves comparing the grayscale values of the central pixel with its neighboring pixels, and then generating a binary code based on the comparison results. A threshold function is defined in the formula , this function is used to convert the grayscale difference into a binary value. When the grayscale difference is greater than or equal to the set threshold When , the output is 1, otherwise the output is 0. Specifically, the threshold function The role of is to convert the pixel grayscale difference into binary values, thereby obtaining a local binary pattern. The core of this step is to quantize the grayscale difference between pixels into discrete binary values through binary conversion, and these binary values can effectively reflect the local texture characteristics of the image.
[0087] To achieve rotation invariance, a rotation-invariant uniform pattern was used ( ). This mode makes the LBP feature invariant to image rotation by reducing the number of binary transitions in the pattern. Uniformity metric Used to judge the uniformity of a pattern. A pattern is considered uniform if the number of transitions between 0 and 1 in the pattern does not exceed 2. If the uniformity metric If it is less than or equal to 2, the LBP value is calculated; otherwise, a constant value (such as ), indicating a non-uniform pattern. Through this processing method, the calculated LBP feature can not only capture the local texture information of the image, but also be robust to the rotation of the image. When calculating the LBP feature, first select a pixel as the center point , and then around it the radius is Select on the circumference The grayscale values of these sampling points are compared with the grayscale value of the center point through the threshold function Convert to binary values. Then, arrange these binary values in a clockwise direction to get a binary code, which is the LBP value of the central pixel. By traversing every pixel in the image and repeating this process, the LBP feature map of the entire image can be obtained.
[0088] The specific calculation process involves the following key steps. First, for each pixel, calculate its LBP value at different scales. At each scale, select a radius and number of sampling points , and then calculate its LBP value. Specifically, for the center pixel , calculate its radius On The gray value of the sampling point , and through the threshold function The grayscale difference is converted into binary values. Then, by accumulating these binary values, the LBP value of the pixel at that scale is obtained. In the rotationally invariant uniform mode, the uniformity metric is calculated by , judge the uniformity of the pattern. If the number of transitions between 0 and 1 in the pattern does not exceed 2 times, the pattern is considered uniform and its LBP value is calculated; otherwise, a constant value is assigned , indicating a non-uniform pattern. This processing method ensures that the calculated LBP features are invariant to image rotation, thereby improving the robustness of the features. In this way, the LBP features of the image can be calculated at different scales. This process can not only capture the local texture information of the image, but also reflect the multi-scale characteristics of the image. Multi-scale analysis enables texture features of different scales to be effectively captured, thereby improving the effect of image processing. Specifically, by selecting different radii and number of sampling points , the LBP features of the image can be calculated at different scales, and these features can be combined to form a multi-scale LBP feature map. In practical applications, the multi-scale LBP feature can effectively capture texture features of different scales by performing multi-scale analysis on the image. This is particularly important for processing complex coal mine underground images, because these images usually contain texture features of multiple scales. By calculating the LBP features at different scales, a more comprehensive image description can be obtained, thereby improving the effect of image processing. The multi-scale local binary pattern features calculated by the formula can effectively enhance the quality of coal mine underground images. The multi-scale LBP feature provides an important feature description for subsequent image processing by capturing the local texture information in the image. The rotation-invariant uniform pattern makes the LBP feature robust to the rotation of the image by reducing the number of binary conversions in the pattern. Finally, through multi-scale analysis and feature calculation, an image containing rich texture information can be obtained, providing high-quality image data support for coal mine safety monitoring and management. In practical applications, this image enhancement method based on multi-scale local binary patterns is of great significance in the underground coal mine environment. Due to the complex environment of coal mines, images often contain texture features of multiple scales, and traditional image processing methods are difficult to effectively capture these features. The above method can significantly improve the detail performance of the image, making the monitoring of underground operations clearer and more accurate, which helps to timely discover and deal with safety hazards and ensure the safety of coal miners. This process achieves comprehensive enhancement of coal mine underground images through the combination of multi-scale analysis and local binary pattern features, providing scientific methods and technical means.
[0089] Embodiment 7: The structure tensor is constructed using the gradient of the second intermediate image by the following formula:
[0090] ;
[0091] in, is the structure tensor, a 2x2 matrix; The standard deviation is Gaussian kernel of is the standard deviation of the Gaussian kernel; Represents the convolution operation; is the gradient of the second intermediate image in the horizontal direction; is the gradient of the second intermediate image in the longitudinal direction; according to the structure tensor, the diffusion tensor is calculated using the following formula :
[0092] ;
[0093] in, and Both are structural tensors The eigenvector of and Both are structural tensors The characteristic value of is the first nonlinear diffusion function; is the second nonlinear diffusion function; is the cross nonlinear diffusion function; is the gradient of the second intermediate image;
[0094] ;
[0095] ;
[0096] ;
[0097] in, is the magnitude of the gradient of the second intermediate image.
[0098] Specifically, the structure tensor is a The matrix is used to describe the structural information of the image in the local area. The structure tensor is the gradient of the image in the horizontal and vertical directions. and These gradients reflect the rate of change of the image in different directions and are important features of image edges and details. The standard deviation is Gaussian kernel is used to smooth the image. Control the standard deviation of the Gaussian kernel, that is, the degree of smoothing. By performing Gaussian smoothing on the image gradient, the influence of noise can be effectively reduced, making the structure tensor more stable and reliable. Specifically, the structure tensor The elements of and , , The convolution result. In this way, not only the gradient information of the image in all directions is considered, but also the stability of this information is guaranteed by Gaussian smoothing. The application of ensures the effectiveness of the smoothing process, so that the structure tensor can accurately describe the local structure information of the image. and And the eigenvalue and are the key parameters of the structure tensor, which are used to further describe the local structure of the image. The eigenvector represents the main direction of the gradient, while the eigenvalue represents the strength of the gradient.
[0099] Next, according to the structure tensor Calculate the diffusion tensor The diffusion tensor is used to control the anisotropic diffusion process of the image, and enhance the edges and details of the image by selectively smoothing the image. In the formula, the diffusion tensor It is expressed as the product of the eigenvector matrix and the nonlinear diffusion function matrix. Nonlinear diffusion function and The diffusion intensity in different directions is controlled separately, and the cross nonlinear diffusion function The design of nonlinear diffusion functions is critical, as they determine the anisotropic properties of the diffusion process. Specifically, By introducing the image gradient model and the eigenvalues of the structure tensor and , controls the diffusion strength, reducing the diffusion near the edge and increasing the diffusion in the flat area. This can preserve the edge details of the image while smoothing the noisy areas. Another function form is used to enhance the diffusion effect in areas with large eigenvalue differences, thereby further emphasizing edges and details. By multiplying the eigenvalues and the sine function, the diffusion strength in different characteristic directions is adjusted to ensure the directionality of the diffusion process is consistent. In this way, the diffusion tensor Different diffusion intensities are applied to different areas of the image to achieve anisotropic diffusion. The core idea of anisotropic diffusion is to adaptively adjust the diffusion process according to the local structural information of the image, so that less diffusion occurs in the edge area of the image to retain details, and more diffusion occurs in the flat area to smooth the noise. This process effectively enhances the edges and details of the image, making the final image clearer and more layered. In the image enhancement method used for low-voltage leakage protection in coal mines, the use of this anisotropic diffusion technology can significantly improve the quality and recognizability of the image. Specifically, the local structural information of the image is extracted by calculating the structure tensor, and the anisotropic diffusion process of the image is controlled by calculating the diffusion tensor. This process can not only effectively smooth the noise, but also retain and enhance the edges and details of the image, so that the image still has high clarity and recognizability in the complex environment of coal mines.
[0100] Example 8: In step 3, the anisotropic diffusion equation constructed is expressed using the following formula:
[0101] ;
[0102] First, consider the first term in the equation This section describes the anisotropic diffusion process of the image, where Represents the divergence operator, which is used to calculate the degree of divergence of a vector field. Diffusion tensor is a matrix constructed from the local structural information of the image, and its elements determine the intensity of diffusion in each direction. Specifically, It is represented by the eigenvalue and eigenvector of the structure tensor. The eigenvector represents the main direction of the image gradient, and the eigenvalue represents the intensity of the gradient. A smaller diffusion strength is applied to the edge area of the image to preserve details; a larger diffusion strength is applied to the flat area to smooth out noise. This achieves the effect of anisotropic diffusion, allowing the image to gradually enhance edge details while suppressing noise during the iteration process. Next, the second item is the edge sensitivity parameter The adaptive update part of . This parameter is dynamically adjusted based on the gradient information of the image. Specifically, when the image gradient is large, it indicates the edge area of the image, and the edge sensitivity parameter Will increase, thereby reducing the diffusion intensity of the area to retain edge details; when the image gradient is small, it means the flat area of the image, the edge sensitivity parameter will decrease, thereby increasing the diffusion strength of the area to smooth the noise. In this way, the edge sensitivity parameter can effectively control the diffusion strength of different areas of the image, ensuring that the edge area is effectively preserved and enhanced. It is the influencing part of the multi-scale local binary pattern feature (MS-LBP). The MS-LBP feature provides a description of the image details by analyzing the local texture information of the image. Feature influencing parameters Adaptive update is performed based on the gradient information of the image. Its main function is to control the influence of the MS-LBP feature on the diffusion process. The MS-LBP feature can enhance the local texture details of the image, so that the image details can still be effectively preserved and enhanced in the case of low contrast and high noise. is the similarity control parameter The adaptive update part of similarity control parameters Based on the local similarity of the image, the diffusion strength of different regions is dynamically adjusted by calculating the local mean and standard deviation of the image. This ensures that the image diffuses more evenly in similar regions, improving the overall consistency and detail performance of the image. Specifically, when the local similarity of the image is high, the parameter will increase, thereby increasing the diffusion intensity and smoothing the similar area; when the local similarity is low, the parameter will decrease, thereby reducing the diffusion strength and preserving details.
[0103] in, Update for iteration The second intermediate image after Update for iteration The second intermediate image after Adaptive update function for edge sensitivity parameters; Adaptive update function for similarity control parameters; An adaptive update function for the local binary pattern feature influence parameter;
[0104] ;
[0105] ;
[0106] ;
[0107] in, For the location The radius is Multi-scale local binary pattern features.
[0108] Specifically, during the iteration, the diffusion process is described by the divergence operator. The divergence operator calculates the divergence of the vector field and is specifically applied to the product of the diffusion tensor and the image gradient. This step effectively adjusts the diffusion speed of the image in different directions, so that the edge of the image is enhanced and the smooth area is further smoothed. Edge sensitivity parameter is another key factor in the equation. This parameter is adaptively updated through the gradient information of the image, and its main function is to control the diffusion strength of the edge area. Specifically, when the image gradient is large, the edge sensitivity parameter will increase, thereby reducing the diffusion strength of the area to retain the edge details; when the image gradient is small, the edge sensitivity parameter will decrease, increasing the diffusion strength of the area to smooth the noise. Similarity control parameter The adaptive update of is based on the local similarity of the image. By calculating the local mean and standard deviation of the image, this parameter can dynamically adjust the diffusion strength of different regions, making the image diffuse more evenly in similar regions, thereby improving the overall consistency and detail performance of the image. The multi-scale local binary pattern feature (MS-LBP) also plays an important role here. The MS-LBP feature provides a description of the image details by analyzing the local texture of the image. Feature influence parameters Adaptive updating is performed based on the gradient information of the image, and its main function is to control the influence of the local binary pattern feature on the diffusion process. Specifically, the MS-LBP feature can enhance the local texture details of the image, so that the detail information of the image can still be effectively retained and enhanced in the case of low contrast and more noise. In order to achieve this effect, the various terms in the equation are combined with each other, and the gradient information, local similarity and texture characteristics of the image are comprehensively considered. Through the joint action of these factors, the iterative equation can dynamically adjust the diffusion intensity and direction of the image in each iteration process, thereby achieving comprehensive enhancement of the image. Each iteration will be adjusted according to the results of the previous iteration, and the detail performance and overall quality of the image will be continuously optimized. This method is particularly suitable for the processing of coal mine underground images, because the coal mine environment is usually insufficiently lit and noisy. Traditional image processing methods are difficult to obtain high-quality images under such conditions. Through the above-mentioned anisotropic diffusion method, the brightness and contrast of the image can be significantly improved, making the monitoring of underground operations clearer and more accurate, which helps to timely discover and deal with safety hazards and ensure the safety of coal miners. This process achieves comprehensive enhancement of low-light images through a combination of logarithmic transformation and contrast enhancement, providing scientific methods and technical means for coal mine safety monitoring and management.
[0109] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for image enhancement for low-voltage leakage protection in coal mines, characterized in that: The method comprises: Step S1: Acquire an underground coal mine image and perform image enhancement on the underground coal mine image; Step S2: judging whether a low voltage leakage occurs based on the enhanced image; The step S1 specifically includes: Step 1: Perform multi-scale decomposition on the coal mine underground image, and then apply an adaptive threshold to suppress coal dust noise to obtain the first intermediate image; Step 2: Apply a nonlinear mapping function to the first intermediate image for low-light enhancement to obtain a second intermediate image; Step 3: Perform rock texture enhancement on the second intermediate image by combining anisotropic diffusion and local binary pattern features to obtain a third intermediate image; Step 4: Use morphological top hat transformation and directional filter combination to detect and enhance coal seam fractures on the third intermediate image to obtain an enhanced image; The process of enhancing the rock texture of the second intermediate image in combination with anisotropic diffusion and local binary pattern features in step 3 specifically includes: setting initial edge sensitivity parameters, similarity control parameters and local binary pattern feature influencing parameters; calculating multi-scale local binary pattern features of the second intermediate image; using the gradient of the second intermediate image to construct a structure tensor, and then iteratively executing the following process until the set number of iterations is reached: calculating the diffusion tensor based on the structure tensor and constructing an anisotropic diffusion equation; defining a nonlinear diffusion function to control the diffusion process, reducing diffusion near the edge and increasing diffusion in the flat area; in the diffusion process, updating the edge sensitivity parameter, similarity control parameter and local binary pattern feature influencing parameter, and solving the anisotropic diffusion equation to update the image; In step 4, the process of using morphological top hat transformation and directional filter combination to detect and enhance coal seam fissures and obtain enhanced images specifically includes: Step 4.1: construct multiple linear structural elements in different directions, construct a corresponding directional Gaussian filter for each direction, and perform directional processing on each direction, specifically including: using the structural element to perform an opening operation on the third intermediate image, eliminating bright areas smaller than the structural element, and separating possible cracks; calculating the difference between the third intermediate image and the result of the opening operation, and performing a top-hat transformation; multiplying the result of the top-hat transformation with the corresponding directional Gaussian filter; Step 4.2: For each pixel of the third intermediate image, compare the results after processing in all directions, select the maximum response value, and form a crack feature map; add the crack feature map to the third intermediate image to obtain an enhanced image; In step 1, the coal mine underground image is decomposed at multiple scales by the following formula, and then an adaptive threshold is applied to suppress the coal dust noise to obtain the first intermediate image: ; in, is the first intermediate image; represents the inverse wavelet transform operation; represents the wavelet coefficients, where: represents the decomposition scale level, represents the spatial position at the corresponding scale, Represents pixel coordinates; is the horizontal axis coordinate; is the vertical axis coordinate; is a scale-dependent threshold parameter, which changes with the decomposition scale It changes with the change of , which is used to control the noise suppression strength at different scales; Represents the wavelet coefficients Neighborhood of; Representation calculation The sum of squares of wavelet coefficients in the neighborhood represents the local energy; and is in the neighborhood The coordinates within; is a soft threshold function used to suppress noise: if the square root of the local energy is less than the threshold , the coefficients will be set to 0; otherwise, the coefficients will be shrunk, and the degree of shrinkage depends on the ratio of the local energy to the threshold parameter.
2. The image enhancement method for low-voltage leakage protection in coal mines according to claim 1, characterized in that: In step 2, a nonlinear mapping function is applied to the first intermediate image for low-light enhancement by the following formula to obtain a second intermediate image: ; in, is the second intermediate image; It is a logarithmic transformation enhancement parameter with a preset value range of 0.2 to 0.
5. It controls the strength of the logarithmic transformation. The higher the value, the stronger the enhancement effect on dark areas; It is a contrast enhancement parameter with a preset value range of 0.6 to 0.
8. It controls the degree of local contrast enhancement. The value corresponds to a larger contrast enhancement effect; is the global mean of the first intermediate image, representing the average brightness level of the first intermediate image; is the global standard deviation of the first intermediate image, which indicates the degree of discreteness of the brightness distribution of the first intermediate image.
3. The image enhancement method for low-voltage leakage protection in coal mines according to claim 2, characterized in that: In step 3, the initial edge sensitivity parameter is set to a value between 1 and 3. , the similarity control parameter with a value range of 0.7 to 1.2 is , the local binary pattern feature influence parameter with a value range of 0.9 to 1.4 is ; Use the following formula to calculate the multi-scale local binary pattern features of the second intermediate image: ; ; ; in, For the location At , the multi-scale rotation-invariant uniform local binary pattern features with a radius of R; is the radius; is the number of sampling points, which is 8 or 16; is the index of the current sampling point; is the gray value of the central pixel of the second intermediate image; is the threshold function, which converts the grayscale difference into a binary value. is the independent variable of the threshold function; is the conversion threshold set; represents a measure of uniformity; Indicated in radius On The gray value of each sampling point; Indicated in radius On The gray value of the sampling point.
4. The image enhancement method for low-voltage leakage protection in coal mines as claimed in claim 3, characterized in that: In step 3, the structure tensor is constructed using the gradient of the second intermediate image using the following formula: ; in, is the structure tensor, a 2x2 matrix; The standard deviation is Gaussian kernel of is the standard deviation of the Gaussian kernel; Represents the convolution operation; is the gradient of the second intermediate image in the horizontal direction; is the gradient of the second intermediate image in the longitudinal direction; according to the structure tensor, the diffusion tensor is calculated using the following formula : ; in, and Both are structural tensors The eigenvector of Both are structural tensors The characteristic value of is the first nonlinear diffusion function; is the second nonlinear diffusion function; is the cross nonlinear diffusion function; is the gradient of the second intermediate image; ; ; ; in, is the magnitude of the gradient of the second intermediate image.
5. The method for image enhancement for low-voltage leakage protection in underground coal mines according to claim 4, characterized in that: In step 3, the constructed anisotropic diffusion equation is expressed using the following formula: ; in, Update for iteration The second intermediate image after Update for iteration The second intermediate image after Adaptive update function for edge sensitivity parameters; Adaptive update function for similarity control parameters; An adaptive update function for the local binary pattern feature influence parameter; ; ; ; in, For the location The radius is Multi-scale local binary pattern features.
