Cable tunnel disaster intelligent diagnosis method based on Retinex theory and wavelet transform
By applying Retinex theory and wavelet transformation in cable tunnel disaster detection, separating light and reflection components, enhancing image details and building feature data sets, the problem of low accuracy of traditional detection methods in extremely low illumination environments is solved, and higher detection accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202510216566.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-13
AI Technical Summary
Traditional cable tunnel disaster detection methods have low accuracy in extremely low illumination environments and are prone to false detection.
Using the method based on Retinex theory and wavelet transformation, the grayscale image of the cable tunnel is obtained, the illumination components and reflection components are separated, the structure and texture decomposition are performed, the reflection image is enhanced through the semi-wavelet transformation, the feature data set is constructed, and the disaster disease intelligent diagnosis model is input for detection.
The accuracy and reliability of cable tunnel disaster detection is improved. By separating light and reflection components, image details are enhanced, and fine feature data sets are constructed, which significantly improves the accuracy of detection.
Smart Images

Figure CN120147715A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent diagnosis technologies, and particularly to an intelligent diagnosis method, device, computer equipment, computer-readable storage medium, and computer program product for cable tunnel disasters and diseases based on the Retinex theory and wavelet transform. Background Art
[0002] As an important part of urban infrastructure, the safe operation of cable tunnels is crucial for ensuring the normal operation of cities. During the long-term operation of cable tunnels, disaster and disease problems may occur due to various factors such as environmental erosion, construction damage, and material aging. If these problems are not diagnosed and processed in a timely manner, they may lead to serious safety accidents, affecting urban power supply safety and residents' lives. However, cable tunnels are in an extremely low illumination environment, making it difficult to detect disaster and disease problems with strong concealment. Traditional cable tunnel disaster and disease detection methods mainly rely on manual inspections, which are prone to misdetection, resulting in a low accuracy rate for cable tunnel disaster and disease detection. Summary of the Invention
[0003] Based on this, in order to solve the above technical problems, it is necessary to provide an intelligent diagnosis method, device, computer equipment, computer-readable storage medium, and computer program product for cable tunnel disasters and diseases based on the Retinex theory and wavelet transform, which can improve the accuracy rate of cable tunnel disaster and disease detection.
[0004] In a first aspect, the present application provides an intelligent diagnosis method for cable tunnel disasters and diseases based on the Retinex theory and wavelet transform, including:
[0005] Obtain a grayscale image of the cable tunnel;
[0006] Separate illumination components and reflection components of different scales from the grayscale image, and obtain an illumination image based on the illumination components and the reflection components; the illumination components are used to characterize the illumination conditions in the image, and the reflection components are used to characterize the inherent characteristics of the objects in the image;
[0007] Decompose the structure and texture of the illumination image to obtain a reflection image;
[0008] Perform semi-wavelet transform on the reflection image to obtain an enhanced reflection image;
[0009] Construct a feature dataset based on the enhanced reflection image;
[0010] Input the feature dataset into the disaster and disease intelligent diagnosis model to obtain the intelligent diagnosis result of the cable tunnel disasters and diseases.
[0011] In one embodiment, the obtaining of the grayscale image of the cable tunnel includes:
[0012] Obtain the original image of the cable tunnel;
[0013] Perform channel separation on the original image to obtain grayscale images corresponding to the RGB three channels respectively;
[0014] Convert the grayscale image from the real number domain to the logarithmic domain to obtain the grayscale image of the cable tunnel.
[0015] In one embodiment, constructing a feature dataset according to the enhanced reflection image includes:
[0016] Convert the enhanced reflection image from the logarithmic domain to the real number domain and perform color restoration through a color restoration factor to obtain the feature dataset.
[0017] In one embodiment, obtaining an illumination image according to the illumination component and the reflection component includes:
[0018] Perform color restoration on the reflection component to obtain the restored reflection component;
[0019] Synthesize the illumination image according to the illumination component and the restored reflection component.
[0020] In one embodiment, performing a semi-wavelet transform on the reflection image to obtain an enhanced reflection image includes:
[0021] Perform multi-scale decomposition on the reflection image through a semi-wavelet transform to generate multiple different frequency components;
[0022] Perform a truncation operation on the frequency components to retain the positive value part in the frequency components;
[0023] Perform weighted fusion on the positive value parts of each frequency component to obtain the enhanced reflection image.
[0024] In one embodiment, the disaster intelligent diagnosis model includes a hybrid neural network model composed of a random configuration network and a convolutional neural network.
[0025] In a second aspect, the present application further provides a disaster intelligent diagnosis device for a cable tunnel based on the Retinex theory and wavelet transform, including:
[0026] An acquisition module for acquiring the grayscale image of the cable tunnel;
[0027] A calibration module, configured to separate illumination components and reflection components of different scales from the grayscale image, and obtain an illumination image according to the illumination components and the reflection components; the illumination components are used to characterize the illumination conditions in the image, and the reflection components are used to characterize the inherent characteristics of the objects in the image;
[0028] A decomposition module, configured to decompose the structure and texture of the illumination image to obtain a reflection image;
[0029] An enhancement module, configured to perform semi-wavelet transform on the reflection image to obtain an enhanced reflection image;
[0030] A construction module, configured to construct a feature dataset according to the enhanced reflection image;
[0031] A diagnosis module, configured to input the feature dataset into a disaster intelligent diagnosis model to obtain the disaster intelligent diagnosis result of the cable tunnel.
[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0034] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0035] The above-mentioned intelligent disaster diagnosis method, device, computer equipment, computer-readable storage medium and computer program product for cable tunnels based on the Retinex theory and wavelet transform obtain the grayscale image of the cable tunnel; separate the illumination components and reflection components of different scales from the grayscale image, and obtain the illumination image according to the illumination components and reflection components; the illumination components are used to characterize the illumination conditions in the image, and the reflection components are used to characterize the inherent characteristics of the objects in the image; decompose the structure and texture of the illumination image to obtain the reflection image; perform semi-wavelet transform on the reflection image to obtain the enhanced reflection image; construct a feature dataset according to the enhanced reflection image; input the feature dataset into the intelligent disaster diagnosis model for the cable tunnel to obtain the intelligent disaster diagnosis result of the cable tunnel. By combining multiple image processing methods, such as the separation of illumination components and reflection components, semi-wavelet transform, and the construction of the feature dataset, the accuracy and reliability of cable tunnel disaster detection are effectively improved. The illumination components and reflection components can be used to clearly distinguish the environmental illumination information and the inherent characteristics of the objects themselves in the image. Processing the reflection image through semi-wavelet transform can effectively enhance the structural details and texture features in the image. By constructing the feature dataset and inputting it into the intelligent disaster diagnosis model for the cable tunnel, the accuracy rate of cable tunnel disaster detection can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0037] Figure 1 It is an application environment diagram of an intelligent disaster diagnosis method for a cable tunnel based on the Retinex theory and wavelet transform in an embodiment;
[0038] Figure 2 It is a flowchart of an intelligent disaster diagnosis method for a cable tunnel based on the Retinex theory and wavelet transform in an embodiment;
[0039] Figure 3 It is a logic diagram of an intelligent disaster diagnosis method for a cable tunnel based on the Retinex theory and wavelet transform in an embodiment;
[0040] Figure 4 It is a structural block diagram of an intelligent disaster diagnosis device for a cable tunnel based on the Retinex theory and wavelet transform in an embodiment;
[0041] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0042] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] The intelligent disaster diagnosis method for cable tunnels based on the Retinex theory and wavelet transform provided by the embodiments of the present application can be applied to, for example, Figure 1 the application environment shown in the figure. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed in the cloud or other network servers. The terminal 102 acquires the grayscale image of the cable tunnel; the terminal 102 separates the illumination components and reflection components of different scales from the grayscale image, and obtains the illumination image according to the illumination components and reflection components; the illumination component is used to characterize the illumination conditions in the image, and the reflection component is used to characterize the inherent characteristics of the objects in the image; the terminal 102 decomposes the structure and texture of the illumination image to obtain the reflection image; the terminal 102 performs a semi-wavelet transform on the reflection image to obtain the enhanced reflection image; the terminal 102 constructs a feature data set according to the enhanced reflection image; the terminal 102 inputs the feature data set into the intelligent disaster diagnosis model of the cable tunnel to obtain the intelligent disaster diagnosis result of the cable tunnel. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, a smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0044] In an exemplary embodiment, as Figure 2 shown, an intelligent disaster diagnosis method for cable tunnels based on the Retinex theory and wavelet transform is provided. Taking the method applied to Figure 1 the terminal 102 in the figure as an example, it includes:
[0045] Step S202, acquiring the grayscale image of the cable tunnel.
[0046] In a specific implementation, a color image of the cable tunnel can be captured by a camera device (such as a high-definition camera, an infrared camera, etc.) in the cable tunnel. Since the environment in the cable tunnel usually has low illumination, it may be necessary to select a device suitable for shooting under low-light conditions. The captured images are usually color images. To simplify processing and highlight the illumination features, these color images can be converted into grayscale images.
[0047] The color image is converted into a grayscale image through color space conversion (such as RGB to grayscale). In a grayscale image, there is only brightness information and no color information. The grayscale value of each pixel in the grayscale image represents its brightness. This can reduce the variables to be concerned about in subsequent processing and focus on the structure and illumination features of the image.
[0048] Step S204: Separate illumination components and reflection components of different scales from the grayscale image, and obtain an illumination image based on the illumination components and reflection components.
[0049] Among them, the illumination component is used to characterize the illumination conditions in the image, and the reflection component is used to characterize the inherent characteristics of the objects in the image.
[0050] In practical applications, the Retinex theory (a scientific theory that explains how the human visual system perceives color under different illumination conditions) believes that the human visual system divides the perception of an image into an illumination component (Illumination) and a reflection component (Reflectance). The illumination component reflects the illumination conditions in the image (such as the intensity and direction of the light source, etc.), while the reflection component reflects the inherent characteristics of the object surface (such as color, texture, etc.). The color perceived by the human eye is the result of the combined action of the reflection component and the illumination component. Therefore, separating illumination components and reflection components of different scales from the grayscale image can be a key step determined based on the Retinex theory.
[0051] In a specific implementation, the illumination component represents the illumination conditions in the image and is mainly used to reflect the light source intensity and global illumination of the image. The illumination component describes how the light source in the scene affects the brightness and shadows of the image. It usually represents the low-frequency part of the image, that is, the overall illumination distribution of the image, and does not contain the details of the object surface.
[0052] In a specific implementation, the reflection component represents the inherent characteristics and details of the object surface, such as texture, color, etc. It reflects the nature of the object itself and is not affected by the ambient illumination. The reflection component usually represents the high-frequency part of the image and contains the detail and structure information in the image.
[0053] In practical applications, images in cable tunnels are usually in a low-illumination environment, and changes in lighting conditions (such as shadows or local overexposure) may obscure the details and reflection characteristics of objects. The purpose of separating the illumination component and the reflection component is to remove or reduce the interference of lighting conditions on the image, making the subsequent analysis of the reflection component (i.e., the characteristics of the object itself) more accurate. Through separation, the true color and texture details of the objects in the image can be retained, so that the image enhancement is not affected by lighting changes.
[0054] Optionally, different frequency components of the image can be analyzed by applying Gaussian filters of different scales to the grayscale image. Different scales represent information at different levels of detail in the image. For example, low scales reflect the global lighting changes in the image, i.e., the low-frequency part of the image; high scales reflect the details and local changes in the image, i.e., the high-frequency part of the image. Thus, different-scale illumination components and reflection components can be separated by the Gaussian filter.
[0055] In specific implementation, different weights can be assigned to the illumination component and the reflection component according to the intensity of illumination and the characteristics of reflection, and the illumination component and the reflection component are weighted and fused to obtain an illumination image to ensure that the brightness and color performance of the image are more natural and real. For example, for strong illumination areas in the grayscale image, the weight of the illumination component can be increased, and for detail areas in the grayscale image, the weight of the reflection component can be increased.
[0056] Among them, the illumination image is a combination of the illumination component and the reflection component, reflecting the overall effect of the image under lighting conditions. By synthesizing the illumination and reflection components, the illumination image can simultaneously show the brightness and surface details of the objects in the image. This process effectively removes the problem of uneven illumination in the low-illumination environment, restores the true details and colors of the image, and makes subsequent image analysis and disaster detection more accurate.
[0057] Step S206: Decompose the structure and texture of the illumination image to obtain a reflection image.
[0058] Among them, the illumination image mainly contains the influence of ambient illumination and the illumination information of the objects on the surface of the cable tunnel. In this image, the surface details and textures of the objects may be blurred by the influence of illumination. Therefore, it is necessary to decompose the image to extract the reflection characteristics (i.e., the reflection image) and illumination information of the objects themselves.
[0059] Among them, the structure refers to the overall shape and layout of the objects in the image, such as the shapes, edges, and contours of objects such as cables, walls, and floors. In image processing, the structure can be manifested as the geometric features of the objects, such as edges, corners, protrusions, etc.
[0060] Texture refers to the repeating pattern or texture of the details on the surface of an image (such as features like cracks, corrosion, water accumulation, etc.). Optionally, the texture can reflect the subtle local variations on the surface of an object, such as cracks, stains, or corrosion marks. Texture is crucial for disaster detection because many disaster features (such as cracks, corrosion, etc.) will form unique texture features on the surface of an object.
[0061] Optionally, decomposing the structure and texture of the irradiated image can be achieved by using the wavelet transform algorithm. Through multi-scale analysis, the structural features and detailed textures at multiple scales can be extracted. For example, the lower-frequency part mainly represents the general structure in the image, while the higher-frequency part reflects the detailed texture in the image.
[0062] In specific implementation, by decomposing the structure and texture of the irradiated image, a reflected image can be obtained. The reflected image highlights the texture and structural information on the surface of the object more prominently, which helps to better identify and diagnose the disaster features in the cable tunnel.
[0063] Step S208: Perform a half-wavelet transform on the reflected image to obtain an enhanced reflected image.
[0064] Among them, the half-wavelet transform (Half-Wavelet Transform, HWT) is an improved version of the wavelet transform. It can decompose a signal into frequency components at multiple scales through a wavelet function. The main difference between the half-wavelet transform and the wavelet transform is that when it transforms a signal, it only retains the positive part of the signal (i.e., the non-negative part). In other words, the half-wavelet transform "truncates" or "removes" the negative part of the signal and only processes the positive half part to reduce the influence of negative values, which helps to highlight the positive features of the signal and is suitable for processing the edge and detail parts in the image signal.
[0065] Performing a half-wavelet transform on the reflected image can enhance the positive features in the image or signal, effectively retain the high-frequency part in the signal, and highlight the detail and edge features in the image.
[0066] Step S210: Construct a feature dataset based on the enhanced reflected image.
[0067] Among them, the feature dataset is the representative information extracted from the image, usually including various numerical features of the image. For the disaster detection of the cable tunnel, the feature dataset usually includes the texture features, shape features, edge features, color distribution, etc. of the image. These features reflect the possible disaster problems on the surface of the cable tunnel, such as cracks, corrosion, deformation, etc.
[0068] The enhanced reflected image significantly enhances the detail features (such as edges, cracks, corrosion, etc.) in the image and can be used to construct a feature dataset.
[0069] Step S212: Input the feature dataset into the intelligent disaster diagnosis model for the cable tunnel to obtain the intelligent disaster diagnosis result of the cable tunnel.
[0070] Optionally, the intelligent disaster diagnosis model can be a machine learning model such as a support vector machine (SVM), decision tree, random forest, etc., or a deep learning model such as a convolutional neural network CNN or a deep neural network DNN.
[0071] In specific implementation, during the training phase of the intelligent disaster diagnosis model, by using a large number of labeled cable tunnel images (each image corresponds to a known disaster label), the relationship between features and disasters is learned. Through backpropagation and optimization algorithms, the model adjusts its internal parameters to make the prediction of the input feature data more and more accurate. In the prediction phase, the trained intelligent disaster diagnosis model will process the newly input feature dataset and output whether there is a disaster or the type of disaster (such as cracks, corrosion, stains, etc.) in the cable tunnel, and give the corresponding diagnosis result.
[0072] Through the above steps, by decomposing the illumination component and the reflection component, the illumination image is obtained, and the structure and texture of the illumination image are decomposed to obtain the reflection image, and the semi-wavelet transform is performed on the reflection image to obtain the enhanced reflection image, which can significantly improve the image quality of the cable tunnel in low-illumination environments and highlight the disaster information features.
[0073] In the above intelligent disaster diagnosis method for the cable tunnel based on the Retinex theory and wavelet transform, the grayscale image of the cable tunnel is obtained; the illumination components and reflection components of different scales are separated from the grayscale image, and the illumination image is obtained according to the illumination component and the reflection component; the illumination component is used to characterize the illumination conditions in the image, and the reflection component is used to characterize the inherent characteristics of the objects in the image; the structure and texture of the illumination image are decomposed to obtain the reflection image; the semi-wavelet transform is performed on the reflection image to obtain the enhanced reflection image; a feature dataset is constructed according to the enhanced reflection image; the feature dataset is input into the intelligent disaster diagnosis model for the cable tunnel to obtain the intelligent disaster diagnosis result of the cable tunnel. By combining multiple image processing methods, such as the separation of the illumination component and the reflection component, the semi-wavelet transform, and the construction of the feature dataset, the accuracy and reliability of cable tunnel disaster detection are effectively improved. The illumination component and the reflection component can be used to clearly distinguish the environmental illumination information and the inherent characteristics of the objects themselves in the image. Processing the reflection image through the semi-wavelet transform can effectively enhance the structural details and texture features in the image. Further improving the accuracy of cable tunnel disaster detection by constructing the feature dataset and inputting it into the intelligent disaster diagnosis model.
[0074] In another embodiment, obtaining a grayscale image of a cable tunnel includes: obtaining an original image of the cable tunnel; performing channel separation on the original image to obtain grayscale images corresponding to the three RGB channels respectively; and converting the grayscale images from the real number domain to the logarithmic domain to obtain the grayscale image of the cable tunnel.
[0075] Among them, the original image can be obtained by shooting with a camera device (such as a high-definition camera, an infrared camera, etc.). The original image of the cable tunnel may be a color RGB image, and these images contain rich environmental information.
[0076] The original image usually consists of three color channels: red (R), green (G), and blue (B).
[0077] In specific implementation, the original image can be separated according to the three RGB channels to obtain three separate images, and each image represents the grayscale values of the red channel, the green channel, and the blue channel respectively. The R channel only contains the grayscale information of the red part in the original image; the G channel only contains the grayscale information of the green part; the B channel only contains the grayscale information of the blue part. Channel separation can be used to independently process each color channel because the color information of different channels may have different effects on the details and illumination of the image.
[0078] Among them, the real number domain is the original form of image data representation, and the pixel value usually directly reflects the brightness or color intensity of the image. In many image processing tasks, the final image usually needs to be converted back to the real number domain to be consistent with the perception of the human visual system. Converting the image pixel value from the real number domain to the logarithmic domain can expand the dynamic range of the image, enhance the details in the low-light area, and at the same time compress the brightness of the high-light part.
[0079] In specific implementation, in the field of image processing, images are usually represented in the real number domain, and their pixel values directly reflect the brightness or color intensity of the image. However, for environments with low illumination or uneven illumination, directly processing images in the real number domain may not be conducive to image enhancement and feature extraction. By performing a logarithmic transformation to convert the pixel values of the image from the real number domain to the logarithmic domain, the dynamic range of the image can be effectively increased, the details can be enhanced, which helps to process the high-light parts in the image and makes the details in the low-light area more obvious.
[0080] The grayscale image converted to the logarithmic domain contains more image details, especially in low-light environments, which is helpful for subsequent image processing (such as illumination adjustment, structure decomposition, etc.), making it easier to identify details (such as cracks, corrosion, stains, etc.) in the cable tunnel.
[0081] The technical solution of this embodiment can separately process the RGB three channels, analyze the contribution of each channel to the image respectively, process the illumination changes and color distortion of different color channels, so as to obtain a more refined grayscale image; by performing a logarithmic transformation on the original image, the image details in low-illumination environments can be enhanced, enabling better representation of both the shadow parts and the highlighted areas in the image.
[0082] In another embodiment, according to the enhanced reflection image, a feature data set is constructed, including: converting the enhanced reflection image from the logarithmic domain to the real domain and performing color restoration through a color restoration factor to obtain the feature data set.
[0083] In practical applications, during the construction and subsequent processing of the feature data set, these image values need to be restored to the real domain for more intuitive calculation and analysis, and the restoration to the real domain can be achieved through an inverse logarithmic transformation. By restoring to the real domain, the brightness and contrast of the image are restored to the normal range, facilitating further image analysis and feature extraction.
[0084] Among them, the color restoration factor is used to remove color distortion caused by illumination changes, low light, or logarithmic transformation, making the image restore to a color closer to the real one. Optionally, the color restoration factor can be calculated and determined based on the overall brightness information of the image, the ambient light source, the hue, or the target application scenario. For example, if there is a strong light source or a strong color shift in the image, the color restoration factor will adjust the color ratio of each channel according to these factors. By performing color restoration through the color restoration factor, the color ratio of each channel can be fine-tuned to ensure that the red, green, and blue channels of the image are restored to a reasonable state, enabling the reflection image to show the real color after restoration and being suitable for subsequent feature extraction.
[0085] The technical solution of this embodiment accurately restores the color of the image through the application of the color restoration factor, making it closer to the actual performance in the natural environment. This is crucial for subsequent image analysis, especially when the disaster features (such as corrosion, cracks, etc.) in the image may be manifested as color changes, and color restoration can enhance the accuracy of diagnosis; the process of converting from the logarithmic domain to the real domain restores the details and contrast in the image, helping to extract more accurate features. This is particularly important for detecting possible tiny cracks or corrosion problems in the cable tunnel.
[0086] In another embodiment, an illumination image is obtained according to the illumination component and the reflection component, including: performing color restoration on the reflection component to obtain the restored reflection component; synthesizing the illumination image according to the illumination component and the restored reflection component.
[0087] Optionally, separating illumination components and reflection components of different scales from a grayscale image and obtaining an illumination image based on the illumination components and reflection components can be implemented based on the Multi-Scale Retinex with Color Restoration (MSRCR) algorithm. The MSRCR algorithm is an image enhancement method based on the Retinex theory. Through multi-scale decomposition and color restoration mechanisms, it eliminates the influence of uneven illumination on the color of the image to restore the natural color of the image and enhance details. Therefore, performing the MSRCR algorithm on the grayscale image can separate illumination components and reflection components of different scales, perform color restoration on the separated components, and finally obtain the illumination image.
[0088] In a specific implementation, after separating the illumination components and reflection components, color restoration can be performed on the reflection components because the reflection components directly affect the color of the image, and changes in illumination may cause color distortion or offset of the reflection components. Performing color restoration on the reflection components can be based on a color restoration factor. The color restoration factor can be calculated according to the illumination conditions of the image and the brightness information of the reflection components, and is used to adjust the hue, contrast, and saturation of the reflection components to restore them to a natural color state.
[0089] Optionally, synthesizing the illumination image according to the illumination components and the restored reflection components can be multiplying the illumination components and the restored reflection components to obtain the illumination image; or, the illumination components and the restored reflection components can be weighted and fused to obtain the illumination image.
[0090] The technical solution of this embodiment effectively solves the problems of uneven illumination and color distortion of images in low-light environments by performing color restoration on the reflection components and synthesizing the illumination components and the restored reflection components. Through this processing, the natural illumination effect and true color of the image can be restored, the detail performance of the image can be improved, and the accuracy and reliability of subsequent intelligent disaster diagnosis can be enhanced.
[0091] In another embodiment, performing a semi-wavelet transform on a reflection image to obtain an enhanced reflection image includes: performing multi-scale decomposition on the reflection image through a semi-wavelet transform to generate multiple different frequency components; performing a truncation operation on the frequency components to retain the positive part of the frequency components; and performing weighted fusion on the positive parts of the respective frequency components to obtain the enhanced reflection image.
[0092] Among them, multi-scale decomposition can decompose the reflection image into frequency components corresponding to multiple frequency levels. Each frequency component corresponding to a frequency level contains information at different scales. For example, the high-frequency components represent detail information such as edges and textures, and the low-frequency components represent the global illumination of the image and details of larger regions.
[0093] Among them, the truncation operation may refer to retaining the positive part (i.e., the part greater than zero) in each frequency component, while discarding or setting to zero the negative part, so as to remove the negative part that is not beneficial to image enhancement or may introduce noise. By removing the negative part, the positive features in the image (such as highlighted areas, edges, etc.) can be enhanced, and the interference of the negative part on details can be avoided.
[0094] Among them, the positive part may be the effective information of the image (for example, edges, textures, etc.). By retaining the positive part in the frequency component, the meaningful detail parts in the image can be strengthened, ensuring that the key information is more prominent in the enhanced image.
[0095] In a specific implementation, weighted fusion of the positive parts of each frequency component can be performed by weighted average or weighted summation. Optionally, the weight of the positive part of the low-frequency component can be lower, and the weight of the positive part of the high-frequency component can be higher. The positive parts of each frequency component after weighted fusion can enhance the details and contrast of the reflected image, so that the final image can still retain clear details under uneven illumination conditions.
[0096] The technical solution of this embodiment can enhance the detail parts (such as edges, textures, etc.) in the image by retaining the positive part in the frequency component and performing weighted fusion, so that the image can still maintain a high clarity under large illumination changes; the truncation operation eliminates possible noise or unnecessary low-frequency components by removing the negative part, highlighting the positive features in the image, enhancing the image details and contrast, especially the performance of edges and local textures; through multi-scale decomposition, truncation operation and weighted fusion, the finally obtained enhanced reflected image can effectively restore the details in the image, avoiding the influence of illumination condition changes on the image. Especially in low-illumination or strong-light environments, the performance of the image is more natural and clear, which helps to improve the accuracy of subsequent intelligent diagnosis of disasters in cable tunnels.
[0097] In another embodiment, the intelligent disaster diagnosis model includes a hybrid neural network model composed of a random configuration network and a convolutional neural network.
[0098] Among them, the random configuration network is a neural network structure, which is characterized by the random initialization of the network structure. The neurons and connections of the random configuration network are usually randomly initialized, rather than optimizing the parameters through a conventional training process. The random configuration network avoids the overfitting problem in the training of traditional deep neural networks by introducing randomness into the model.
[0099] Among them, the convolutional neural network can automatically extract features from images through convolutional layers, pooling layers, and fully connected layers. The convolutional layer scans the image through filters (convolution kernels) to extract local features (such as edges, textures, shapes, etc.), then reduces the spatial dimension of the image through the pooling layer, and finally further processes and classifies the features through the fully connected layer.
[0100] Among them, the hybrid neural network can be a model that combines different types of neural networks, integrating the advantages of multiple network architectures in a system. The hybrid neural network consists of a random configuration network and a convolutional neural network. The random configuration network performs rough feature extraction and data classification through fast random initialization. The convolutional neural network further improves the accuracy of diagnosis through more refined feature extraction and deep learning models. This hybrid neural network can optimize task processing at different levels, improving diagnostic efficiency and accuracy.
[0101] In specific implementation, in the initial stage of the disaster intelligent diagnosis model, the random configuration network is used to extract preliminary features from the input feature dataset. The structure of the random configuration network has the characteristics of random initialization, which can quickly generate multiple potential feature representations, obtain rough features of the image with fewer computing resources and time, and thus perform preliminary classification. After the random configuration network completes the preliminary feature extraction, these features are passed to the convolutional neural network for more detailed processing. The convolutional neural network extracts complex local features, shape information, edge features, and other details from the image through multiple convolutional and pooling operations. After the convolutional and pooling operations, the convolutional neural network extracts image features and passes them to the fully connected layer for the final classification or regression task, so as to predict whether there are disasters in the cable tunnel and the types of disasters.
[0102] The technical solution of this embodiment performs intelligent diagnosis of disasters in the cable tunnel through a hybrid neural network composed of a random configuration network and a convolutional neural network. By combining the fast feature extraction of the random configuration network with the deep learning feature extraction of the convolutional neural network, it can efficiently and accurately diagnose disaster problems such as cracks and corrosion in the cable tunnel. The hybrid neural network not only improves the accuracy of diagnosis but also shows strong robustness and adaptability in complex image scenarios.
[0103] For the convenience of understanding by those skilled in the art, Figure 3 An exemplary logic diagram of an intelligent diagnosis method for disasters in a cable tunnel based on the Retinex theory and wavelet transform is provided.
[0104] In a specific implementation, a dataset is constructed based on the original images in the cable tunnel. The original images are subjected to channel separation to obtain grayscale images corresponding to the RGB three channels respectively, and are respectively transformed from the real domain to the logarithmic domain. Based on the MSRCR (Multi-Scale Retinex with Color Restoration) algorithm, the illumination image is estimated. The structure and texture of the illumination image are decomposed, and the reflected image is calculated. The calculated reflected images are processed using HWT (Half-Wavelet Transform) to obtain enhanced reflected images. The enhanced reflected images in each color space are transformed from the logarithmic domain to the real domain and processed by a color restoration factor to reconstruct a feature dataset with obvious key features. The dataset is input into a hybrid neural network (SC-CNN hybrid) model, which is composed of a Stochastic Configuration Networks (SC) and a Convolutional Neural Networks (CNN). The hybrid neural network model is trained through a training set and a test set, and then the intelligent diagnosis result of the disasters in the cable tunnel can be output.
[0105] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0106] Based on the same inventive concept, an embodiment of the present application further provides a disaster intelligent diagnosis device for a cable tunnel based on the Retinex theory and wavelet transform for implementing the above-mentioned disaster intelligent diagnosis method for a cable tunnel based on the Retinex theory and wavelet transform. The implementation solutions provided by this device for solving problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the disaster intelligent diagnosis device for a cable tunnel based on the Retinex theory and wavelet transform provided below can refer to the limitations on the disaster intelligent diagnosis method for a cable tunnel based on the Retinex theory and wavelet transform in the above text, and will not be repeated here.
[0107] In an exemplary embodiment, as Figure 4 shown, there is provided a cable tunnel disaster intelligent diagnosis device based on the Retinex theory and wavelet transform, including:
[0108] An acquisition module 410, configured to acquire a grayscale image of the cable tunnel.
[0109] A correction module 420, configured to separate illumination components and reflection components of different scales from the grayscale image, and obtain an illumination image according to the illumination components and the reflection components; the illumination components are used to characterize the illumination conditions in the image, and the reflection components are used to characterize the inherent characteristics of the objects in the image.
[0110] A decomposition module 430, configured to decompose the structure and texture of the illumination image to obtain a reflection image.
[0111] An enhancement module 440, configured to perform semi-wavelet transform on the reflection image to obtain an enhanced reflection image;
[0112] A construction module 450, configured to construct a feature data set according to the enhanced reflection image;
[0113] A diagnosis module 460, configured to input the feature data set into a disaster intelligent diagnosis model to obtain the cable tunnel disaster intelligent diagnosis result.
[0114] In one embodiment, the acquisition module 410 is specifically configured to acquire the original image of the cable tunnel; perform channel separation on the original image to obtain grayscale images corresponding to the RGB three channels respectively; convert the grayscale images from the real number domain to the logarithmic domain to obtain the grayscale image of the cable tunnel.
[0115] In one embodiment, the construction module 450 is configured to convert the enhanced reflection image from the logarithmic domain to the real number domain, and perform color restoration through a color restoration factor to obtain the feature data set.
[0116] In one embodiment, the correction module 420 is configured to perform color restoration on the reflection component to obtain a restored reflection component; synthesize the illumination image according to the illumination component and the restored reflection component.
[0117] In one embodiment, the enhancement module 440 is configured to perform multi-scale decomposition on the reflection image through semi-wavelet transform to generate multiple different frequency components; perform a truncation operation on the frequency components to retain the positive value part of the frequency components; perform weighted fusion on the positive value parts of the respective frequency components to obtain the enhanced reflection image.
[0118] In one embodiment, the disaster intelligent diagnosis model includes a hybrid neural network model composed of a random configuration network and a convolutional neural network.
[0119] Each module in the above-mentioned disaster intelligent diagnosis device for cable tunnels based on the Retinex theory and wavelet transform can be implemented in whole or in part by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0120] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a disaster intelligent diagnosis method for cable tunnels based on the Retinex theory and wavelet transform. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0121] Those skilled in the art can understand that Figure 5 the structure shown in
[0122] In an exemplary embodiment, a computer device is provided, which includes a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0123] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0124] In an embodiment, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0125] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0126] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene memory, etc. Volatile memory can include Random Access Memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, Artificial Intelligence (AI) processors, etc., without limitation.
[0127] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0128] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. An intelligent diagnosis method for cable tunnel disasters based on Retinex theory and wavelet transform, characterized in that: The method comprises: Get a grayscale image of the cable tunnel; Separating illumination components and reflection components of different scales from the grayscale image, and obtaining an illumination image according to the illumination components and the reflection components; the illumination components are used to characterize the illumination conditions in the image, and the reflection components are used to characterize the inherent characteristics of the object in the image; Decomposing the structure and texture of the illumination image to obtain a reflection image; Performing a half wavelet transform on the reflected image to obtain an enhanced reflected image; constructing a feature data set according to the enhanced reflection image; The characteristic data set is input into the intelligent diagnosis model of disasters and diseases to obtain the intelligent diagnosis results of disasters and diseases of the cable tunnel.
2. The method according to claim 1, characterized in that The step of obtaining a grayscale image of a cable tunnel comprises: Acquiring an original image of the cable tunnel; Perform channel separation on the original image to obtain grayscale images corresponding to the three channels of RGB respectively; The grayscale image is converted from a real number domain to a logarithmic domain to obtain a grayscale image of the cable tunnel.
3. The method according to claim 2, characterized in that The step of constructing a feature data set according to the enhanced reflected image comprises: The enhanced reflection image is converted from the logarithmic domain to the real domain, and color restoration is performed using a color restoration factor to obtain the feature data set.
4. The method according to claim 1, characterized in that: The step of obtaining an illumination image according to the illumination component and the reflection component comprises: Performing color restoration on the reflection component to obtain a restored reflection component; The illumination image is synthesized according to the illumination component and the restored reflection component.
5. The method according to claim 1, characterized in that: The step of performing half wavelet transform on the reflected image to obtain an enhanced reflected image comprises: Performing multi-scale decomposition on the reflection image by half wavelet transform to generate multiple different frequency components; performing a truncation operation on the frequency component to retain a positive value portion of the frequency component; The positive parts of the frequency components are weighted and fused to obtain the enhanced reflected image.
6. The method according to claim 1, characterized in that The disaster disease intelligent diagnosis model includes a hybrid neural network model composed of a random configuration network and a convolutional neural network.
7. An intelligent diagnostic device for cable tunnel disasters based on Retinex theory and wavelet transform, characterized in that: The device comprises: An acquisition module, used for acquiring a grayscale image of the cable tunnel; A correction module, used to separate illumination components and reflection components of different scales from the grayscale image, and obtain an illuminated image according to the illumination components and the reflection components; the illumination components are used to characterize the illumination conditions in the image, and the reflection components are used to characterize the inherent characteristics of the object in the image; A decomposition module, used for decomposing the structure and texture of the illumination image to obtain a reflection image; An enhancement module, used for performing a half wavelet transform on the reflected image to obtain an enhanced reflected image; A construction module, used to construct a feature data set according to the enhanced reflection image; The diagnosis module is used to input the characteristic data set into the intelligent diagnosis model of disasters and diseases to obtain the intelligent diagnosis results of disasters and diseases of the cable tunnel.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.