Arc detection methods, devices, computer equipment, storage media and software products
By adjusting exposure parameters and detecting pixel values of adjacent pixels, the problem of traditional ultraviolet light source tubes being unable to accurately locate the electric arc position was solved, achieving accurate positioning and accuracy of electric arc detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HIVT TECH
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional ultraviolet light source tubes cannot accurately locate the position of the electric arc, resulting in inaccurate positioning during electric arc detection.
Ultraviolet imaging images are obtained by adjusting exposure parameters, target exposure parameters are determined by brightness differences, and the location of the electric arc is detected by combining the pixel values of adjacent pixels.
It enables accurate location of the electric arc, reduces the impact of environmental interference, and improves the accuracy of electric arc detection.
Smart Images

Figure CN122134809A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an arc detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] With the continuous development of photoelectric detection technology, the application of various electrical equipment and components is becoming increasingly widespread. However, some equipment or components may generate electric arcs under conditions such as live disconnection or overvoltage.
[0003] Traditional technology relies on ultraviolet (UV) light source tubes and their internal UV sensors for UV detection. When UV light emitted from sources such as electric arcs passes through the tube casing and illuminates the cathode of the UV sensor, if the photon energy exceeds the electron work function of the cathode material, an avalanche effect or glow discharge instantaneously occurs, amplifying the initial weak photocurrent by tens of thousands of times and generating a pulse signal, thereby detecting the electric arc. However, UV light source tubes are primarily used to determine the presence of an electric arc; they cannot pinpoint the specific location of the arc, nor can they locate it when an alarm is triggered. Summary of the Invention
[0004] Therefore, it is necessary to provide an arc detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can accurately determine the location of the arc, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides an arc detection method, the method comprising:
[0006] The first image obtained from ultraviolet imaging is acquired based on the original exposure parameters;
[0007] Determine the brightness difference between the brightness of the first image and the reference brightness, and determine the target exposure parameters corresponding to the original exposure parameters based on the brightness difference;
[0008] A second image obtained from ultraviolet imaging is acquired based on the target exposure parameters;
[0009] The electric arc in the second image is detected based on the pixel values of the target pixel and its neighboring pixels.
[0010] In one embodiment, the original exposure parameters include original gain and original exposure time, and the target exposure parameters include target gain and target exposure time;
[0011] Determining the target exposure parameters corresponding to the original exposure parameters based on the brightness difference includes:
[0012] When the brightness difference is within the first brightness aberration range, the original gain is reduced according to the brightness difference to obtain a first gain; the first exposure time corresponding to the original exposure time is determined according to the gain range in which the first gain is located; the target gain is determined according to the first gain, and the target exposure time is determined according to the first exposure time.
[0013] When the brightness difference is within the second brightness aberration range, the original exposure time is increased according to the brightness difference to obtain the second exposure time; the second gain corresponding to the original gain is determined according to the exposure time range in which the second exposure time is located; the target gain is determined according to the second gain, and the target exposure time is determined according to the second exposure time.
[0014] The brightness differences in the first brightness abnormality interval are all greater than the brightness differences in the second brightness abnormality interval.
[0015] In one embodiment, determining the first exposure time corresponding to the original exposure time based on the gain interval in which the first gain is located includes:
[0016] When the first gain is greater than or equal to the minimum gain threshold, the first exposure time is obtained based on the original exposure time;
[0017] When the first gain is less than the minimum gain threshold, the original exposure time is increased according to the ratio between the minimum gain threshold and the first gain to obtain the first exposure time.
[0018] The step of determining the second gain corresponding to the original gain based on the exposure time interval in which the second exposure time falls includes:
[0019] When the second exposure time is less than or equal to the maximum exposure time threshold, the second gain is obtained based on the original gain;
[0020] When the second exposure time is greater than the maximum exposure time threshold, the original gain is increased according to the ratio between the second exposure time and the maximum exposure time threshold to obtain the second gain.
[0021] In one embodiment, detecting the electric arc in the second image based on the pixel values of the target pixel and its neighboring pixels includes:
[0022] The base threshold is adjusted based on the ratio of target gain to minimum gain threshold and the ratio of target exposure time to maximum exposure time threshold to obtain the pixel value threshold.
[0023] If, among the neighboring pixels of the target pixel, the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold, then the pixel representing the electric arc is determined based on the target pixel.
[0024] In one embodiment, detecting the electric arc in the second image based on the pixel values of the target pixel and its neighboring pixels includes:
[0025] If, among the neighboring pixels of the target pixel, the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold, then the pixel value of the target pixel is combined with the pixel values of the neighboring pixels of the target pixel to obtain the target neighborhood value.
[0026] The pixel intensity value is obtained by calculating the pixel difference between the pixel value of the target pixel and the value of the target neighborhood.
[0027] If the pixel intensity value is greater than the pixel difference threshold, then the target pixel is determined to be a pixel representing an electric arc.
[0028] In one embodiment, the second image includes a region to be detected and a plurality of adjacent regions of the region to be detected;
[0029] The step of detecting the electric arc in the second image based on the pixel values of the target pixel and its neighboring pixels includes:
[0030] In the neighboring pixels of the target pixel in the area to be detected, determine whether the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold.
[0031] If so, then the number of adjacent regions containing pixels representing electric arcs is counted to obtain the number of regions;
[0032] If the number of regions is greater than the region number threshold, then the region to be detected is determined to contain an electric arc.
[0033] Secondly, this application also provides an arc detection device, comprising:
[0034] The acquisition module is used to acquire the first image obtained from ultraviolet imaging based on the original exposure parameters;
[0035] The determining module is used to determine the brightness difference between the brightness of the first image and the reference brightness, and to determine the target exposure parameters corresponding to the original exposure parameters based on the brightness difference;
[0036] The acquisition module is used to acquire a second image obtained by ultraviolet imaging based on the target exposure parameters;
[0037] The detection module is used to detect the electric arc in the second image based on the pixel values of the target pixel and the adjacent pixels of each target pixel.
[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the arc detection steps in any of the above embodiments.
[0039] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the arc detection steps in any of the above embodiments.
[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the arc detection steps in any of the above embodiments.
[0041] The aforementioned arc detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire a first image obtained through ultraviolet imaging based on original exposure parameters; determine the brightness difference between the brightness of the first image and a reference brightness, and determine the target exposure parameters corresponding to the original exposure parameters based on the brightness difference; acquire a second image obtained through ultraviolet imaging based on the target exposure parameters; and detect the arc in the second image based on the pixel values of the target pixels and their adjacent pixels. Thus, by employing ultraviolet imaging, an image-level arc detection method is formed, solving the problem of environmental interference such as welding and manual operations outside the visible light field of view. In this case, the first image is acquired using the original exposure parameters, and then the brightness difference between the first image and the reference brightness is determined, and the target exposure parameters are determined using the brightness difference. This makes the brightness of the second image relatively close to the reference brightness, thus considering the difference between the background and the arc during the acquisition of the second image, which helps to accurately determine the signal value. Moreover, using the pixel values of adjacent pixels can form pixel-level local signal detection, making it easier to accurately determine whether an arc exists at the target pixel, and the position of the arc in the second image can be accurately determined by the position of the target pixel. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a diagram illustrating the application environment of an arc detection method in one embodiment;
[0044] Figure 2 This is a flowchart illustrating an arc detection method in one embodiment;
[0045] Figure 3 This is a schematic diagram of the target exposure parameter acquisition process in a first processing method of one embodiment;
[0046] Figure 4 This is a flowchart illustrating the target exposure parameter acquisition method of the second processing method in one embodiment;
[0047] Figure 5 This is a schematic diagram of the region segmentation result in one embodiment;
[0048] Figure 6 This is a schematic diagram showing the result of the arc position in one embodiment;
[0049] Figure 7 This is a structural block diagram of an arc detection device in one embodiment;
[0050] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various types of data, but these data are not limited by these terms. These terms are only used to distinguish between the first type of data and the second type of data. The term "comprising" and any variations thereof, as used in this application, are intended to cover non-exclusive inclusion. The term "multiple" as used in this application refers to two or more. The term "and / or" as used in this application refers to one of the schemes, or any combination of multiple schemes.
[0053] When ultraviolet light emitted from sources such as electric arcs shines through the tube shell onto the cathode of an ultraviolet sensor, if the photon energy exceeds the electron work function of the cathode material, the cathode will emit photoelectrons. These photoelectrons are accelerated towards the anode under the influence of a high-voltage electric field (typically several hundred volts) between the cathode and anode. During acceleration, the photoelectrons collide with gas molecules inside the tube, ionizing them and generating new electrons and positive ions. The newly accelerated electrons continue to collide with and ionize other gas molecules, instantaneously creating an avalanche effect or glow discharge, amplifying the initial weak photocurrent by tens of thousands of times, generating a pulse signal, and thus detecting the electric arc. However, this method is better for qualitative analysis than for determining the specific location of the electric arc.
[0054] The arc detection method provided in this application can be understood to be applicable to a terminal or a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. For example, it can be applied to systems such as... Figure 1 The application environment shown.
[0055] Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart in-vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, head-mounted displays, etc. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0056] In one exemplary embodiment, such as Figure 2 As shown, an arc detection method is provided. Taking the application of this method to a terminal as an example, the method includes the following steps 202 to 208. Wherein:
[0057] Step 202: Obtain the first image obtained from ultraviolet imaging based on the original exposure parameters.
[0058] The raw exposure parameters are the sensor parameters used during image acquisition. The raw exposure parameters are related to the brightness of the first image. Optionally, the raw exposure parameters include raw gain, raw exposure time, aperture size, frame rate, etc. The raw gain is used to amplify the optical conversion results of the sensor, and the raw exposure time represents the duration for which light continuously enters the sensor.
[0059] The first image is the ultraviolet image acquired before the second image. The first image is at least one image used to adjust the original exposure parameters. When multiple images are involved in the arc detection process, the first and second images are corresponding images among these multiple images. For example, the multiple images are images A, B, and C acquired sequentially; image A is the first image of image B, and image B is the second image of image A; image B can be used alone as the first image of image C, and image C as the second image of image B; alternatively, both images A and B can be used as the first images of image C, and image C is the common second image of images A and B. In this case, the brightness and original exposure parameters of images A and B can be averaged separately, and the target exposure parameters can be obtained through the averaged brightness and averaged original exposure parameters.
[0060] In some embodiments, the visible light spectrum is filtered out by a filter to obtain the light corresponding to the ultraviolet spectrum; when imaging the light corresponding to the ultraviolet spectrum, the photosensitivity of the sensor is adjusted by an automatic exposure algorithm (ae) until the sensor achieves a sun-blind effect, and then the first image is obtained.
[0061] Since ultraviolet (UV) transmission tubes are not image-based acquisition methods and have a large field of view, when users use both visible light and UV transmission tubes, UV trigger alarms may occur outside the visible light field of view, but these cannot be seen within the visible light field of view. In contrast, the field of view of UV imaging is relatively concentrated, and objects outside the field of view or at a greater distance are not imaged. This can filter out UV interference caused by environmental factors such as welding and manual operations outside the field of view.
[0062] Step 204: Determine the brightness difference between the brightness of the first image and the reference brightness, and determine the target exposure parameters corresponding to the original exposure parameters based on the brightness difference.
[0063] The brightness of the first image refers to the overall brightness of the first image. The brightness of the first image includes, but is not limited to, the mean or mode of the pixel values of all pixels in the first image. The brightness of the first image can be the average brightness of the arc and the background. The brightness of the first image is a value with an absolute reference standard. If the first image is a grayscale image, its brightness is negatively correlated with the magnitude of its grayscale values.
[0064] Reference brightness is the image brightness adapted for arc detection. It represents the user's desired brightness, which can be the desired brightness of the background or a reference value for the overall image brightness. Target exposure parameters are the result of conditions satisfied by the brightness difference. When acquiring a second image using target exposure parameters, the brightness difference between the second image and the reference brightness is moderate, preventing the arc detection results from being affected by the second image being too dark or too bright.
[0065] In some embodiments, when the brightness difference is too large or too small, the electric arc cannot be detected by the first image. When some parameters in the original exposure parameters are too high, the background noise may be too large. In these two cases, at least some parameters in the original exposure parameters can be adjusted by adjusting the brightness difference to obtain the corresponding target exposure parameters.
[0066] In some embodiments, the first image is binarized to obtain a binarized image; the pixel values of each pixel in the binarized image are averaged, and the averaged result is used as the brightness of the first image.
[0067] In some embodiments, if the ratio of the brightness of the first image to the reference brightness is within a first brightness anomaly range or a second brightness anomaly range, then the target exposure parameter corresponding to the original exposure parameter is determined according to the processing method corresponding to the first brightness anomaly range or the second brightness anomaly range; if the ratio of the brightness of the first image to the reference brightness is within a baseline brightness difference range, then the original exposure parameter is the target exposure parameter; wherein, the brightness difference values in the first brightness anomaly range are all greater than the brightness difference values in the baseline brightness difference range, and the brightness difference values in the baseline brightness difference range are all greater than the brightness difference values in the second brightness anomaly range. Therefore, when the brightness difference value is too large or too small, an adjustment method can be flexibly selected to obtain the target exposure parameter; while when the brightness difference value is moderate, there is no need to adjust the original exposure parameter.
[0068] Step 206: Obtain the second image obtained from ultraviolet imaging based on the target exposure parameters.
[0069] The second image is an ultraviolet image acquired after the first image. Because the brightness difference corresponding to the first image generates the target exposure parameters, the brightness of the second image is relatively close to the reference brightness. Therefore, a more accurate arc detection result can be obtained from the second image.
[0070] In some embodiments, the second image includes multiple regions, including a region to be detected with an undetermined arc and adjacent regions of the region to be detected; the arc in the region to be detected can be determined based on the arcs detected in the adjacent regions.
[0071] In some embodiments, after acquiring light using target exposure parameters, the light corresponding to the visible light spectrum is filtered out by a filter to obtain the light corresponding to the ultraviolet spectrum; when imaging the light corresponding to the ultraviolet spectrum, the photosensitivity of the sensor is adjusted by an automatic exposure algorithm (ae) until the sensor achieves a sun-blind effect, and a second image is obtained.
[0072] Step 208: Detect the electric arc in the second image based on the pixel values of the target pixels and their adjacent pixels.
[0073] The target pixel is a pixel located in the second image. The location of the target pixel can determine the range and corresponding requirements for arc detection. The second image may have multiple regions, and each region may have its own target pixel. Based on each target pixel and its neighboring pixels, it can be determined whether each target pixel represents an arc.
[0074] The distance between adjacent pixels and the target pixel is less than or equal to a distance threshold. Using the pixel values of adjacent pixels, pixel-level local signal detection can be formed, making it easier to accurately determine whether an electric arc exists at the target pixel.
[0075] In some embodiments, taking the target pixel in the region to be detected as the center, it is determined whether the number of adjacent pixels of the target pixel exceeds a pixel value threshold; the pixel value threshold is used to indicate the presence of an electric arc; among the adjacent pixels, the number of pixels whose pixel values exceed the pixel value threshold is determined; when this number of pixels is greater than the pixel number threshold, the pixels in the region to be detected are modified to pixels with an electric arc.
[0076] In the above-mentioned arc detection method, ultraviolet imaging is used to form an image-level arc detection method, which solves the problem of environmental interference such as welding and manual operation outside the visible light field. In this case, the first image is first acquired using the original exposure parameters, and then the brightness difference between the brightness value of the first image and the reference brightness is determined. The target exposure parameters are then determined using the brightness difference, so that the brightness of the second image is relatively close to the reference brightness. Thus, the difference between the background and the arc is considered during the acquisition of the second image, which helps to determine the signal value more accurately. Moreover, by using the pixel values of adjacent pixels, local signal detection at the pixel level can be formed, so as to accurately determine whether there is an arc at the target pixel. Furthermore, the position of the arc in the second image can be accurately determined by the position of the target pixel.
[0077] In some embodiments, the original exposure parameters include original gain and original exposure time, and the target exposure parameters include target gain and target exposure time; the original gain is the exposure gain when acquiring the first image, and the original exposure time is the exposure time when acquiring the first image; the target gain is the exposure gain when acquiring the second image, and the target exposure time is the exposure time when acquiring the second image. Exposure gain refers to the factor by which the sensor amplifies the electrical signal obtained by converting the light signal, such as a factor of ISO; the target exposure time is the duration for which the sensor receives light and accumulates charge.
[0078] The target exposure parameters corresponding to the original exposure parameters are determined based on the brightness difference, including steps 302-306 and steps 402-406.
[0079] like Figure 3As shown, when the brightness difference is within the first brightness difference range, the target gain and target exposure time are obtained using the first processing method, where:
[0080] Step 302: When the brightness difference is within the first brightness abnormality range, the original gain is reduced according to the brightness difference to obtain the first gain.
[0081] The first brightness abnormality range is the range where the brightness difference is too large. In this case, the brightness difference between the first image and the reference brightness is too large, which may introduce significant noise into the original gain. Therefore, the original gain is first reduced based on the brightness difference to accurately detect the arc in the second image. Optionally, when the brightness difference is greater than a preset multiple, the brightness difference is determined to be within the first brightness difference range. For example, when the brightness difference is greater than 1.8 times, 2 times, or 2.1 times, the brightness difference is within the first brightness abnormality range.
[0082] The first gain is the exposure gain obtained by adjusting the original gain based on the brightness difference. The gain effect of the first gain is weaker than that of the original gain. When using brightness difference to lower the original gain, the adjustment process of the original gain precedes the adjustment process of the original exposure time, which helps to reduce the corresponding noise.
[0083] In some embodiments, when the ratio between the brightness of the first image and the reference brightness is the brightness difference, the reciprocal of the ratio is multiplied by the original gain to obtain the first gain; when the difference between the brightness of the first image and the reference brightness is the brightness difference, a gain adjustment step corresponding to the difference is determined according to the mapping relationship used to reduce the original gain, and the original gain is reduced using the gain adjustment step to obtain the first gain.
[0084] Step 304: Determine the first exposure time corresponding to the original exposure time based on the gain range in which the first gain is located.
[0085] The gain range is the range of exposure gain, indicating how the original exposure time is processed. Since the first gain is obtained by lowering it, there may be cases where the first gain is too small. Therefore, the gain range is divided according to the minimum gain threshold to avoid the second image being too dark.
[0086] The first exposure time is the exposure time when the brightness difference is too large. Since the gain may introduce significant noise when the brightness difference is too large, and the original exposure time may not need to be adjusted, determining the first exposure time based on the gain range can ensure that the brightness of the second image is moderate, thereby ensuring the accuracy of arc detection.
[0087] In some embodiments, when the first gain is in a first gain range, the original exposure time is converted based on the processing method indicated by the first gain range to obtain the first exposure time; when the first gain is in a second gain range, the original exposure time is the first exposure time.
[0088] Step 306: Determine the target gain based on the first gain, and determine the target exposure time based on the first exposure time.
[0089] In some embodiments, when the first gain is less than or equal to the minimum gain threshold, the minimum gain threshold is the target gain; when the first gain is greater than the minimum gain threshold, the first gain is the target gain.
[0090] In some embodiments, when the first exposure time is less than or equal to the minimum exposure time threshold, the minimum exposure time threshold is the target exposure time; when the first exposure time is greater than the minimum exposure time threshold, the first exposure time is the target exposure time.
[0091] like Figure 4 As shown, steps 402-406 represent the processing steps when the brightness difference is within the second brightness difference range. At this time, the second processing method is used to obtain the target gain and the target exposure time, wherein;
[0092] Step 402: When the brightness difference is within the second brightness abnormality range, increase the original exposure time according to the brightness difference to obtain the second exposure time.
[0093] The second brightness abnormality range is the range where the brightness difference is too small. In this range, the brightness difference between the second image and the reference brightness is too small, resulting in insufficient exposure time. Therefore, the original exposure time is first increased based on the brightness difference to improve the brightness of the second image while minimizing noise, thus facilitating accurate detection of the arc in the second image. Optionally, when the brightness difference is less than a preset value, the brightness difference is determined to be within the second brightness difference range. For example, when the brightness difference is less than 0.45, 0.5, or 0.51, the brightness difference is considered to be within the second brightness abnormality range.
[0094] In some embodiments, the interval between the maximum and minimum reference brightness is the reference brightness interval, the interval where the brightness difference is greater than the maximum reference brightness is the first brightness abnormality interval, and the interval where the brightness difference is less than the minimum reference brightness is the second brightness abnormality interval; the multiple between the maximum and minimum reference brightness is a preset value. For example, when the maximum reference brightness is 4 times the minimum reference brightness, if the maximum reference brightness is 2, the maximum reference brightness is 0.5; if the maximum reference brightness is 2.4, the maximum reference brightness is 0.6.
[0095] The second exposure time is the exposure time obtained by adjusting the original exposure time based on the brightness difference. The exposure effect brought by the second exposure time is greater than that of the original exposure time. When increasing the original exposure time using the brightness difference adjustment, the priority increase of the original exposure time helps to obtain a second image with a more prominent electric arc.
[0096] In some embodiments, when the ratio between the brightness of the second image and the reference brightness is the brightness difference, the ratio is multiplied by the original exposure time to obtain the second exposure time; when the difference between the brightness of the second image and the reference brightness is the brightness difference, the exposure time adjustment step corresponding to the difference is determined according to the mapping relationship used to reduce the original exposure time, and the original exposure time is reduced using the exposure time adjustment step to obtain the second exposure time.
[0097] Step 404: Determine the second gain corresponding to the original gain based on the exposure time interval in which the second exposure time is located.
[0098] The exposure time interval is the range of exposure time, and it indicates how the original gain is processed. Since the second exposure time is increased, there may be cases where the second exposure time is too long. Therefore, the exposure time interval is divided according to the maximum exposure time threshold to avoid the second image being too bright.
[0099] The second gain is the exposure gain when the brightness difference is too small. Since the characteristics of the arc are not significant when the brightness difference is too small, and the original gain may not need to be adjusted, determining the second gain based on the exposure time range can ensure that the brightness of the second image is moderate, thereby ensuring the accuracy of arc detection.
[0100] In some embodiments, when the second exposure time is within the second exposure time interval, the original gain is converted based on the processing method indicated by the second exposure time interval to obtain the second gain; when the second exposure time is within the second exposure time interval, the original gain is the second gain.
[0101] Step 406: Determine the target gain based on the second gain and the target exposure time based on the second exposure time; wherein the brightness difference in the first brightness abnormality interval is greater than the brightness difference in the second brightness abnormality interval.
[0102] In some embodiments, when the second gain is less than or equal to the minimum gain threshold, the minimum gain threshold is the target gain; when the second gain is greater than the minimum gain threshold, the second gain is the target gain.
[0103] In some embodiments, when the second exposure time is less than or equal to the minimum exposure time threshold, the minimum exposure time threshold is the target exposure time; when the second exposure time is greater than the minimum exposure time threshold, the second exposure time is the target exposure time.
[0104] In this embodiment, when the brightness difference is too large, the original gain is lowered to a first gain based on the brightness difference, so that the brightness of the second image is lower than that of the first image, and the noise in the second image is weaker. Using the gain range of the first gain allows for a more precise determination of whether the exposure time needs adjustment, enabling more detailed control of the brightness of the second image and facilitating more accurate detection of electric arcs in the second image. When the brightness difference is too small, the original exposure time is increased to a second exposure time based on the brightness difference, so that the brightness of the second image is higher than that of the first image, while maintaining moderate noise. Using the exposure time range of the second exposure time allows for a more precise determination of whether the gain needs adjustment, enabling more precise control of the brightness and noise of the second image and facilitating more accurate detection of electric arcs in the second image.
[0105] In some embodiments, determining the first exposure time corresponding to the original exposure time based on the gain range in which the first gain is located includes: obtaining the first exposure time based on the original exposure time when the first gain is greater than or equal to the minimum gain threshold; and increasing the original exposure time based on the ratio between the minimum gain threshold and the first gain when the first gain is less than the minimum gain threshold to obtain the first exposure time.
[0106] Correspondingly, the second gain corresponding to the original gain is determined based on the exposure time interval in which the second exposure time is located, including: when the second exposure time is less than or equal to the maximum exposure time threshold, the second gain is obtained based on the original gain; when the second exposure time is greater than the maximum exposure time threshold, the original gain is increased based on the ratio between the second exposure time and the maximum exposure time threshold to obtain the second gain.
[0107] The minimum gain threshold is the minimum exposure gain when acquiring an image. When the first gain is greater than or equal to the minimum exposure gain, the first gain can be used as the target gain for the second image acquisition without over-adjustment. Moreover, using the first gain alone is sufficient to ensure that the arc in the second image has significant characteristics. Therefore, there is no need to use the minimum gain threshold to adjust the original exposure time. At this time, the original exposure time can continue to be used as the target exposure time, or other methods can be used to adjust the original exposure time.
[0108] Since the first gain is obtained by reducing the original gain using the brightness difference, it may be over-adjusted, causing the first gain to be less than the minimum gain threshold. In this case, the minimum gain threshold can be used as the target gain for the second image acquisition. At the same time, by using the ratio between the minimum gain threshold and the first gain, the degree to which the minimum gain threshold cannot be adjusted is quantified. This allows the process of adjusting the exposure time to replace part of the exposure gain adjustment process. Under moderate noise conditions, by increasing the brightness, the brightness difference can be controlled within a reasonable reference brightness range, thereby more accurately detecting the electric arc.
[0109] The maximum exposure time threshold is the maximum exposure time when acquiring an image. When the second exposure time is less than or equal to the maximum exposure time, the second exposure time can be used as the target exposure time for the second image acquisition. There is no over-adjustment, and the second exposure time alone is sufficient to ensure that the arc in the second image has significant characteristics. Therefore, there is no need to use the maximum exposure time threshold to adjust the original gain. In this case, the original gain can continue to be used as the target gain, or other methods can be used to adjust the original gain.
[0110] Since the second exposure time is obtained by increasing the original exposure time based on the brightness difference, it may be over-increased, causing the second exposure time to exceed the maximum exposure time threshold. In this case, the maximum exposure time threshold can be used as the target exposure time for the second image acquisition. At the same time, by using the ratio between the second exposure time and the maximum exposure time threshold, the degree to which the maximum exposure time threshold cannot be adjusted is quantified. This allows the process of adjusting the exposure gain to replace part of the exposure time adjustment process. Under moderate noise conditions, by adjusting the exposure gain, the brightness difference can be controlled within a reasonable reference brightness range, thereby more accurately detecting the electric arc.
[0111] In some embodiments, the ratio between the minimum gain threshold and the first gain can be multiplied by the original exposure time to obtain the first exposure time; the ratio between the minimum gain threshold and the first gain can be mapped, and the original exposure time can be increased according to the adjustment parameter obtained by the mapping to obtain the first exposure time.
[0112] In some embodiments, the ratio between the first exposure time and the maximum exposure threshold can be multiplied by the original gain to obtain the second gain; the ratio between the original gain and the maximum exposure threshold can be mapped, and the original gain can be increased according to the adjustment parameters obtained from the mapping to obtain the second gain.
[0113] In this embodiment, when the first gain is appropriately reduced, the reduced first gain is used first to minimize noise and ensure accurate arc positioning. If the first gain is excessively reduced, the degree to which the minimum gain threshold cannot be adjusted is quantified, and the exposure time is adjusted accordingly. This allows the brightness difference to be controlled within a reasonable reference brightness range under moderate noise conditions, thus enabling more accurate arc detection. Similarly, when the second exposure time is appropriately increased, the second exposure time is used first to minimize noise introduction and ensure accurate arc positioning. If the second exposure time is appropriately increased, the degree to which the maximum exposure time threshold cannot be adjusted is quantified, and the exposure time is adjusted accordingly. This allows the brightness difference to be controlled within a reasonable reference brightness range under moderate noise conditions, thus enabling more accurate arc detection.
[0114] In some embodiments, detecting an electric arc in a second image based on the pixel values of a target pixel and its neighboring pixels includes: adjusting a base threshold based on the ratio of a target gain to a minimum gain threshold and the ratio of a target exposure time to a maximum exposure time threshold to obtain a pixel value threshold; if the number of pixels with pixel values greater than the pixel value threshold among the neighboring pixels of the target pixel is greater than a pixel number threshold, then determining the pixel representing the electric arc based on the target pixel.
[0115] The base threshold is a reference threshold to be adjusted. Using the base threshold allows for the formation of threshold adjustment units, enabling more flexible determination of the arc standard and thus more accurate arc determination under different target exposure parameters. The base threshold is set based on the minimum gain threshold and the maximum exposure time threshold, using the base threshold under conditions of minimum noise and maximum brightness as a basis, allowing for dynamic adjustment of the pixel threshold. Optionally, the pixel value of the base threshold can be 79, 80, or 83.
[0116] The pixel value threshold is a dynamically adjusted result of the base threshold. It is the critical value corresponding to the second image; pixels with values greater than the threshold can be used to determine whether a target pixel represents an electric arc. Since both the target gain and target exposure time are dynamically adjusted according to the brightness value of the first image, the time threshold can be adjusted using the target gain and target exposure time to more accurately detect electric arcs.
[0117] The number of pixels is the number of adjacent pixels with larger pixel values. Using the number of pixels allows for the integration of adjacent information at the pixel level, thus preventing abnormal single-point pixel values from affecting the accuracy of arc detection.
[0118] In some embodiments, the ratio of the target gain to the minimum gain threshold, the ratio of the target exposure time to the maximum exposure time threshold, and the base threshold are multiplied together to obtain the product of the two ratios and the base threshold. This product can be used as the pixel value threshold, or it can be multiplied again based on the influence factor of the image effect (AE), and the adjusted result of multiplying the influence factor by the product again is the pixel value threshold. The influence factor is greater than 0 and less than the maximum value of the influence factor to avoid the pixel value threshold being too large or too small. The maximum value of the influence factor is a preset multiple of the reciprocal of the maximum gain threshold. For example, if the maximum gain threshold is 400 and the preset multiple is 2, then the maximum value of the influence factor is 1 / 200.
[0119] In some embodiments, a pixel value threshold is obtained by adjusting a base threshold based on the target gain and target exposure time in the target exposure parameters; if the number of pixels with a pixel value greater than the pixel value threshold among the adjacent pixels of the i-th pixel is greater than the number of pixels threshold, then the pixel representing the electric arc is determined based on the i-th pixel; where i is a positive integer, the i-th pixel represents the target pixel, and the i-th pixel can be a group of pixels, which may include one or more pixels.
[0120] In some embodiments, the state of the target pixel is modified to a pixel with an electric arc, so that the electric arc is represented by the state of the target pixel.
[0121] In this embodiment, the target gain and target exposure time are not only parameters used by the sensor to acquire the second image, but also used to dynamically adjust the base threshold, resulting in dynamic changes in the pixel value threshold to avoid noise affecting the accuracy of arc detection. Simultaneously, when using a certain number of pixels, it can integrate adjacent information at the pixel granularity level to prevent abnormal single-point pixel values from affecting the accuracy of arc detection. Therefore, the pixel value threshold and exposure parameters are linked. Before detecting the arc, we statistically analyze the grayscale distribution of the image. When the background is too bright, we dynamically adjust the exposure parameters to suppress background noise, while simultaneously modifying the base threshold to the pixel value threshold to ensure the accuracy of arc detection.
[0122] In some embodiments, detecting an electric arc in a second image based on the pixel values of a target pixel and its neighboring pixels includes: if the number of pixels with pixel values greater than a pixel value threshold among the neighboring pixels of the target pixel is greater than a pixel number threshold, then combining the pixel value of the target pixel with the pixel values of its neighboring pixels to obtain a target neighborhood value; calculating a pixel difference based on the pixel value of the target pixel and the target neighborhood value to obtain a pixel intensity value; and if the pixel intensity value is greater than a pixel difference threshold, then determining the target pixel as a pixel representing an electric arc.
[0123] The target neighborhood value is the result of fusing the pixel values of a target pixel and its neighboring pixels. It can be determined based on the mode of the pixel values of the target pixel and its neighboring pixels, or by averaging the pixel values of the target pixel and its neighboring pixels; this average value is the target neighborhood value. For example, if the target pixel's coordinates are (x, y), and it has eight neighboring pixels: the left pixel (x-1, y), the top-left pixel (x-1, y-1), the top pixel (x, y-1), the top-right pixel (x+1, y-1), the right pixel (x+1, y), the bottom-right pixel (x+1, y+1), the bottom pixel (x, y+1), and the bottom-left pixel (x-1, y+1); the average value of these eight pixels and the target pixel is the target neighborhood value.
[0124] Pixel intensity value represents the spectral intensity corresponding to the target pixel. Since the pixel intensity value is the difference between the pixel value of the target pixel and the pixel value of its neighborhood, it can more accurately determine the pixel value of each target pixel, thereby improving accuracy. The pixel difference threshold is the minimum pixel value that reflects an electric arc. When the pixel intensity value is greater than the pixel difference threshold, it can be determined more accurately that the target pixel represents an electric arc; when the pixel intensity value is less than or equal to the pixel difference threshold, the target pixel may be a pixel with excessive noise.
[0125] In some embodiments, the pixel value of the target pixel and the pixel values of its neighboring pixels are averaged to obtain the target neighborhood value.
[0126] Since the ultraviolet radiation from fire is mainly concentrated in UVB, while that from an electric arc is mainly in UVC, filtering out UVB with a filter and adjusting the exposure parameters (AE) of the ultraviolet sensor can suppress the brightness of the flame, ensuring that only the electric arc is visible in the ultraviolet image, thus filtering out most of the ultraviolet radiation produced by the flame. However, for flames with very high temperatures and slightly stronger ultraviolet radiation, when the lens is focused on the wavelength of the electric arc, the flame image will show obvious blurring. This can be distinguished by judging the edge intensity of the signal, that is, using the target pixel with the larger pixel intensity value to represent the pixel of the electric arc.
[0127] In this embodiment, since the second image may be blurred, and the electric arc happens to have linear characteristics at the pixel level, and the correlation between the number of pixels and the lines is weak, the pixel intensity value is obtained by the pixel difference between the target pixel and the target neighborhood value. By filtering the interference of the flame through the difference in spectral bands between the fire and the electric arc, the target pixel with the larger pixel intensity value is determined to represent the pixel of the electric arc.
[0128] In some embodiments, a base threshold is adjusted based on the ratio of the target gain to the minimum gain threshold and the ratio of the target exposure time to the maximum exposure time threshold to obtain a pixel value threshold. If the number of pixels with a pixel value greater than the pixel value threshold among the neighboring pixels of the target pixel is greater than the number of pixels threshold, the pixel value of the target pixel is combined with the pixel values of the neighboring pixels of the target pixel to obtain a target neighborhood value. A pixel difference is calculated between the pixel value of the target pixel and the target neighborhood value to obtain a pixel intensity value. If the pixel intensity value is greater than the pixel difference threshold, the target pixel is determined to be a pixel representing an electric arc.
[0129] In some embodiments, the second image includes a region to be detected and multiple adjacent regions. The region to be detected is the region where arc detection is to be performed, and it can be any region in the second image. The region to be detected and its adjacent regions are different regions in the second image, and the area between the adjacent regions and the region to be detected is less than a preset value, which can be 2 or 3. For example, the coordinates of the region to be detected are (c, r), and it has 8 adjacent regions, namely the left region (c-1, r), the upper left region (c-1, r-1), the upper region (c, r-1), the upper right region (c+1, r-1), the right region (c+1, r), the lower right region (c+1, r+1), the lower region (c, r+1), and the lower left region (c-1, r+1).
[0130] Based on the pixel values of the target pixels and their neighboring pixels in the second image, the detection of electric arcs in the second image includes: determining whether the number of pixels with pixel values greater than a pixel value threshold in the neighboring pixels of the target pixels in the region to be detected is greater than a pixel count threshold; if so, counting the number of neighboring regions containing pixels representing electric arcs to obtain the number of regions; if the number of regions is greater than the number of regions threshold, then it is determined that the region to be detected contains an electric arc.
[0131] The number of regions is a statistical result of the adjacent regions of the electric arc. It represents an analytical dimension of a local image region. Region number and pixel dimension represent different granularities of local image locality, helping to more accurately identify the electric arc and avoid omissions. The number of regions is 2 when two adjacent regions contain pixels representing an electric arc. The region number threshold is a critical value calculated in the second image; if the number of regions exceeds the threshold, the region to be detected contains a representation of an electric arc.
[0132] In some embodiments, if the number of pixels with pixel values greater than a pixel value threshold among the neighboring pixels of the target pixel in an adjacent region is greater than a pixel count threshold, then the pixel value of the target pixel in the adjacent region is combined with the pixel values of the neighboring pixels of the target pixel to obtain the target neighborhood value of the adjacent region; a pixel difference is calculated based on the pixel value of the target pixel in the adjacent region and the target neighborhood value of the adjacent region to obtain the pixel intensity value of the adjacent region; if the pixel intensity value of the adjacent region is greater than the pixel difference threshold, then the target pixel in the adjacent region is determined to be a pixel representing an electric arc, and the adjacent region contains a pixel representing an electric arc. Thus, based on the target pixels within the adjacent region, it can be determined from a pixel dimension whether each adjacent region contains an electric arc.
[0133] In some embodiments, if an adjacent area does not contain an electric arc and no area-level telephone detection is performed in that adjacent area, the adjacent area is designated as the next area to be detected.
[0134] In one embodiment, the process of counting the number of regions is performed cyclically. If, among the neighboring pixels of a certain adjacent region, the number of pixels with a pixel value greater than a pixel value threshold exceeds a pixel count threshold, then the pixels in this adjacent region may represent an electric arc. In other words, there may be pixels representing an electric arc in the adjacent region, and the state of this adjacent region is 1. Furthermore, if the pixel intensity value of the pixels in this adjacent region is greater than a pixel difference threshold, then the target pixel is determined to represent an electric arc; that is, there is a pixel representing an electric arc, and the state of this adjacent region is 2. In this case, if there are two adjacent regions with a state of 2 within a 3*3 neighborhood window centered on the region to be detected y(c, r), the state of the region to be detected is also changed to 2. Then, the next region to be detected and its adjacent regions are determined, until the state of m*n regions is no longer refreshed.
[0135] In some embodiments, the base threshold is adjusted based on the ratio of the target gain to the minimum gain threshold and the ratio of the target exposure time to the maximum exposure time threshold to obtain the pixel value threshold; if the number of pixels with pixel values greater than the pixel value threshold among the neighboring pixels of the target pixel in the detection area is greater than the pixel number threshold, then the number of neighboring regions containing pixels representing electric arcs is counted based on the pixel values of the target pixels in each neighboring region and the neighboring pixels of each target pixel to obtain the number of regions; if the number of regions is greater than the number of regions threshold, then it is determined that the detection area contains an electric arc.
[0136] In this embodiment, when the number of pixels in the detection area that have a pixel value greater than a pixel value threshold is reached, the number of regions containing electric arcs in its adjacent regions is counted to obtain the number of regions. The number of regions is then used to assess whether the detection area contains an electric arc. Therefore, due to the irregularity of electric arc regions, to reduce computational load, this embodiment uses a region-level judgment process, dividing the region for detection and then using a region connectivity and fusion method to achieve electric arc detection, ensuring accuracy.
[0137] In an exemplary embodiment, the second image of the ultraviolet imaging is divided into regions for detection to determine whether a real electric arc exists. The electric arcs in each region are then fused to locate the complete electric arc region information. In ultraviolet imaging, the visible light portion is filtered out by a filter, primarily displaying the ultraviolet spectral image. Assuming the image resolution is width*height, the brightness difference is first obtained from the first image. This brightness difference, along with the corresponding original exposure parameters, is used to adjust and suppress weak ultraviolet interference in the background. Due to the irregularity of the electric arc region, to reduce computational load, this patent implements electric arc detection by dividing the region for detection and then using a region connection and fusion method. The electric arc detection step includes an exposure parameter adjustment step and an electric arc detection step.
[0138] In the exposure parameter adjustment step, the exposure parameters adjusted by After Effects (AE) include exposure time and exposure gain. Both exposure time and exposure gain are positively correlated with the brightness of the acquired image, and this positive correlation can be non-linear; for example, it can be set according to a gamma curve. During AE adjustment, it is important to select an appropriate range of exposure parameters to avoid an image that is too dark, making it impossible to detect the electric arc, or an image that is too high, resulting in excessive background noise.
[0139] In this case, the gain adjustment range is [g_min, g_max], the exposure time adjustment range is [t_min, t_max], the reference brightness is L_c, the background brightness target range is [0.5*L_c, 2*L_c], the average brightness of the current image is L_avg, the exposure time is t_cur, and the gain is g_cur. When the average brightness L_avg of the current image is not within the background brightness target range, the ae needs to be adjusted. The gain g and exposure time t of ae are calculated as follows:
[0140] When the brightness difference L_avg / L_c > 2, the expressions for calculating the first gain g and the first exposure time t are as follows:
[0141] (1)
[0142] When the brightness difference is greater than twice, and the brightness difference falls within the first brightness aberration region, the current original gain g_cur is adjusted based on the ratio of the reference brightness L_c to the current image average brightness L_avg to obtain the adjusted gain. If the first gain is less than the minimum gain threshold, the current original exposure time is adjusted based on the ratio of the minimum gain threshold to the first gain to obtain the first exposure time, and the first exposure time is determined based on the first exposure time. If the first gain is greater than or equal to the preset minimum gain threshold, the first exposure time is determined based on the original exposure time. If the first exposure time is less than the minimum exposure time, the target exposure time is determined based on the minimum exposure time. If the first exposure time is greater than or equal to the minimum exposure time, the target exposure time is determined based on the first exposure time. If the first gain is less than the minimum gain threshold, the target gain is determined based on the minimum gain threshold. If the second gain is greater than or equal to the minimum gain threshold, the target gain is determined based on the first gain.
[0143] When the brightness difference L_avg / L_c < 0.5, the expressions for calculating the second gain g and the second exposure time t are as follows:
[0144] (2)
[0145] When the brightness difference is less than 0.5, the brightness difference is in the second brightness anomaly region. Therefore, the original exposure time g_cur is adjusted based on the ratio of the reference brightness L_c to the current image average brightness L_avg to obtain the second exposure time. If the second exposure time is greater than the maximum exposure time threshold, the original gain is adjusted based on the ratio of the second exposure time to the maximum exposure time threshold to obtain the second gain. The second gain is then determined. If the second exposure time is less than or equal to the preset maximum exposure time threshold, the second gain is determined based on the original gain. If the second gain is greater than the maximum gain, the target gain is determined based on the maximum gain. If the second gain is less than or equal to the maximum gain, the target gain is determined based on the second gain. If the second exposure time is greater than the maximum exposure time threshold, the target exposure time is determined based on the maximum exposure time threshold. If the candidate exposure time is less than or equal to the maximum exposure time threshold, the target exposure time is determined based on the second exposure time.
[0146] After obtaining the target gain and target exposure time, the target gain and target exposure time can be substituted into the corresponding function to adjust the exposure effect and obtain the second image.
[0147] The arc detection steps include: dividing the second image into m*n small regions, adjusting the size of the divided regions according to the algorithm accuracy, and the regions of the second image are as follows: Figure 5As shown. The initial value of state y (whether there is an ultraviolet signal) in each region is assigned to 0, indicating that there is no ultraviolet signal in the region. The expression for each region is as follows:
[0148] (3)
[0149] Where y is an m*n matrix representing the initial state of the region's ultraviolet signal, and (c,r) represents the location information of each region in the second image, which represents each region to be detected.
[0150] Furthermore, before detecting the electric arc, the grayscale distribution of the image is statistically analyzed. When the background is too bright, the ae (earnings efficiency) is dynamically adjusted to suppress background noise, and the threshold T is modified simultaneously. Specifically, it is determined whether a valid ultraviolet signal exists in each target pixel within the detection area. Assuming the brightness threshold is T, the brightness threshold is adjusted based on the target gain and target exposure time. Assuming the current region's position is (c, r), the following judgments are performed sequentially on the pixels within the region, expressed as follows:
[0151] (4)
[0152] Wherein, T0 is the basic threshold, which can be 80, to ensure good results even when there is strong sunlight outdoors; a is the ae influence factor, which takes a value between (0, 2 / g_max); x and y are the pixel coordinates in the ultraviolet image; and g(x, y) is the corresponding pixel gray value.
[0153] Furthermore, by detecting the strength of the signal spectrum in the detection area to distinguish the corresponding signal spectrum, flame signals can be filtered.
[0154] When the current pixel gray value g(x,y) satisfies formula (4), the number of pixels m that exceed the pixel value threshold T in the adjacent pixels of the 3*3 neighborhood window centered on the target pixel is counted, and its expression is as follows;
[0155] (5)
[0156] Where i,j represent the position information of the neighborhood pixels.
[0157] When the number of pixels m is greater than or equal to the number of pixels T1, T1 can be 3, indicating that the target pixel g(x,y) may be a real ultraviolet signal, and the arc state of the region is modified as shown in formula (6).
[0158] (6)
[0159] Furthermore, for the target pixel that satisfies the condition in step (6), i.e., when m is greater than T1, the ultraviolet signal is further judged to distinguish signals in the UVB band such as flames. The target neighborhood value is determined based on the pixel values of the target pixel g(x, y) and its neighboring pixels. Based on the pixel values of the target pixel and the socket of the target neighborhood value, it is determined whether the ultraviolet signal spectrum of the target pixel represents an electric arc, as shown in the following formula:
[0160] (7)
[0161] In the formula, L represents the spectral intensity value corresponding to g(x,y), and T2 is the intensity threshold. Therefore, the average brightness of the central target pixel (x,y) and its 8 surrounding adjacent pixels is calculated first. Then, the average brightness is subtracted from the brightness of the central pixel to obtain the pixel intensity value.
[0162] When the pixel intensity value L > pixel intensity threshold T2, it indicates that the current ultraviolet signal is an electric arc.
[0163] (8)
[0164] When an electric arc is detected in a certain detection area (c, r), the current area scan ends, this area is taken as the neighboring area of the pixel representing the electric arc, and the scan continues to the next detection area.
[0165] At this point, further judgment is made on the ultraviolet signal with state 1 in the next detection area y(c,r). The steps are as follows: If there are two adjacent areas with state 2 in the 3*3 neighborhood window centered on the detection area y(c,r), the state of the detection area is also changed to 2. Then, the next detection area and its adjacent areas are determined until the state of the ultraviolet signal in m*n areas is not refreshed.
[0166] Finally, during the pixel traversal, coordinate constraints are used to ensure that pixels do not exceed boundaries. Specifically, the y(c,r) states of m*n regions are traversed. When the region coordinates (c,r) corresponding to the arc state y(c,r) = 2 is detected, the initial region information of the arc region is defined with the top left corner (c_l,r_t) and the bottom left corner (c_r,r_b) as initial values c_l=c_r=c, r_t=r_b=r. The eight regions in the neighborhood are judged. When the arc state corresponding to the region is also 2, assuming the region position is (cc,rr), the states (c_l,r_t) and (c_r,r_b) are updated as shown in the following expression:
[0167] (9)
[0168] Therefore, the above domain judgment is repeated for the eight regions where the arc state is also 1, until there are no arcs in any region. The scanned regions are marked, and the unmarked regions are scanned again. The intensity of the signal spectrum in each region can be used to distinguish the corresponding signal spectrum, thus filtering flame signals. Finally, the location of the region is converted into the coordinate information of the arc, as shown in the figure. Figure 6 As shown.
[0169] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed 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 performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0170] Based on the same inventive concept, this application also provides an arc detection device for implementing the arc detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of the one or more arc detection device embodiments provided below can be found in the limitations of the arc detection method described above, and will not be repeated here.
[0171] In one exemplary embodiment, such as Figure 7 As shown, an arc detection device is provided, comprising:
[0172] The acquisition module 702 is used to acquire the first image obtained by ultraviolet imaging based on the original exposure parameters;
[0173] The determining module 704 is used to determine the brightness difference between the brightness of the first image and the reference brightness, and to determine the target exposure parameters corresponding to the original exposure parameters based on the brightness difference;
[0174] The acquisition module 702 is used to acquire a second image obtained by ultraviolet imaging based on the target exposure parameters;
[0175] The detection module 706 is used to detect the electric arc in the second image based on the pixel values of the target pixel and the adjacent pixels of each target pixel.
[0176] In one embodiment, the original exposure parameters include original gain and original exposure time, and the target exposure parameters include target gain and target exposure time;
[0177] The determining module 704 is used for:
[0178] When the brightness difference is within the first brightness aberration range, the original gain is reduced according to the brightness difference to obtain a first gain; the first exposure time corresponding to the original exposure time is determined according to the gain range in which the first gain is located; the target gain is determined according to the first gain, and the target exposure time is determined according to the first exposure time.
[0179] When the brightness difference is within the second brightness aberration range, the original exposure time is increased according to the brightness difference to obtain the second exposure time; the second gain corresponding to the original gain is determined according to the exposure time range in which the second exposure time is located; the target gain is determined according to the second gain, and the target exposure time is determined according to the second exposure time.
[0180] The brightness differences in the first brightness abnormality interval are all greater than the brightness differences in the second brightness abnormality interval.
[0181] In one embodiment, the determining module 704 is configured to:
[0182] When the first gain is greater than or equal to the minimum gain threshold, the first exposure time is obtained based on the original exposure time;
[0183] When the first gain is less than the minimum gain threshold, the original exposure time is increased according to the ratio between the minimum gain threshold and the first gain to obtain the first exposure time.
[0184] When the second exposure time is less than or equal to the maximum exposure time threshold, the second gain is obtained based on the original gain;
[0185] When the second exposure time is greater than the maximum exposure time threshold, the original gain is increased according to the ratio between the second exposure time and the maximum exposure time threshold to obtain the second gain.
[0186] In one embodiment, the detection module 706 is configured to:
[0187] The base threshold is adjusted based on the ratio of target gain to minimum gain threshold and the ratio of target exposure time to maximum exposure time threshold to obtain the pixel value threshold.
[0188] If, among the neighboring pixels of the target pixel, the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold, then the pixel representing the electric arc is determined based on the target pixel.
[0189] In one embodiment, the detection module 706 is configured to:
[0190] If, among the neighboring pixels of the target pixel, the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold, then the pixel value of the target pixel is combined with the pixel values of the neighboring pixels of the target pixel to obtain the target neighborhood value.
[0191] The pixel intensity value is obtained by calculating the pixel difference between the pixel value of the target pixel and the value of the target neighborhood.
[0192] If the pixel intensity value is greater than the pixel difference threshold, then the target pixel is determined to be a pixel representing an electric arc.
[0193] In one embodiment, the second image includes a region to be detected and a plurality of adjacent regions of the region to be detected;
[0194] The detection module 706 is used for:
[0195] In the neighboring pixels of the target pixel in the area to be detected, determine whether the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold.
[0196] If so, then the number of adjacent regions containing pixels representing electric arcs is counted to obtain the number of regions;
[0197] If the number of regions is greater than the region number threshold, then the region to be detected is determined to contain an electric arc.
[0198] Each module in the aforementioned arc detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0199] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements an arc detection method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0200] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0201] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0202] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0203] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0204] 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 used for analysis, data stored, data displayed, 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 the relevant data must comply with relevant regulations.
[0205] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media 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), magnetic 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 take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0206] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this application.
[0207] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An arc detection method, characterized in that, The method includes: The first image obtained from ultraviolet imaging is acquired based on the original exposure parameters; Determine the brightness difference between the brightness of the first image and the reference brightness, and determine the target exposure parameters corresponding to the original exposure parameters based on the brightness difference; A second image obtained from ultraviolet imaging is acquired based on the target exposure parameters; The electric arc in the second image is detected based on the pixel values of the target pixel and its neighboring pixels.
2. The method according to claim 1, characterized in that, The original exposure parameters include the original gain and the original exposure time, and the target exposure parameters include the target gain and the target exposure time; Determining the target exposure parameters corresponding to the original exposure parameters based on the brightness difference includes: When the brightness difference is within the first brightness aberration range, the original gain is reduced according to the brightness difference to obtain a first gain; the first exposure time corresponding to the original exposure time is determined according to the gain range in which the first gain is located; the target gain is determined according to the first gain, and the target exposure time is determined according to the first exposure time. When the brightness difference is within the second brightness aberration range, the original exposure time is increased according to the brightness difference to obtain the second exposure time; the second gain corresponding to the original gain is determined according to the exposure time range in which the second exposure time is located; the target gain is determined according to the second gain, and the target exposure time is determined according to the second exposure time. The brightness differences in the first brightness abnormality interval are all greater than the brightness differences in the second brightness abnormality interval.
3. The method according to claim 2, characterized in that, Determining the first exposure time corresponding to the original exposure time based on the gain interval where the first gain is located includes: When the first gain is greater than or equal to the minimum gain threshold, the first exposure time is obtained based on the original exposure time; When the first gain is less than the minimum gain threshold, the original exposure time is increased according to the ratio between the minimum gain threshold and the first gain to obtain the first exposure time. The step of determining the second gain corresponding to the original gain based on the exposure time interval in which the second exposure time falls includes: When the second exposure time is less than or equal to the maximum exposure time threshold, the second gain is obtained based on the original gain; When the second exposure time is greater than the maximum exposure time threshold, the original gain is increased according to the ratio between the second exposure time and the maximum exposure time threshold to obtain the second gain.
4. The method according to claim 1, characterized in that, The step of detecting the electric arc in the second image based on the pixel values of the target pixel and its neighboring pixels includes: The base threshold is adjusted based on the ratio of target gain to minimum gain threshold and the ratio of target exposure time to maximum exposure time threshold to obtain the pixel value threshold. If, among the neighboring pixels of the target pixel, the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold, then the pixel representing the electric arc is determined based on the target pixel.
5. The method according to claim 1 or 4, characterized in that, The step of detecting the electric arc in the second image based on the pixel values of the target pixel and its neighboring pixels includes: If the number of pixels with a pixel value greater than the pixel value threshold among the neighboring pixels of the target pixel is greater than the pixel number threshold, then the pixel value of the target pixel is combined with the pixel values of the neighboring pixels of the target pixel to obtain the target neighborhood value. The pixel intensity value is obtained by calculating the pixel difference between the pixel value of the target pixel and the value of the target neighborhood. If the pixel intensity value is greater than the pixel difference threshold, then the target pixel is determined to be a pixel representing an electric arc.
6. The method according to claim 1, characterized in that, The second image includes the region to be detected and multiple adjacent regions of the region to be detected; The step of detecting the electric arc in the second image based on the pixel values of the target pixel and its neighboring pixels includes: In the neighboring pixels of the target pixel in the area to be detected, determine whether the number of pixels with a pixel value greater than the pixel value threshold is greater than the pixel number threshold. If so, then the number of adjacent regions containing pixels representing electric arcs is counted to obtain the number of regions; If the number of regions is greater than the region number threshold, then the region to be detected is determined to contain an electric arc.
7. An arc detection device, characterized in that, The device includes: The acquisition module is used to acquire the first image obtained from ultraviolet imaging based on the original exposure parameters; The determining module is used to determine the brightness difference between the brightness of the first image and the reference brightness, and to determine the target exposure parameters corresponding to the original exposure parameters based on the brightness difference; The acquisition module is used to acquire a second image obtained by ultraviolet imaging based on the target exposure parameters; The detection module is used to detect the electric arc in the second image based on the pixel values of the target pixel and the adjacent pixels of each target pixel.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.