Image enhancement method and system in complex coal mine environment
Through deep learning semantic segmentation and an improved Retinex model, combined with non-local mean filtering, the problems of insufficient image brightness and blur in complex coal mine environments were solved, image differentiation enhancement and noise suppression were achieved, and image clarity and contrast were improved.
Patent Information
- Application Number
- CN202510990948.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-07-18
AI Technical Summary
In complex coal mine environments, existing technologies are unable to effectively solve the problems of insufficient image brightness, blur, reduced contrast and loss of details. Especially in low-light and strong dust scenes, conventional methods are prone to overexposure of bright areas, amplification of noise in dark areas and distortion of details.
A deep learning semantic segmentation model is used to divide the image into bright areas, dark areas and dust occlusion areas. Combined with the improved Retinex model and non-local mean filtering, the illumination component and reflection component are decomposed through pixel similarity matching. A differential enhancement strategy and multi-scale Retinex enhancement are applied to suppress dust noise and improve image clarity.
The image quality in complex coal mine environments is significantly improved, ensuring clear details, reducing dust and noise interference, and generating high-quality images with rich details and suppressed noise.
Smart Images

Figure CN120495604B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image enhancement method and system in a complex coal mine environment. Background Art
[0002] Coal mines operate in a complex environment, characterized by low illumination, high dust levels, dense smoke, and uneven lighting. Due to the enclosed, dark environment, images rely solely on local lighting equipment for light source, leading to severe image brightness issues. Furthermore, the large amount of dust generated during mining and transportation permeates the air, scattering and absorbing light. This causes blurred images, reduced contrast, and loss of detail, similar to the "fog effect." However, during coal mine operations, high image clarity is required to ensure the safety of the coal mine operating environment.
[0003] In the existing technology, methods such as histogram equalization and contrast-limited adaptive histogram equalization are often used to enhance images in coal mine environments. However, in low-light + strong dust scenes, global pixel distribution adjustment is prone to cause overexposure in bright areas and noise amplification in dark areas, which in turn leads to insufficient adaptability and detail distortion. Therefore, how to divide the image into different semantic regions through a deep learning semantic segmentation model, adopt differentiated enhancement strategies for different semantic regions, and combine the improvement of the traditional Retinex model to add non-local mean filtering when decomposing the illumination component, and reduce the interference of dust noise on illumination estimation through pixel similarity matching, is the problem to be solved by the present invention. To this end, a method and system for image enhancement in complex coal mine environments are proposed. Summary of the Invention
[0004] The present invention aims to provide an image enhancement method and system in a complex coal mine environment to solve the problems raised in the above background technology.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] In a first aspect, an image enhancement method in a complex coal mine environment comprises the following steps:
[0007] S1. Preprocess the collected coal mine images of the target area and use a deep learning semantic segmentation model to divide the coal mine images into different semantic areas, including bright areas, dark areas, and dust-occluded areas;
[0008] S2. Develop differentiated enhancement strategies based on semantic region characteristics to avoid detail distortion caused by global adjustments.
[0009] S3. Improve the traditional Retinex model and introduce non-local mean filtering to decompose the illumination component and reflection component through pixel similarity matching to reduce the interference of dust noise on illumination estimation;
[0010] S4, perform adaptive gamma correction on the decomposed illumination components and use multi-scale Retinex enhancement on the reflection components to balance detail preservation and noise suppression;
[0011] S5. Based on the corrected illumination component and the enhanced reflection component, targeted image enhancement is performed on each semantic area to improve contrast and clarity;
[0012] S6. Fusing the enhanced semantic region images to generate an overall enhanced image, and outputting a high-quality coal mine environment enhanced image with rich details and suppressed noise.
[0013] A further improvement of the technical solution of the present invention is that: S1 specifically includes:
[0014] Through underground monitoring equipment deployed in target areas of coal mines, image data of target areas (tunnels, working faces) from multiple angles and under multiple lighting conditions is collected to ensure that samples cover different areas. The original images are then filtered to initially suppress dust noise and eliminate extreme pixel values through histogram clipping.
[0015] A pre-trained semantic segmentation model was used for transfer learning based on an existing coal mine scene dataset. The output layer was adjusted to three channels, including bright areas, dark areas, and dust-occluded areas. The cross-entropy loss function was used for supervised training to annotate the semantic areas of the coal mine images and generate masks.
[0016] The preprocessed image is input into the trained semantic segmentation model, and a probability map is output. Threshold segmentation is performed using a segmentation threshold of 0.5 to generate a semantic mask, which clearly divides the bright area, dark area, and dust-occluded area. A morphological operation of opening is performed on the segmented semantic mask to eliminate isolated noise points and fill small holes to ensure smooth regional boundaries. The segmentation result is then double-checked by combining the light intensity histogram and dust concentration estimation to correct the misclassified areas. Finally, a semantic segmentation mask containing bright area, dark area, and dust-occluded area is generated.
[0017] A further improvement of the technical solution of the present invention is that: S2 specifically includes:
[0018] Based on the mask generated by the semantic segmentation model, the location and range of bright areas, dark areas, and dust-occluded areas are clarified, and the characteristics of each area are analyzed. Based on the characteristics of each area, differentiated enhancement strategies are formulated;
[0019] Based on the semantic segmentation mask, we locate bright areas and analyze the risk of detail loss due to highlight overexposure. We then apply contrast-limited adaptive equalization (CLAHE) locally within these bright areas, setting the block size to 8×8 pixels and the contrast enhancement limit to Clip Limit = 2.0. We then combine this with bilateral filtering to preserve the transition between highlights and shadows at the edges of the bright areas, preventing structural blurring caused by oversmoothing.
[0020] Dark areas are extracted using semantic masks, and their average brightness values are analyzed in combination with the light intensity histogram to identify low-light areas that need to be compensated. A nonlinear transformation is applied to the dark area pixels, and the Gaussian filtered illumination components are fused. The enhanced dark area image is decomposed using a Laplacian pyramid to extract the high-frequency detail layer and fuse it with the low-frequency illumination layer to avoid blurred contours caused by smoothing.
[0021] The dust-occluded area is located based on the semantic mask, and its noise type and edge blur are analyzed. The device outline is retained while denoising. Combined with the edge information of the semantic mask, a small radius filter is applied to the boundary area of the dust-occluded area to avoid excessive edge smoothing.
[0022] A further improvement of the technical solution of the present invention is that: S3 specifically includes:
[0023] Non-local mean filtering is applied to the pre-processed coal mine image input for denoising. Similar blocks are searched through pixel similarity matching. The search window radius is set to 7 to ensure that similar pixel blocks are found globally. The similarity weight is based on a Gaussian kernel, which amplifies the tolerance range of pixel similarity matching and adapts to the randomness of dust noise. For each pixel, similar pixel blocks are searched within its search window, and the pixel values of similar blocks are weighted averaged to generate a denoised image. This suppresses dust noise and prevents noise contamination in subsequent illumination estimation.
[0024] The denoised image is further extracted through non-local mean filtering. The denoised image is decomposed into similar pixel blocks. For each block, the mean value of the pixels in the block is calculated as the local illumination value. The local illumination values of all blocks are fused to generate a global illumination component map, and then the reflection component is calculated to extract the reflection component.
[0025] Guided filtering is applied to the reflection component, using the input image as a guide to smooth noise while preserving edges. Wavelet transform is combined to extract the high-frequency detail layer, which is fused with the filtered reflection component. Gaussian smoothing is applied to the illumination component to eliminate local estimation errors and generate a uniform illumination background. The image is then reconstructed to achieve dust noise suppression and illumination equalization.
[0026] A further improvement of the technical solution of the present invention is that the process of reconstructing the image is:
[0027] The image before non-local mean filtering denoising is used as the guide image. The guided filter is applied to the reflection component to perform edge-preserving smoothing to suppress residual noise. The filter radius is set to 5 and the regularization parameter ε is set to 0.01. The guided filter uses the structural information of the guide image to perform edge-preserving smoothing on the reflection component to suppress residual noise.
[0028] Perform Haar wavelet decomposition on the reflected component after guided filtering to extract high-frequency detail layers in the horizontal, vertical, and diagonal directions. The high-frequency detail layers contain the texture and edge information of the image. These layers are then fused with the low-frequency approximation layers using weighted coefficients. The high-frequency layer weight is 0.8, and the low-frequency layer weight is 0.2. This enhances the texture and edges of the device and highlights the details of the image.
[0029] Gaussian smoothing is applied to the illumination component to eliminate local estimation errors and generate a uniform illumination background. Gaussian smoothing effectively removes noise and local inhomogeneities in the illumination component, making the illumination background smoother. Finally, the image is reconstructed. The reconstructed image suppresses dust noise and balances illumination, resulting in richer details and higher contrast.
[0030] A further improvement of the technical solution of the present invention is that: S4 specifically includes:
[0031] The input is the global illumination component, which is divided into local blocks. The brightness distribution of each block is analyzed independently, the mean and standard deviation of each block are calculated, the gamma value is calculated based on the local statistics of each block, and the gamma transform is applied to each block to generate a contrast-balanced illumination background.
[0032] The reflection component after input edge preservation, that is, the reflection component generated by guided filtering and wavelet fusion, is decomposed by multi-scale Retinex and convolved with three-scale Gaussian kernels. The three-scale Gaussian kernels are 15, 80, and 250, respectively. Among them, the small-scale Gaussian kernel is 15 to extract high-frequency details, the medium-scale Gaussian kernel is 80 to balance details and noise, and the large-scale Gaussian kernel is 250 to extract low-frequency background and suppress noise. Then, the Retinex response is calculated for each scale, and the responses of each scale are weighted and fused with a weight of 1 / 3. The result is smoothed by bilateral filtering with a spatial weight of 5 and a color weight of 0.1 to generate the enhanced reflection component.
[0033] The illumination component after adaptive gamma correction and the reflection component after multi-scale Retinex enhancement are integrated, and the illumination component and the reflection component are fused.
[0034] A further improvement of the technical solution of the present invention is that the calculation process of the gamma value is:
[0035] Traverse all pixels of the illumination component, divide the illumination component into N×N local blocks, calculate the mean and standard deviation of each block, and calculate the global maximum mean and global maximum standard deviation;
[0036] For each block, calculate the ratio of the standard deviation to the global maximum standard deviation, and calculate the ratio of 1 minus the standard deviation, and multiply it by the basic gamma value to get the basic term;
[0037] For each block, calculate the ratio of the mean to the global maximum mean and multiply it by the gamma lower limit of the low brightness area to obtain the lower limit term;
[0038] The gamma value is calculated by adding the base term and the floor term.
[0039] A further improvement of the technical solution of the present invention is that: S5 specifically includes:
[0040] Combining the characteristics of bright areas, dark areas, and dust-occluded areas, and based on the corrected illumination component and enhanced reflection component, a corresponding enhancement strategy is matched to each semantic area, and then targeted enhancement processing is performed on each semantic area.
[0041] A local contrast suppression strategy is applied to bright areas, and the corrected illumination component is used to further adjust the brightness distribution of the bright areas to avoid overexposure. Combined with the enhanced reflection component, the details and texture of the bright areas are retained. An illumination compensation strategy is applied to dark areas, and the corrected illumination component is used to increase the brightness of the dark areas. At the same time, combined with the enhanced reflection component, the contrast and details of the dark areas are enhanced to make the structure of the dark areas clearer. An edge-preserving smoothing strategy is applied to dust-occluded areas, and the enhanced reflection component is used to smooth the noise through bilateral filtering technology, while retaining the device contour and edge information. Through targeted enhancement, the image quality of each semantic area is significantly improved.
[0042] A further improvement of the technical solution of the present invention is that: S6 specifically includes:
[0043] The pre-trained DeepLabV3+ model is used to input the original image and generate three-category masks for bright areas, dark areas, and dust-occluded areas. The masks for each area are normalized to ensure that the mask values are in the range [0, 1]. These masks are used as fusion weights. After normalization, the masks for bright areas, dark areas, and dust-occluded areas correspond to their respective weight distributions.
[0044] The enhanced bright area, dark area and dust occlusion area images are multiplied by the corresponding semantic mask weights respectively. For each pixel, the enhancement results of different areas are weighted summed according to the weight of the area to which it belongs to generate a fused image;
[0045] The fused image is finally reconstructed to generate an overall enhanced image. At the same time, the image is checked for excessive noise amplification and optimized using noise suppression technology (wavelet threshold processing). The final image achieves good results in terms of contrast, clarity, and noise control.
[0046] In a second aspect, an image enhancement system in a complex coal mine environment is provided, which is used to implement the above-mentioned image enhancement method in a complex coal mine environment, and includes an image processing platform, wherein the image processing platform is communicatively connected to the following modules, wherein:
[0047] The image acquisition and preprocessing module is used to collect image data from multiple angles and lighting conditions using underground monitoring equipment deployed in the target area of the coal mine, and preprocess the original images to initially suppress dust noise and generate input images with relatively uniform quality;
[0048] The semantic segmentation module uses a pre-trained semantic segmentation model to perform transfer learning based on a coal mine scene dataset, dividing the image into bright areas, dark areas, and dust-occluded areas, generating semantic masks to clarify the location and scope of each area;
[0049] Differentiation enhancement module, used to formulate differentiation enhancement strategies based on the characteristics of each region;
[0050] The illumination and reflection component processing module is used to perform adaptive gamma correction on the decomposed illumination components to generate a contrast-balanced illumination background. Through multi-scale Retinex (MSR) enhancement and bilateral filtering, it balances detail preservation and noise suppression to generate an enhanced reflection component.
[0051] The image fusion and reconstruction module is used to stitch the enhanced bright area, dark area and dust-occluded area images using semantic segmentation masks as weights, optimize the transition effect of the region boundaries through smooth weight transition to avoid stitching traces, and perform global contrast enhancement and noise suppression optimization on the fused image to generate a high-quality enhanced image.
[0052] Due to the adoption of the above technical solution, the present invention has the following technical advancements compared to the prior art:
[0053] 1. The present invention provides an image enhancement method and system in a complex coal mine environment. The method divides the image into bright areas, dark areas and dust-occluded areas through a deep learning semantic segmentation model, and formulates differentiated enhancement strategies based on the characteristics of different areas to avoid detail distortion caused by global adjustment. Local contrast suppression is adopted in bright areas, and illumination compensation is enhanced in dark areas. Edge-preserving smoothing is used to suppress noise diffusion in dust-occluded areas, significantly improving the image quality of each area and ensuring that image details in complex coal mine environments are clearly visible.
[0054] 2. The present invention provides an image enhancement method and system in a complex coal mine environment. It introduces non-local mean filtering, decomposes the illumination component and reflection component through pixel similarity matching, reduces the interference of dust noise on illumination estimation, improves the accuracy of illumination component extraction, and combines guided filtering with wavelet transform to effectively suppress noise while preserving edges, generating high-quality images with rich details and suppressed noise, thereby enhancing image visibility in coal mine working environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0056] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0057] Figure 2 Schematic diagram of the method of the present invention. DETAILED DESCRIPTION
[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0059] Example 1, as Figure 1 、 Figure 2 As shown, the present invention provides an image enhancement method in a complex coal mine environment, comprising the following steps:
[0060] S1. Preprocess the collected coal mine images of the target area, and use the deep learning semantic segmentation model to divide the coal mine images into different semantic areas, including bright areas, dark areas and dust-blocked areas. Through the underground monitoring equipment deployed in the target area of the coal mine, collect image data of the target area (tunnel, working face) from multiple angles and multiple lighting conditions to ensure that the samples cover different areas, and filter the original images to preliminarily suppress dust noise. Eliminate extreme pixel values through histogram cropping and normalize them to the range of [0,1] to reduce the impact of uneven lighting on subsequent processing. Among them, the underground monitoring equipment includes mine explosion-proof cameras or industrial cameras. A pre-trained semantic segmentation model (DeepLabv3+) is used to perform transfer learning based on the existing coal mine scene dataset. The output layer is adjusted to 3 channels, including bright areas, dark areas and dust-blocked areas, and cross entropy is used. The loss function supervises the training, and then labels the semantic areas of the coal mine image to generate a mask, in which the bright area is marked as a highlight pixel, the dark area as a low-brightness pixel, and the dust-occluded area is blurred or occluded. The Adam optimizer is used, combined with a dynamic learning rate adjustment strategy, and the mIoU (mean intersection over union) indicator is monitored on the validation set until the model converges. The preprocessed image is input into the trained semantic segmentation model, and a probability map is output. Threshold segmentation is performed with a segmentation threshold of 0.5 and a semantic mask is generated to clearly demarcate the bright area, dark area, and dust-occluded area. The segmented semantic mask is subjected to a morphological operation of opening operation to eliminate isolated noise points and fill small holes to ensure smooth regional boundaries. The segmentation result is then double-checked by combining the light intensity histogram and dust concentration estimation to correct the misclassified areas. Finally, a semantic segmentation mask containing bright area, dark area, and dust-occluded area is generated.
[0061] S2. Based on the characteristics of semantic regions, a differentiated enhancement strategy is formulated to avoid detail distortion caused by global adjustment. Specifically, local contrast suppression is used in bright areas, illumination compensation is enhanced in dark areas, and noise diffusion is suppressed by edge-preserving smoothing in dust-occluded areas. According to the mask generated by the semantic segmentation model, the position and range of bright areas, dark areas and dust-occluded areas are clarified, and the characteristics of each area are analyzed. Specifically, there is a risk of overexposure in bright areas, details are lost in dark areas due to insufficient illumination, and there is more noise and blurred edges in dust-occluded areas. Based on the characteristics of each area, a differentiated enhancement strategy is formulated. Local contrast suppression is used in bright areas to avoid overexposure, illumination compensation is enhanced in dark areas to improve brightness and contrast, and noise diffusion is suppressed by edge-preserving smoothing in dust-occluded areas. Based on the semantic segmentation mask, the bright areas (areas where highlight pixels are concentrated) are located and the risk of detail loss caused by highlight overexposure is analyzed. Contrast-limited adaptive equalization (CLAHE) is applied locally in the bright areas, the block size is set to 8×8 pixels, and the contrast enhancement amplitude is limited to Clip. Limit=2.0, to avoid noise amplification and edge distortion caused by global histogram equalization, and then combine bilateral filtering (spatial domain Gaussian kernel radius=3, value domain Gaussian kernel radius=0.1) to retain the transition between highlights and shadows at the edge of the bright area to prevent excessive smoothing from causing structural blur. Dark areas (low-brightness pixel areas) are extracted through semantic masks, and their average brightness values are analyzed in combination with the light intensity histogram to identify the low-light areas that need to be compensated. Nonlinear transformation (γ=1.8) is applied to the dark area pixels to improve the overall brightness while suppressing overexposure. At the same time, the light analysis after Gaussian filtering is integrated. Multi-scale Retinex (MSR) is used to achieve illumination equalization, preserving large-scale structure and small-scale details. The enhanced dark area image is decomposed using a Laplacian pyramid to extract the high-frequency detail layer, which is then fused with the low-frequency illumination layer to avoid blurring of outlines caused by smoothing. Dust-occluded areas (blurred / occluded areas) are located based on semantic masks, and their noise type and edge blur are analyzed. While denoising, the device outline is retained. Combined with the edge information of the semantic mask, a small radius filter (r=3) is applied to the boundary of the dust-occluded area to prevent over-smoothing of the edges.
[0062] S3. Improve the traditional Retinex model and introduce non-local mean filtering. Decompose the illumination component and reflection component through pixel similarity matching to reduce the interference of dust noise on illumination estimation. Apply non-local mean filtering (NLM) denoising on the input pre-processed coal mine image. Search similar blocks through pixel similarity matching. Set the search window radius to 7 to ensure that similar pixel blocks are found globally. The similarity weight is based on the Gaussian kernel to enlarge the tolerance range of pixel similarity matching and adapt to the randomness of dust noise. Then, for each pixel, search for similar pixel blocks within its search window, weighted average the pixel values of similar blocks to generate a denoised image, suppress dust noise, and avoid subsequent illumination estimation being contaminated by noise. For the denoised image, further extract the illumination component through non-local mean filtering, decompose the denoised image into similar pixel blocks, calculate the pixel mean value within the block as the local illumination value for each block, fuse the local illumination values of all blocks to generate a global illumination component map, and then use the formula: Calculate the reflected component , to extract the reflection component, where is the input denoised image, For the illumination component, a guided filter is applied to the reflection component. Using the input image as a guide, it smooths noise while preserving edges. The high-frequency detail layer is extracted by combining wavelet transform and fused with the filtered reflection component. Gaussian smoothing is applied to the illumination component to eliminate local estimation errors and generate a uniform illumination background. The image is then reconstructed to achieve dust noise suppression and illumination equalization.
[0063] Furthermore, the process of reconstructing the image is:
[0064] The image before non-local mean filtering (NLM) denoising is used as the guide image, and the guided filter is applied to the reflection component. Filter) is used to perform edge-preserving smoothing to suppress residual noise. The filter radius is set to 5, and the regularization parameter ε is set to 0.01. The guided filter uses the structural information of the guided image to perform edge-preserving smoothing on the reflection component to suppress residual noise while retaining the edges and details of the image, effectively reducing the noise in the reflection component while avoiding the loss of details caused by excessive smoothing. The reflection component after guided filtering is decomposed by Haar wavelet to extract high-frequency detail layers in the horizontal, vertical and diagonal directions. The high-frequency detail layer contains the texture and edge information of the image, and the high-frequency detail layer is fused with the low-frequency approximation layer using a weighting coefficient. The high-frequency layer weight is 0.8 and the low-frequency layer weight is 0.2 to enhance the texture and edge of the device, highlight the details of the image, while maintaining the smoothness of the overall image and improving the visual effect of the image. Gaussian smoothing is applied to the illumination component to eliminate local estimation errors and generate a uniform illumination background. Gaussian smoothing effectively removes noise and local inhomogeneity in the illumination component, making the illumination background smoother. Finally, the formula Reconstruct the image, where is the smoothed illumination component, It is the enhanced reflection component. The reconstructed image suppresses dust noise and balances illumination, resulting in richer details and higher contrast.
[0065] S4, performs adaptive gamma correction on the decomposed illumination components and uses multi-scale Retinex (MSR) enhancement on the reflection components to balance detail preservation and noise suppression;
[0066] S5. Based on the corrected illumination component and the enhanced reflection component, targeted image enhancement is performed on each semantic area to improve contrast and clarity;
[0067] S6. Fusing the enhanced semantic region images to generate an overall enhanced image, and outputting a high-quality coal mine environment enhanced image with rich details and suppressed noise.
[0068] Example 2, as Figure 1 、 Figure 2 As shown, based on Example 1, the present invention provides a technical solution: preferably, S4 specifically includes:
[0069] The input is the global illumination component, which is divided into local blocks. The brightness distribution of each block is analyzed independently, and the mean and standard deviation of each block are calculated. The mean reflects the local brightness level, the standard deviation measures the brightness uniformity, a low standard deviation indicates a uniform area, and a high standard deviation indicates an edge or noise area. The gamma value is calculated according to the local statistics of each block, and a gamma transform is applied to each block to generate a contrast-balanced lighting background. The reflection component after edge preservation is input, that is, the reflection component generated by guided filtering and wavelet fusion. It is decomposed by multi-scale Retinex and convolved with three-scale Gaussian kernels. The three-scale Gaussian kernels are 15, 80 and 250 respectively. Among them, the small-scale Gaussian kernel The kernel size is 15 to extract high-frequency details, the kernel size is 80 to balance details and noise, and the kernel size is 250 to extract low-frequency background and suppress noise. The Retinex response is then calculated for each scale, and the responses of each scale are weighted and fused with a weight of 1 / 3. The results are smoothed by bilateral filtering with a spatial weight of 5 and a color weight of 0.1 to generate an enhanced reflection component. The illumination component after adaptive gamma correction is integrated with the reflection component enhanced by multi-scale Retinex, and the illumination and reflection components are fused. The final image has improved illumination equalization and detail enhancement, while avoiding excessive noise amplification and achieving an organic combination of illumination and reflection components.
[0070] In addition, the calculation process of gamma value is:
[0071] Traverse all pixels of the illumination component, divide the illumination component into N×N local blocks, calculate the mean and standard deviation of each block, and calculate the global maximum mean and global maximum standard deviation. For each block, calculate the ratio of the standard deviation to the global maximum standard deviation, and calculate the ratio of 1 minus the standard deviation, multiply it with the basic gamma value to obtain the basic term. For each block, calculate the ratio of the mean to the global maximum mean, and multiply it with the gamma lower limit of the low-brightness area to obtain the lower limit term.
[0072] Add the base term and the lower limit term to calculate the gamma value;
[0073] The calculation expression of gamma value is:
[0074] ;
[0075] ;
[0076] ;
[0077] Where, is the gamma value, For the A local block represents the local analysis unit of the illumination component, which is used to independently calculate statistics. is the side length of the local block, which determines the scale of the local analysis. The larger it is, the more the statistic reflects the global characteristics. The smaller it is, the more sensitive it is to local changes. is the illumination component at the pixel The grayscale value at represents the brightness information of the input image. For blocks The mean value reflects the average brightness level within the block and is used for adaptive brightness adjustment in gamma value calculation. is the square difference between the pixel value and the mean, which is used to eliminate the influence of positive and negative deviations and amplify the weight of larger deviations. For blocks The standard deviation reflects the uniformity of brightness within the block. As the basic gamma value, balance the overall contrast, , The gamma lower limit for low brightness areas to avoid over-compression, , and is the global maximum standard deviation and mean, used for normalization;
[0078] The calculation expression of Retinex response is:
[0079] , ;
[0080] Where, For the Retinex response of each scale (enhanced local details of the reflection component), is the reflection component of the input (generated by guided filtering and wavelet fusion), For the Gaussian kernel of scale, The convolution operation is to convolve the Gaussian kernel with the reflection component to simulate the human eye's adaptation process to illumination. Convert the reflection component from linear space to logarithmic space to facilitate the separation of illumination and reflection components;
[0081] The calculation expression of the enhanced reflection component is:
[0082] ;
[0083] Where, For the enhanced reflection component (MSR output), it preserves the device details while smoothing the noise and improving the image readability. It is a weighted fusion of Retinex responses at each scale, balancing the detail information at different scales and avoiding over-enhancement or noise residue caused by a single scale. It is a bilateral filter that combines spatial proximity and pixel similarity for smoothing, preserving edge details;
[0084] S5 specifically includes:
[0085] Combining the characteristics of bright areas, dark areas, and dust-occluded areas, a corresponding enhancement strategy is matched for each semantic area based on the corrected illumination component and the enhanced reflection component, and then targeted enhancement processing is performed on each semantic area. A local contrast suppression strategy is applied to the bright area, and the corrected illumination component is used to further adjust the brightness distribution of the bright area to avoid overexposure. Combined with the enhanced reflection component, the details and texture of the bright area are retained. An illumination compensation strategy is applied to the dark area, and the corrected illumination component is used to increase the brightness of the dark area. At the same time, combined with the enhanced reflection component, the contrast and details of the dark area are enhanced to make the structure of the dark area clearer. An edge-preserving smoothing strategy is applied to the dust-occluded area, and the enhanced reflection component is used to smooth the noise through bilateral filtering technology, while retaining the device outline and edge information. Through targeted enhancement, the image quality of each semantic area is significantly improved;
[0086] S6 specifically includes:
[0087] The pre-trained DeepLabV3+ model is used to input the original image and generate three-category masks of bright area, dark area and dust occlusion area. The mask of each area is normalized to ensure that the mask value is between [0,1]. Within the range, the mask is normalized and used as the fusion weight. The masks for the bright, dark, and dust-occluded regions each correspond to their own weight distribution. Regions with higher weights indicate a greater contribution to the pixel during the fusion process. The enhanced images for the bright, dark, and dust-occluded regions are multiplied by the corresponding semantic mask weights. For each pixel, the enhancement results from different regions are weighted and summed according to the weight of the region to which it belongs to generate a fused image. At region boundaries, smooth weight transitions are used to optimize the boundary effect and avoid splicing artifacts. Blurring or gradient domain fusion techniques are used to smooth the weight transitions at region boundaries, ensuring a natural and smooth transition at the region boundaries of the fused image. The fused image is finally reconstructed to generate an overall enhanced image. During the reconstruction process, image contrast and clarity are further optimized to ensure improved overall image quality. Global contrast enhancement further enhances the visual quality of the image. Furthermore, the image is checked for excessive noise amplification and optimized using noise suppression techniques (wavelet thresholding). The resulting image achieves excellent contrast, clarity, and noise control.
[0088] Example 3, as Figure 1 、 Figure 2As shown, based on Examples 1-2, the present invention further provides an image enhancement system in a complex coal mine environment, which is used to implement the above-mentioned image enhancement method in a complex coal mine environment, including an image processing platform, which is communicatively connected to the following modules, wherein:
[0089] The image acquisition and preprocessing module is used to collect image data from multiple angles and lighting conditions using underground monitoring equipment deployed in the target area of the coal mine. It also preprocesses the original images to initially suppress dust noise, eliminate extreme pixel values through histogram clipping, and normalize them to the range of [0,1] to reduce the impact of uneven lighting on subsequent processing, thereby generating input images of relatively uniform quality.
[0090] The semantic segmentation module uses a pre-trained semantic segmentation model and performs transfer learning based on a coal mine scene dataset to divide the image into bright areas, dark areas, and dust-occluded areas. It then generates semantic masks to clarify the location and range of each area. It then performs morphological operations such as opening on the segmented semantic masks to eliminate isolated noise points and fill small holes to ensure smooth regional boundaries.
[0091] The Differentiation Enhancement Module is used to develop differentiated enhancement strategies based on the characteristics of each region. It uses local contrast suppression in bright areas, enhanced illumination compensation in dark areas, and edge-preserving smoothing to suppress noise diffusion in dust-occluded areas. This avoids detail distortion caused by global adjustments and significantly improves the image quality of each semantic region, preserving details in bright areas, enhancing contrast in dark areas, and suppressing noise in dust areas.
[0092] The illumination and reflection component processing module is used to perform adaptive gamma correction on the decomposed illumination components to generate a contrast-balanced illumination background. Through multi-scale Retinex (MSR) enhancement and bilateral filtering, it balances detail preservation and noise suppression to generate an enhanced reflection component.
[0093] The image fusion and reconstruction module is used to stitch the enhanced bright area, dark area and dust-occluded area images using semantic segmentation masks as weights, optimize the transition effect of the region boundaries through smooth weight transition to avoid stitching traces, and perform global contrast enhancement and noise suppression optimization on the fused image to generate a high-quality enhanced image.
[0094] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An image enhancement method in a complex coal mine environment, characterized in that: The following steps are involved: S1. Preprocess the collected coal mine images of the target area and use a deep learning semantic segmentation model to divide the coal mine images into different semantic areas, including bright areas, dark areas, and dust-occluded areas. Use underground monitoring equipment deployed in the target area of the coal mine to collect image data from multiple angles and multiple lighting conditions in the target area. Filter the original images to initially suppress dust noise and eliminate extreme pixel values through histogram cropping. A pre-trained semantic segmentation model was used for transfer learning based on an existing coal mine scene dataset. The output layer was adjusted to three channels, including bright areas, dark areas, and dust-occluded areas. The cross-entropy loss function was used for supervised training to annotate the semantic areas of the coal mine images and generate masks. The preprocessed image is input into the trained semantic segmentation model, which outputs a probability map. Threshold segmentation is performed using a segmentation threshold of 0.5 to generate a semantic mask, which clearly demarcates bright areas, dark areas, and dust-occluded areas. A morphological operation called opening is performed on the segmented semantic mask. The segmentation result is then rechecked by combining the light intensity histogram with dust concentration estimation to correct misclassified areas. Finally, a semantic segmentation mask containing bright areas, dark areas, and dust-occluded areas is generated. S2. Develop differentiated enhancement strategies based on semantic region characteristics; S3. Improve the traditional Retinex model and introduce non-local mean filtering to decompose the illumination component and reflection component through pixel similarity matching; S4, perform adaptive gamma correction on the decomposed illumination components and use multi-scale Retinex enhancement on the reflection components to balance detail preservation and noise suppression; S5. Performing targeted image enhancement on each semantic region based on the corrected illumination component and the enhanced reflection component; S6. Fusing the enhanced semantic region images to generate an overall enhanced image, and outputting a high-quality coal mine environment enhanced image.
2. The image enhancement method in a complex coal mine environment according to claim 1, characterized in that: The S2 specifically includes: Based on the mask generated by the semantic segmentation model, the location and range of bright areas, dark areas, and dust-occluded areas are clarified, and the characteristics of each area are analyzed. Based on the characteristics of each area, differentiated enhancement strategies are formulated; Based on the semantic segmentation mask, we locate bright areas and analyze the risk of detail loss due to highlight overexposure. We then apply contrast-limited adaptive equalization to the bright areas, setting the block size to 8×8 pixels and the contrast enhancement limit to ClipLimit=2.
0. We then combine this with bilateral filtering to preserve the highlight-shadow transition at the edges of the bright areas. Dark areas are extracted using semantic masks, and their average brightness values are analyzed in combination with the light intensity histogram to identify low-light areas that need to be compensated. A nonlinear transformation is applied to the dark area pixels, and the Gaussian filtered illumination components are fused. The enhanced dark area image is decomposed using a Laplacian pyramid to extract the high-frequency detail layer and fuse it with the low-frequency illumination layer. The dust occlusion area is located based on the semantic mask, and its noise type and edge blur degree are analyzed. Combined with the edge information of the semantic mask, a small radius filter is applied to the boundary area of the dust occlusion area.
3. The image enhancement method in a complex coal mine environment according to claim 2, characterized in that: The S3 specifically includes: Non-local mean filtering is applied to the pre-processed coal mine image input for denoising. Similar blocks are searched through pixel similarity matching. The search window radius is set to 7, and the similarity weight is based on a Gaussian kernel. The tolerance range of pixel similarity matching is enlarged. Then, for each pixel, similar pixel blocks are found within the search window. The pixel values of similar blocks are weighted averaged to generate the denoised image. The denoised image is further extracted through non-local mean filtering. The denoised image is decomposed into similar pixel blocks. For each block, the mean value of the pixels in the block is calculated as the local illumination value. The local illumination values of all blocks are fused to generate a global illumination component map, and then the reflection component is calculated to extract the reflection component. Guided filtering is applied to the reflection component, using the input image as a guide to smooth noise while preserving edges. Wavelet transform is combined to extract high-frequency detail layers, which are fused with the filtered reflection component. Gaussian smoothing is applied to the illumination component to eliminate local estimation errors, generate a uniform illumination background, and then reconstruct the image.
4. The image enhancement method in a complex coal mine environment according to claim 3, characterized in that: The process of reconstructing the image is as follows: The image before non-local mean filtering denoising is used as the guide image, and the guided filter is applied to the reflection component for edge-preserving smoothing. The filter radius is set to 5, and the regularization parameter ε is set to 0.
01. The guided filter uses the structural information of the guide image to perform edge-preserving smoothing on the reflection component. Perform Haar wavelet decomposition on the reflected component after guided filtering to extract high-frequency detail layers in the horizontal, vertical, and diagonal directions. The high-frequency detail layer contains the texture and edge information of the image, and is fused with the low-frequency approximation layer using weighted coefficients. The high-frequency layer weight is 0.8, and the low-frequency layer weight is 0.
2. Gaussian smoothing is applied to the illumination component to eliminate local estimation errors, generate a uniform illumination background, and finally reconstruct the image.
5. The image enhancement method in a complex coal mine environment according to claim 1, characterized in that: The S4 specifically includes: The input is the global illumination component, which is divided into local blocks. The brightness distribution of each block is analyzed independently, the mean and standard deviation of each block are calculated, the gamma value is calculated based on the local statistics of each block, and the gamma transform is applied to each block to generate a contrast-balanced illumination background. The reflection component after input edge preservation, that is, the reflection component generated by guided filtering and wavelet fusion, is decomposed by multi-scale Retinex and convolved with three-scale Gaussian kernels. The three-scale Gaussian kernels are 15, 80, and 250, respectively. Among them, the small-scale Gaussian kernel is 15, the medium-scale Gaussian kernel is 80, and the large-scale Gaussian kernel is 250. Then, the Retinex response is calculated for each scale, and the responses of each scale are weighted and fused with a weight of 1 / 3. The result is smoothed by bilateral filtering with a spatial weight of 5 and a color weight of 0.1 to generate the enhanced reflection component. The illumination component after adaptive gamma correction and the reflection component after multi-scale Retinex enhancement are integrated, and the illumination component and the reflection component are fused.
6. The image enhancement method in a complex coal mine environment according to claim 5, characterized in that: The calculation process of the gamma value is: Traverse all pixels of the illumination component, divide the illumination component into N×N local blocks, calculate the mean and standard deviation of each block, and calculate the global maximum mean and global maximum standard deviation; For each block, calculate the ratio of the standard deviation to the global maximum standard deviation, and calculate the ratio of 1 minus the standard deviation, and multiply it by the basic gamma value to get the basic term; For each block, calculate the ratio of the mean to the global maximum mean and multiply it by the gamma lower limit of the low brightness area to obtain the lower limit term; The gamma value is calculated by adding the base term and the floor term.
7. The image enhancement method in a complex coal mine environment according to claim 1, characterized in that: The S5 specifically includes: Combining the characteristics of bright areas, dark areas, and dust-occluded areas, and based on the corrected illumination component and enhanced reflection component, a corresponding enhancement strategy is matched to each semantic area, and then targeted enhancement processing is performed on each semantic area. A local contrast suppression strategy is applied to bright areas, and the corrected illumination component is used to further adjust the brightness distribution of the bright areas. Combined with the enhanced reflection component, the details and texture of the bright areas are retained. An illumination compensation strategy is applied to dark areas, and the corrected illumination component is used to increase the brightness of the dark areas. At the same time, combined with the enhanced reflection component, the contrast and details of the dark areas are enhanced. An edge-preserving smoothing strategy is applied to dust-occluded areas, and the enhanced reflection component is used to smooth the noise through bilateral filtering technology, while retaining the device contour and edge information.
8. The image enhancement method in a complex coal mine environment according to claim 7, characterized in that: The S6 specifically includes: The pre-trained DeepLabV3+ model is used to input the original image and generate three-category masks for bright areas, dark areas, and dust-occluded areas. The masks of each area are normalized and used as fusion weights. After the normalized masks, the masks of the bright areas, dark areas, and dust-occluded areas correspond to their respective weight distributions. The enhanced bright area, dark area and dust occlusion area images are multiplied by the corresponding semantic mask weights respectively. For each pixel, the enhancement results of different areas are weighted summed according to the weight of the area to which it belongs to generate a fused image; The fused image is finally reconstructed to generate an overall enhanced image. At the same time, the image is checked for excessive noise amplification and optimized using noise suppression technology.
9. An image enhancement system in a complex coal mine environment, used to implement the image enhancement method in a complex coal mine environment according to any one of claims 1 to 8, comprising an image processing platform, characterized in that: The image processing platform is communicatively connected to the following modules, wherein: The image acquisition and preprocessing module is used to collect image data from multiple angles and lighting conditions through underground monitoring equipment deployed in the target area of the coal mine, and preprocess the original images to generate input images with relatively uniform quality; The semantic segmentation module uses a pre-trained semantic segmentation model to perform transfer learning based on a coal mine scene dataset, dividing the image into bright areas, dark areas, and dust-occluded areas, generating semantic masks to clarify the location and scope of each area; Differentiation enhancement module, used to formulate differentiation enhancement strategies based on the characteristics of each region; The illumination and reflection component processing module is used to perform adaptive gamma correction on the decomposed illumination component and generate the enhanced reflection component through multi-scale Retinex enhancement and bilateral filtering; The image fusion and reconstruction module is used to use the semantic segmentation mask as the weight to stitch the enhanced bright area, dark area and dust occlusion area images, and perform global contrast enhancement and noise suppression optimization on the fused image to generate a high-quality enhanced image.
Citation Information
Patent Citations
Downhole image processing method based on improved bilateral filtering
CN110288536A
Coal mine low-illumination image enhancement method based on noisy Retinex model
CN115760640A