Image rain and fog processing and alarming system based on SCADA (supervisory control and data acquisition)
By setting the acquisition area and synchronizing images in the SCADA system, and combining weather feature recognition and adaptive processing algorithms, the problems of image processing delay and lack of accuracy in alarms under complex weather conditions in the SCADA system are solved, and real-time and accurate equipment fault location and alarm are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 南京傲拓智能控制技术有限公司
- Filing Date
- 2026-01-05
- Publication Date
- 2026-04-14
AI Technical Summary
The image processing technology in existing SCADA systems has poor adaptability, cannot cope with complex weather mixed scenarios, has high processing latency, lacks accuracy in alarm information, and cannot directly provide a basis for locating equipment failures.
By setting a collection area, the system uses the monitoring cameras of the SCADA system to collect images and synchronize data. Combined with weather feature recognition and adaptive processing algorithms, it performs hybrid de-raining and de-fogging processing, establishes a correlation model between image anomalies and equipment failures, and realizes real-time alarms.
It improves the alarm accuracy and real-time performance of SCADA systems under complex weather conditions, achieves precise fault location, reduces operation and maintenance costs, and is suitable for various industrial scenarios.
Smart Images

Figure CN121861584A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of industrial automation control and computer vision technology, specifically to an image rain and fog processing and alarm system based on SCADA. Background Technology
[0002] As the core monitoring hub of industrial production, SCADA systems are widely used in various industrial sites. They collect images and data on the operating status of equipment through front-end cameras, sensors, and other devices, providing real-time monitoring data for maintenance personnel. With the development of industrial intelligence, image monitoring plays an increasingly crucial role in SCADA systems; clear on-site images are essential for equipment defect identification and abnormal status judgment.
[0003] However, single de-rain or de-fog algorithms have poor adaptability and cannot cope with complex mixed weather scenarios: existing image processing technologies are mostly designed for single weather (such as rain or fog) and do not take into account complex weather such as "mixed rain and fog" and "intermittent rainfall" in industrial scenarios. After processing by a single algorithm, the image still suffers from loss of detail and blurred edges, which cannot provide a clear visual basis for subsequent alarm judgment. Moreover, existing algorithms are not optimized for the real-time requirements of SCADA systems, and the processing latency is high, making it difficult to meet the real-time alarm needs of industrial monitoring.
[0004] The integration with SCADA systems is low. Existing image de-raining and de-fogging technologies are mostly independent modules that are not deeply integrated with the core functions of SCADA systems, such as real-time data acquisition, device status association, and configuration screen display. As a result, the clear images processed cannot directly support the alarm decisions of SCADA systems, resulting in data fragmentation.
[0005] There is a lack of correlation between image anomalies and equipment alarms, resulting in insufficient alarm targeting. Existing technologies have not established a correlation model between "image anomaly features and equipment fault types." Even if anomalies are identified in the processed image, it is impossible to accurately locate the corresponding equipment fault. As a result, the alarm information only indicates "image anomaly," which cannot provide maintenance personnel with a basis for fault location and increases the difficulty of troubleshooting. Summary of the Invention
[0006] The purpose of this invention is to provide an image rain and fog processing and alarm system based on SCADA, which solves the problems existing in the background technology.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The present invention provides an image rain and fog processing and alarm system based on SCADA, specifically including the following steps: S1. Set the acquisition area and use the monitoring camera of the SCADA system to acquire images and synchronize data in the set acquisition area; S2. Summarize the collected images and preprocess them using weather feature recognition to obtain preprocessed images; S3. Determine the corresponding weather type based on the preprocessed image, and adaptively select the processing algorithm based on the corresponding weather type. At the same time, perform intelligent hybrid de-raining and de-fogging processing according to the selected processing algorithm to obtain a clear image after de-raining and de-fogging. S4. Perform image anomaly identification on the clear image after de-raining and de-fogging using image anomaly identification method, and determine whether there are visual anomalies in the corresponding image; S5. Set up fault-related alarms based on visual anomaly judgment results; S6. Display and provide feedback on alarm information.
[0008] Preferably, the step of setting a collection area and capturing images and synchronizing data within the set collection area using the monitoring camera of the SCADA system includes the following steps: S11. Initialize the SCADA system and set the acquisition cycle of the surveillance cameras; Set the collection period set for surveillance cameras , Indicates the set number One collection cycle, Indicates the total number of set data collection cycles; S12. Based on the set acquisition period, acquire images within the set acquisition area and summarize the images of the acquisition area; S13. Set the data synchronization period, obtain the device information of the corresponding camera monitoring area from the SCADA server based on the set data synchronization period, and upload the obtained images of the collected area by associating them with timestamps.
[0009] Preferably, the process of summarizing and preprocessing the collected images using weather feature recognition to obtain preprocessed images includes the following steps: S21. Convert the acquired area image to grayscale to obtain a grayscale image, and then use Gaussian filtering to reduce noise in the grayscale image to obtain a noise-reduced image. The formula for the Gaussian function is shown below:
[0010] in, Represents variance. This represents the pixel value after grayscale conversion of the corresponding coordinates in the image. The x-axis is... The vertical axis is , It is the base of natural numbers; S22. Based on the denoised image, identification is performed using weather feature recognition methods; Based on connected component analysis, the shape, size, and trajectory of raindrops in the denoised image are extracted, and the visibility in the denoised image is calculated based on the dark channel value and atmospheric light value. The threshold is used to determine the proportion of raindrop pixels in the denoised image. When the corresponding sampling area is determined to be rainy, it is determined to be sunny; otherwise, it is determined to be clear. This applies to the image after visibility denoising. 500 meters, the corresponding collection area is determined to be foggy weather; when both conditions are met, it is determined to be mixed rain and fog weather. Output the weather type, which includes: sunny, rainy, foggy, and mixed rain and fog.
[0011] Preferably, the steps of determining the corresponding weather type based on the preprocessed image, adaptively selecting a processing algorithm based on the corresponding weather type, and simultaneously performing intelligent hybrid de-raining and de-fogging processing according to the selected processing algorithm to obtain a clear image after de-raining and de-fogging include the following steps: For rainy days: An "improved sparse coding rain removal algorithm" is adopted, which learns the sparse features of raindrops, constructs a dictionary to separate raindrop pixels, and preserves device details; For foggy weather: The "optimized dark channel prior algorithm" is adopted, and the atmospheric light value calculation weight is dynamically adjusted in combination with the ambient light sensor data of the SCADA system to improve the defogging effect; Rain and fog mixing: First, the "improved sparse coding deraining algorithm" is executed, then the "optimized dark channel prior algorithm" is executed on the derained image to obtain the defogging image, and finally the image edges and details are optimized by Laplacian pyramid; The image dehazing of multiple frames is decomposed by constructing a Laplacian pyramid. The source image is downsampled by alternating rows and columns, and then convolved with the obtained image using a Gaussian window function. The above operation is repeated to form a series of pyramid layers with gradually decreasing resolution and low-pass filtering. The above process is repeated to obtain a series of images. This step is the construction process of the Laplacian pyramid. After the Laplacian pyramid is constructed, the image edges and details are optimized using the constructed Laplacian pyramid. At the same time, parallel computing accelerated by GPU is used to control the processing time of a single frame image to within 40ms, resulting in a clear image after rain and fog removal.
[0012] Preferably, the step of identifying image anomalies in the clear image after de-raining and de-fogging, and determining whether the corresponding image has visual anomalies, includes the following steps: S41. Identify abnormal indicators in clear images after de-raining and de-fogging by using image anomaly recognition methods. Set a 3×3 detection window and divide the eight pixels in the neighborhood of the pixel to be detected in the clear image after de-raining and de-fogging into two parts; The location of the pixel to be detected is determined based on four neighboring pixels, and an appropriate threshold for anomaly detection is set. The formula for determining the outlier threshold parameter is as follows:
[0013] in, , , , The grayscale values of the four neighboring pixels; The threshold parameter for identifying outliers, This represents the threshold determination function; Based on the determined outlier threshold parameters When the pixel to be detected is equal to the threshold parameter of the outlier If the difference is greater than the maximum value among the gray values of the four neighboring pixels, it is determined whether the pixel to be detected is an outlier.
[0014] in, For pixel detection results, when A value of 1 indicates that the pixel to be detected is an anomaly. A value of 0 indicates that the pixel being detected is a normal pixel. This represents the function for detecting outlier pixels, and max represents the maximum value function.
[0015] The image is considered abnormal if at least 40% of the pixels in the current image are abnormal. S42. After identifying the abnormal indicators in the clear image after de-raining and de-fogging, determine whether there are visual abnormalities in the clear image after de-raining and de-fogging. The frame is defined as an abnormal frame if there is an abnormal pixel in the frame. Set a video frame rate threshold. If the analyzed video frame rate is less than the set video frame rate threshold, it indicates that the video is abnormal. A lightweight YOLOv8 model is used to perform target detection on the clear images after de-raining and de-fogging. Abnormal frames in the clear images after rain and fog removal are labeled, and the training set, validation set, and test set are divided into three sets in a 7:2:1 ratio. The labeled clear images after rain and fog removal are input into the YOLOv8 lightweight model and trained. After 100 iterations, the abnormal features in the clear images after rain and fog removal are output. By comparing the abnormal features in the clear image after de-raining and de-fogging with the features in the clear image after normal de-raining and de-fogging, it is determined whether there are visual abnormalities in multiple frames of clear images after de-raining and de-fogging.
[0016] Preferably, the step of setting a fault-related alarm based on the visual anomaly judgment result includes the following steps: Retrieve device information and historical fault records to establish a mapping between "abnormal characteristics" and "fault types": Set a visual anomaly threshold, and determine the device alarm level based on the visual anomaly threshold: Visual Anomaly Threshold Setting abnormal equipment operating parameters as a level 1 alarm, visual abnormality threshold. An abnormal equipment operating parameter indicates a Level 2 alarm; a confidence level of 60%-80% indicates a Level 3 alarm. Alarm information is synchronized to the SCADA system.
[0017] This invention also provides an image rain and fog processing and alarm system based on SCADA, including hardware: existing SCADA system surveillance cameras, edge computing gateway, SCADA server, and client monitoring terminal; Software modules: Image acquisition module, weather feature recognition module, hybrid rain and fog removal module, image anomaly recognition module, fault association alarm module, and data storage module; The image acquisition module acquires the video stream monitored by the SCADA system's surveillance camera in real time and extracts image data frame by frame. The weather feature recognition module is used to preprocess the extracted image data and determine the weather type; The hybrid rain and fog removal module is used to adaptively select processing algorithms for different weather types to obtain clear images after rain and fog removal. The image anomaly recognition module is used to perform image anomaly recognition on the clear image after de-raining and de-fogging through an image anomaly recognition method. The fault association alarm module is used to call the device information and historical fault records in the data storage module to establish a "abnormal feature-fault type" mapping; The data storage module is used to store image data, device information, and historical fault records.
[0018] The beneficial effects of this invention are as follows: (1) This invention sets up a collection area and uses the monitoring camera of the SCADA system to collect images and synchronize data in the set collection area. After synchronization, the collected images are summarized and preprocessed by weather feature recognition. After processing, the corresponding weather type is determined based on the preprocessed image, and the processing algorithm is adaptively selected based on the corresponding weather type. At the same time, the intelligent processing of rain and fog is carried out according to the selected processing algorithm. After processing, the clear image after rain and fog is identified by image anomaly recognition and the presence of visual anomalies in the corresponding image is determined. At the same time, the fault association alarm is set based on the visual anomaly judgment result and the alarm information is displayed and fed back, which improves the real-time performance of image rain and fog processing and alarm.
[0019] (2) This invention improves the alarm accuracy of SCADA systems in rainy and foggy weather: This invention adapts to complex industrial weather scenarios through hybrid rain and fog removal intelligent processing, taking into account both real-time processing and effectiveness: The hybrid rain and fog removal algorithm supports multiple weather types such as rainy days, foggy days, and mixed rain and fog, and the single-frame processing time is... With a processing time of 40ms, this method meets the real-time monitoring requirements of SCADA systems, solves the problems of poor adaptability and high processing latency of single algorithms, achieves accurate alarms and fault location, and improves operation and maintenance efficiency. By establishing an "image anomaly-equipment fault" correlation model, alarm information can directly indicate the fault type and location. Compared with existing technologies, it shortens the fault investigation time for operation and maintenance personnel, reduces operation and maintenance costs, and has strong compatibility and is easy to deploy. This method is based on the upgrade of existing SCADA system hardware, and the software module can be integrated into the existing SCADA system through the interface without reconstructing the system architecture. It has low deployment costs and is suitable for various industrial scenarios such as rail transit and wind farms. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the overall system flow of the present invention.
[0022] Figure 2 This is a schematic diagram of the hybrid rain and fog removal process of the present invention.
[0023] Figure 3 This is a schematic diagram of the image anomaly recognition process of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] In a specific embodiment of the present invention, Reference Figure 1 As shown, the present invention provides an image rain and fog processing and alarm system based on SCADA, comprising: S1. Set the acquisition area and use the monitoring camera of the SCADA system to acquire images and synchronize data in the set acquisition area; S2. Summarize the collected images and preprocess them using weather feature recognition to obtain preprocessed images; S3. Determine the corresponding weather type based on the preprocessed image, and adaptively select the processing algorithm based on the corresponding weather type. At the same time, perform intelligent hybrid de-raining and de-fogging processing according to the selected processing algorithm to obtain a clear image after de-raining and de-fogging. S4. Perform image anomaly identification on the clear image after de-raining and de-fogging using image anomaly identification method, and determine whether there are visual anomalies in the corresponding image; S5. Set up fault-related alarms based on visual anomaly judgment results; S6. Display and provide feedback on alarm information; Furthermore, referring to Figure 1 As shown, setting up a data acquisition area and using the monitoring camera of the SCADA system to acquire images and synchronize data within that area includes the following steps: S11. Initialize the SCADA system and set the acquisition cycle of the surveillance cameras; Set the collection period set for surveillance cameras , Indicates the set number One collection cycle, Indicates the total number of set data collection cycles; S12. Based on the set acquisition period, acquire images within the set acquisition area and summarize the images of the acquisition area; S13. Set the data synchronization period, obtain the device information of the corresponding camera monitoring area from the SCADA server based on the set data synchronization period, and upload the obtained images of the collected area by associating them with timestamps. Furthermore, referring to Figure 1As shown, the collected images are summarized and preprocessed using weather feature recognition to obtain the preprocessed images, which includes the following steps: S21. Convert the acquired area image to grayscale to obtain a grayscale image, and then use Gaussian filtering to reduce noise in the grayscale image to obtain a noise-reduced image. The formula for the Gaussian function is shown below:
[0026] in, Represents variance. This represents the pixel value after grayscale conversion of the corresponding coordinates in the image. The x-axis is... The vertical axis is , It is the base of natural numbers; S22. Based on the denoised image, identification is performed using weather feature recognition methods; Based on connected component analysis, the shape, size, and trajectory of raindrops in the denoised image are extracted, and the visibility in the denoised image is calculated based on the dark channel value and atmospheric light value. Furthermore, by using a threshold to determine the proportion of raindrop pixels in the denoised image. When the corresponding sampling area is determined to be rainy, it is determined to be sunny; otherwise, it is determined to be clear. This applies to the image after visibility denoising. 500 meters, the corresponding collection area is determined to be foggy weather; when both conditions are met, it is determined to be mixed rain and fog weather. Furthermore, the weather type is output, which includes: sunny, rainy, foggy, and mixed rain and fog. Furthermore, referring to Figure 1 As shown, the process involves determining the corresponding weather type based on the preprocessed image, adaptively selecting a processing algorithm based on the corresponding weather type, and then performing intelligent de-raining and de-fogging processing according to the selected algorithm to obtain a clear image after de-raining and de-fogging. The steps include: For rainy days: An "improved sparse coding rain removal algorithm" is adopted, which learns the sparse features of raindrops, constructs a dictionary to separate raindrop pixels, and preserves device details; For foggy weather: The "optimized dark channel prior algorithm" is adopted, and the atmospheric light value calculation weight is dynamically adjusted in combination with the ambient light sensor data of the SCADA system to improve the defogging effect; Rain and fog mixing: First, the "improved sparse coding deraining algorithm" is executed, then the "optimized dark channel prior algorithm" is executed on the derained image to obtain the defogging image, and finally the image edges and details are optimized by Laplacian pyramid; The image dehazing of multiple frames is decomposed by constructing a Laplacian pyramid. The source image is downsampled by alternating rows and columns, and then convolved with the obtained image using a Gaussian window function. The above operation is repeated to form a series of pyramid layers with gradually decreasing resolution and low-pass filtering. The above process is repeated to obtain a series of images. This step is the construction process of the Laplacian pyramid. After the Laplacian pyramid is constructed, the image edges and details are optimized by constructing the Laplacian pyramid. At the same time, parallel computing is accelerated by GPU to control the processing time of a single frame image to within 40ms, resulting in a clear image after rain and fog removal. Furthermore, referring to Figure 1 As shown, the process of identifying image anomalies in a clear image after de-raining and de-fogging, and determining whether the corresponding image contains visual anomalies, includes the following steps: S41. Identify abnormal indicators in clear images after de-raining and de-fogging by using image anomaly recognition methods. Set a 3×3 detection window and divide the eight pixels in the neighborhood of the pixel to be detected in the clear image after de-raining and de-fogging into two parts; The location of the pixel to be detected is determined based on four neighboring pixels, and an appropriate threshold for anomaly detection is set. The formula for determining the outlier threshold parameter is as follows:
[0027] in, , , , The grayscale values of the four neighboring pixels; The threshold parameter for identifying outliers, This represents the threshold determination function; Based on the determined outlier threshold parameters When the pixel to be detected is equal to the threshold parameter of the outlier If the difference is greater than the maximum value among the gray values of the four neighboring pixels, it is determined whether the pixel to be detected is an outlier.
[0028] in, For pixel detection results, when A value of 1 indicates that the pixel to be detected is an anomaly. A value of 0 indicates that the pixel being detected is a normal pixel. This represents the function for detecting outlier pixels, and max represents the maximum value function.
[0029] Furthermore, if at least 40% of the pixels in the current image are abnormal, it indicates that the image frame is abnormal; S42. After identifying the abnormal indicators in the clear image after de-raining and de-fogging, determine whether there are visual abnormalities in the clear image after de-raining and de-fogging. The frame is defined as an abnormal frame if there is an abnormal pixel in the frame. Furthermore, a video frame rate threshold is set. When the analyzed video frame rate is less than the set video frame rate threshold, it indicates that the video is abnormal. A lightweight YOLOv8 model is used to perform target detection on the clear images after de-raining and de-fogging. Abnormal frames in the clear images after rain and fog removal are labeled, and the training set, validation set, and test set are divided into three sets in a 7:2:1 ratio. The labeled clear images after rain and fog removal are input into the YOLOv8 lightweight model and trained. After 100 iterations, the abnormal features in the clear images after rain and fog removal are output. Furthermore, the abnormal features in the clear images after de-raining and de-fogging are compared with the features in the clear images after normal de-raining and de-fogging to determine whether there are visual abnormalities in the clear images after multiple frames of de-raining and de-fogging. Furthermore, referring to Figure 1 As shown, setting up fault-related alarms based on visual anomaly judgment results includes the following steps: Retrieve device information and historical fault records to establish a mapping between "abnormal characteristics" and "fault types": Set a visual anomaly threshold, and determine the device alarm level based on the visual anomaly threshold: Visual Anomaly Threshold Setting abnormal equipment operating parameters as a level 1 alarm, visual abnormality threshold. An abnormal equipment operating parameter indicates a Level 2 alarm; a confidence level of 60%-80% indicates a Level 3 alarm. Furthermore, the alarm information will be synchronized to the SCADA system; Furthermore, referring to Figure 1 As shown, displaying and providing feedback on alarm information includes the following steps: The alarm graphical interface monitoring module receives alarm information and uses different colors (red for level 1, yellow for level 2, and blue for level 3) and sound prompts according to the alarm level. Supports visual display of alarm information (including abnormal image comparison and fault location map) and historical query (multi-condition query by device, alarm level, and time range); After the maintenance personnel confirm the alarm, they will send the processing results to the data storage module for subsequent model optimization. In one specific embodiment, the SCADA-based image rain and fog processing and alarm system further includes: Hardware: Existing SCADA system surveillance cameras, edge computing gateway, SCADA server, and client monitoring terminals; Software modules: Image acquisition module, weather feature recognition module, hybrid rain and fog removal module, image anomaly recognition module, fault association alarm module, and data storage module; The image acquisition module acquires the video stream monitored by the SCADA system's surveillance camera in real time and extracts image data frame by frame. The weather feature recognition module is used to preprocess the extracted image data and determine the weather type; The hybrid rain and fog removal module is used to adaptively select processing algorithms for different weather types to obtain clear images after rain and fog removal. The image anomaly recognition module is used to perform image anomaly recognition on the clear image after de-raining and de-fogging through an image anomaly recognition method. The fault association alarm module is used to call the device information and historical fault records in the data storage module to establish a "abnormal feature-fault type" mapping; The data storage module is used to store image data, device information, and historical fault records.
[0030] It should be noted that, The above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, and all such modifications and additions should fall within the protection scope of the present invention.
Claims
1. A SCADA-based image rain and fog processing and alarm system, characterized in that, Includes the following steps: S1. Set the acquisition area and use the monitoring camera of the SCADA system to acquire images and synchronize data in the set acquisition area; S2. Summarize the collected images and preprocess them using weather feature recognition to obtain preprocessed images; S3. Determine the corresponding weather type based on the preprocessed image, and adaptively select the processing algorithm based on the corresponding weather type. At the same time, perform intelligent hybrid de-raining and de-fogging processing according to the selected processing algorithm to obtain a clear image after de-raining and de-fogging. S4. Perform image anomaly identification on the clear image after de-raining and de-fogging using image anomaly identification method, and determine whether there are visual anomalies in the corresponding image; S5. Set up fault-related alarms based on visual anomaly judgment results; S6. Display and provide feedback on alarm information.
2. The SCADA-based image rain and fog processing and alarm system according to claim 1, characterized in that, The process of setting up a data acquisition area and capturing images and synchronizing data within that area using the monitoring camera of the SCADA system includes the following steps: S11. Initialize the SCADA system and set the acquisition cycle of the surveillance cameras; Set the collection period set for surveillance cameras , Indicates the set number One collection cycle, Indicates the total number of set data collection cycles; S12. Based on the set acquisition period, acquire images within the set acquisition area and summarize the images of the acquisition area; S13. Set the data synchronization period, obtain the device information of the corresponding camera monitoring area from the SCADA server based on the set data synchronization period, and upload the obtained images of the collected area by associating them with timestamps.
3. The SCADA-based image rain and fog processing and alarm system according to claim 1, characterized in that, The process of collecting images and preprocessing them using weather feature recognition to obtain preprocessed images includes the following steps: S21. Convert the acquired area image to grayscale to obtain a grayscale image, and then use Gaussian filtering to reduce noise in the grayscale image to obtain a noise-reduced image. The formula for the Gaussian function is shown below: ; in, Represents variance. This represents the pixel value after grayscale conversion of the corresponding coordinates in the image. The x-axis is... The vertical axis is , It is the base of natural numbers; S22. Based on the denoised image, identification is performed using weather feature recognition methods; Based on connected component analysis, the shape, size, and trajectory of raindrops in the denoised image are extracted, and the visibility in the denoised image is calculated based on the dark channel value and atmospheric light value. The threshold is used to determine the proportion of raindrop pixels in the denoised image. When the corresponding sampling area is determined to be rainy, it is determined to be sunny; otherwise, it is determined to be clear. This applies to the image after visibility denoising. 500 meters, the corresponding collection area is determined to be foggy weather; when both conditions are met, it is determined to be mixed rain and fog weather. Output the weather type, which includes: sunny, rainy, foggy, and mixed rain and fog.
4. The SCADA-based image rain and fog processing and alarm system according to claim 1, characterized in that, The process of determining the corresponding weather type based on the preprocessed image, adaptively selecting a processing algorithm based on the corresponding weather type, and performing intelligent hybrid de-raining and de-fogging processing according to the selected processing algorithm to obtain a clear image after de-raining and de-fogging includes the following steps: For rainy days: An "improved sparse coding rain removal algorithm" is adopted, which learns the sparse features of raindrops, constructs a dictionary to separate raindrop pixels, and preserves device details; For foggy weather: The "optimized dark channel prior algorithm" is adopted, which dynamically adjusts the atmospheric light value calculation weights in combination with the ambient light sensor data of the SCADA system to improve the defogging effect; Rain and fog mixing: First, the "improved sparse coding deraining algorithm" is executed, then the "optimized dark channel prior algorithm" is executed on the derained image to obtain the dehazed image, and finally the image edges and details are optimized by Laplacian pyramid; The image dehazing of multiple frames is decomposed by constructing a Laplacian pyramid. The source image is downsampled by alternating rows and columns, and then convolved with the obtained image using a Gaussian window function. The above operation is repeated to form a series of pyramid layers with gradually decreasing resolution and low-pass filtering. The above process is repeated to obtain a series of images. This step is the construction process of the Laplacian pyramid. After the Laplacian pyramid is constructed, the image edges and details are optimized using the constructed Laplacian pyramid. At the same time, parallel computing is accelerated by GPU to control the processing time of a single frame image to within 40ms, resulting in a clear image after rain and fog removal.
5. The SCADA-based image rain and fog processing and alarm system according to claim 1, characterized in that, The process of identifying image anomalies in the clear image after de-raining and de-fogging, and determining whether the corresponding image contains visual anomalies, includes the following steps: S41. Identify abnormal indicators in clear images after de-raining and de-fogging by using image anomaly recognition methods. Set a 3×3 detection window and divide the eight pixels in the neighborhood of the pixel to be detected in the clear image after de-raining and de-fogging into two parts; The location of the pixel to be detected is determined based on four neighboring pixels, and an appropriate threshold for anomaly detection is set. The formula for determining the outlier threshold parameter is as follows: ; in, , , , The grayscale values of the four neighboring pixels; The threshold parameter for identifying outliers, This represents the threshold determination function; Based on the determined outlier threshold parameters When the pixel to be detected is equal to the threshold parameter of the outlier If the difference is greater than the maximum value among the gray values of the four neighboring pixels, it is determined whether the pixel to be detected is an outlier. ; in, For pixel detection results, when A value of 1 indicates that the pixel to be detected is an anomaly. A value of 0 indicates that the pixel being detected is a normal pixel. The function represents the result of outlier pixel detection, and max represents the maximum value function. The image is considered abnormal if at least 40% of the pixels in the current image are abnormal. S42. After identifying the abnormal indicators in the clear image after de-raining and de-fogging, determine whether there are visual abnormalities in the clear image after de-raining and de-fogging. The frame is defined as an abnormal frame if there is an abnormal pixel in the frame. Set a video frame rate threshold. If the analyzed video frame rate is less than the set video frame rate threshold, it indicates that the video is abnormal. A lightweight YOLOv8 model is used to perform target detection on the clear images after de-raining and de-fogging. Abnormal frames in the clear images after rain and fog removal are labeled, and the training set, validation set, and test set are divided into three sets in a 7:2:1 ratio. The labeled clear images after rain and fog removal are input into the YOLOv8 lightweight model and trained. After 100 iterations, the abnormal features in the clear images after rain and fog removal are output. By comparing the abnormal features in the clear image after de-raining and de-fogging with the features in the clear image after normal de-raining and de-fogging, it is determined whether there are visual abnormalities in multiple frames of clear images after de-raining and de-fogging.
6. The SCADA-based image rain and fog processing and alarm system according to claim 1, characterized in that, The process of setting up fault-related alarms based on visual anomaly detection results includes the following steps: Retrieve device information and historical fault records to establish a mapping between "abnormal characteristics" and "fault types": Set a visual anomaly threshold, and determine the device alarm level based on the visual anomaly threshold: Visual Anomaly Threshold Setting abnormal equipment operating parameters as a level 1 alarm, visual abnormality threshold. An abnormal equipment operating parameter indicates a Level 2 alarm; a confidence level of 60%-80% indicates a Level 3 alarm. Alarm information is synchronized to the SCADA system.
7. A SCADA-based image rain and fog processing and alarm system as described in claim 1, characterized in that, include: Hardware: Existing SCADA system surveillance cameras, edge computing gateway, SCADA server, and client monitoring terminals; Software modules: Image acquisition module, weather feature recognition module, hybrid rain and fog removal module, image anomaly recognition module, fault association alarm module, and data storage module; The image acquisition module acquires the video stream monitored by the SCADA system's surveillance camera in real time and extracts image data frame by frame. The weather feature recognition module is used to preprocess the extracted image data and determine the weather type; The hybrid rain and fog removal module is used to adaptively select processing algorithms for different weather types to obtain clear images after rain and fog removal. The image anomaly recognition module is used to perform image anomaly recognition on the clear image after de-raining and de-fogging through an image anomaly recognition method. The fault association alarm module is used to call the device information and historical fault records in the data storage module to establish a "abnormal feature-fault type" mapping; The data storage module is used to store image data, device information, and historical fault records.