Method and system for judging low voltage in a region at night based on fixed camera sensing light brightness
Through the area night-time low voltage analysis method based on a fixed camera, the traditional low voltage judgment method is solved, and the problem of high cost and poor accuracy is achieved, which can achieve rapid and accurate analysis of the area night-time low voltage, reducing monitoring costs.
Patent Information
- Application Number
- CN202410843459.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-06-27
AI Technical Summary
Traditional low voltage judgment methods are costly and cannot completely eliminate regional low voltage problems, making it difficult to accurately and quickly monitor the voltage stability of end users.
The low voltage analysis method at night in the area based on the fixed camera sensing the brightness of the light is adopted. Through multi-level area division, camera calibration, historical light information sorting and real-time light brightness judgment, the influence of noise is eliminated and the judgment accuracy is improved.
It realizes accurate and rapid analysis of low voltages at night in the area, reduces monitoring costs, and improves the accuracy and reliability of judgments.
Smart Images

Figure CN118739589B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of regional low voltage assessment, and in particular to a method and system for regional nighttime low voltage assessment based on a fixed camera sensing light brightness. Background Art
[0002] Efficient and stable power supply is the top priority of the power supply department. With the continuous development of infrastructure work over the years, my country's high-voltage transmission network has covered most of the country, providing a good foundation and guarantee for regional construction in my country. At the same time, my country is vast and rich in resources. The transmission of electricity from power generation units to power terminals often requires long-distance transmission; my country's multi-level power supply network is also highly complex. In the process of power transmission, line losses, environmental factors, and changes in user electricity consumption behavior will affect the stability of electricity consumption, which is manifested as unstable voltage for end users. Therefore, if it is possible to quickly monitor and determine whether there is low voltage in the area, it has strong theoretical value and practical significance.
[0003] Traditional low voltage judgment methods require a comprehensive judgment based on line loss and terminal power consumption, which is an inference based on "theoretical data". Another method is to evaluate through dedicated terminal monitoring hardware, which not only increases the cost of terminal low voltage monitoring, but also cannot completely rule out regional low voltage problems or "individual problems" at the terminal node where the equipment is located. Summary of the invention
[0004] The present invention is mainly aimed at the judgment of low voltage at night, and provides a method for judging low voltage at night in a region based on fixed cameras sensing light brightness. By extracting effective cameras in the area and combing and analyzing the camera shooting data, the influence of mobile light source changes, noise, etc. is eliminated to improve the accuracy of judgment.
[0005] The above technical problems of the present invention are mainly solved by the following technical solutions:
[0006] A method for determining low voltage at night in an area based on fixed cameras sensing light brightness includes the following steps:
[0007] Step 1: Multi-level area division: the monitoring area is divided into different areas of different levels according to the type of electricity users and the power supply network, until it is divided into the last level bus coverage area, and the last level bus coverage area is further divided into the smallest sub-areas;
[0008] Step 2: Calibrate the fixed camera in the smallest sub-area: In the smallest sub-area, select and calibrate multiple fixed cameras to ensure that the cameras can capture different directions in the smallest sub-area;
[0009] Step 3: Organize historical lighting information of sub-areas: Collect and organize n cameras in history n The lighting information within the shooting range is collected and stored in the constructed lighting database;
[0010] Step 4: Real-time regional light brightness determination: Based on the light data stored in the light database, determine the light data at the current time point to determine whether the area captured by the camera has "low voltage hidden dangers";
[0011] Step 5. Regional low voltage assessment: Further confirm whether there is low voltage in a sub-area with "low voltage hidden dangers".
[0012] Furthermore, step one specifically includes:
[0013] Step 1.1, collect and organize the power supply network diagram of the monitoring area, and organize it using a tree data structure: under the power supply bus, it is divided into a secondary bus; the secondary bus is further branched into a tertiary bus, and so on;
[0014] Step 1.2: Divide the power supply lines into multiple levels in the same manner as in step 1.1 until a bus at a certain level is connected to a specific power user, then stop dividing; at this time, assuming that there are n levels in total, each level of bus is recorded as Bus n , where Bus1 indicates the power supply bus, Bus2 indicates the secondary bus, and so on; the corresponding bus coverage area is recorded as Area nm , where n represents the n-th level bus, and m represents the m-th bus in the n-th level bus;
[0015] Step 1.3, divide electricity users into three categories: industrial users, residential users and security users;
[0016] Step 1.4: Set the minimum bus coverage area to Area nm Further divided into Area nm1 、Area nm2 and Area nm3 , corresponding to industrial user areas, residential user areas and security user areas respectively;
[0017] At this point, the division of multi-level sub-areas is completed, with a total of n levels, where m represents the number of buses in the nth level bus; each sub-area corresponding to the terminal bus is further divided into Area nm1 、Area nm2 and Area nm3 , called the smallest sub-region.
[0018] Furthermore, step 2 specifically includes:
[0019] Step 2.1, collect and organize all camera data that can obtain observation information in real time in the smallest sub-area;
[0020] Step 2.2: Filter the cameras that meet the requirements. The specific screening method is as follows:
[0021] b) For a certain camera, collect the video stream data from 20:00 to 24:00 on a certain night in history;
[0022] b) Take one frame of image every 1 minute, and get a total of 240 images;
[0023] c) converting the 240 images from RGB color space to grayscale space;
[0024] d) For a certain image, calculate the pixel values of all pixels and find the average value of all pixel values;
[0025] e) If the average pixel value of the image is greater than the first threshold, it indicates that the overall shooting environment of the image is bright, which is defined as "not conducive to observing the light brightness" and the image is excluded;
[0026] f) Assume that the average pixel value of the image is Pix average , the number of all pixels in the image is n, then the pixel value of each pixel is recorded as Pix n ;
[0027] g) If Pix n -Pix average If the number of values greater than 100 is less than the second threshold, it indicates that there are too few “bright spot pixels” in the image, and the image is excluded;
[0028] h) If, among the 240 images of a camera from 20:00 to 24:00 on a certain day, after screening in the above steps, the number of remaining images is less than 60, then the data of the camera on that day is considered to be unqualified and will not be adopted;
[0029] ii) If the data of a camera does not meet the requirements for more than 100 days in the past year, the data of the camera will be deemed unusable and the camera will be screened out;
[0030] Step 2.3, among the remaining valid cameras, collect the coordinates of all cameras;
[0031] Step 2.4, gridding the sub-region into n×m grid regions;
[0032] Step 2.5: For each grid, retain at most one camera and randomly remove the data of other cameras;
[0033] At this point, the screening of cameras in the sub-area is completed. Assume that there are n cameras, all cameras are recorded as Camera n .
[0034] Furthermore, step three specifically includes:
[0035] Step 3.1: For each camera n , the targets within the shooting angle are divided into two categories: moving targets and fixed targets; first, the moving target lights are excluded, and for the video streams in the selected time period (20:00-24:00) in a low-light environment, the following steps are used for processing:
[0036] e) First, for the video stream in the period of 20:00-24:00, starting from the first frame image, calculate the potential light pixel points in the first frame image: the pixel points whose gray space pixel values are greater than the third threshold;
[0037] f) calculating the enveloping range of the light area, wherein the outer edge of the range is the pixel points whose adjacent pixel points are smaller than the fourth threshold value;
[0038] g) Similarly, calculate the light enveloping range in the second frame image. If the light enveloping range coincides with that in the first frame, it means that the light target has not moved during the time period between the two frames.
[0039] h) Calculate the subsequent frame images in sequence. If the light-wrapped area of a frame does not completely overlap with the previous frame image, there are three cases: light off, light on, and light moving;
[0040] Light off judgment: If the light coverage of a certain frame of image completely disappears compared with the previous frame, it is considered that the light is off;
[0041] Determination of lighting: Add a new lighting area to the non-lighting area in the previous frame;
[0042] Judgment of light movement: The light package range of the current frame moves in a certain direction, which is reflected by the outer pixel points on one side of the outer edge of the light package range changing from less than the threshold to greater than the threshold, while the inner pixel points on the other side of the outer edge of the light change from greater than the threshold to less than the threshold;
[0043] If the light is turned off, it means that it has not moved before it is turned off, and it is considered to be a fixed light;
[0044] If a light is on, it is marked as "pending state" in the current frame, and the subsequent continuous image frames determine whether it is a fixed light or a moving light;
[0045] For light movement, it is considered to be the light generated by the moving target;
[0046] At this point, the fixed lights within the observation angle of a camera are screened out;
[0047] Step 3.2: Build a lighting storage database. The construction method is:
[0048] d) For a certain camera, within its observation range and observation period (20:00-24:00), record the time point and pixel value of the fixed light;
[0049] e) For a frame image of a camera at a certain time point, calculate the pixel values of all fixed lights;
[0050] f) Remove the highest 1 / 3 pixel points and the lowest 1 / 3 pixel points with the pixel values at that time point, and retain the middle 1 / 3 pixel points;
[0051] d) taking the average value of the pixel values of the retained pixels;
[0052] e) Constructing a light storage database, wherein the table structure of the light storage database has three attributes: camera number, time point, and average value of light pixels at the time point.
[0053] Furthermore, step four specifically includes:
[0054] Step 4.1, for the current time point, read the current frame image in each valid camera;
[0055] Step 4.2: For the current frame of any valid camera, calculate its fixed light data;
[0056] Step 4.3, calculate the average pixel value of the fixed light in the current frame;
[0057] Step 4.4, in the light database, read the average pixel value of the fixed light of the same camera in the same time period in the past 10 days;
[0058] Step 4.5: Compare the results of step 4.3 and step 4.4. If the difference between the current average pixel value and the 10 results of the comparison of the pixel values in the past 10 days is within 5%, it is determined that "the camera" has not detected low voltage;
[0059] Step 4.6: If the cameras with a voltage greater than the fifth threshold at the current time point do not detect low voltage, it is considered that there is no low voltage in the sub-area; otherwise, it indicates that there is a "low voltage hazard" in the sub-area, and proceed to step five.
[0060] Furthermore, step five specifically includes:
[0061] Step 5.1: If a certain area is an industrial user area and a security user area, repeat step 4 to count the results of a certain period of time. If more than 50% of the results are marked as "low voltage hidden dangers exist", it is identified as a low voltage occurrence area;
[0062] Step 5.2: If a certain area is a residential user area, when more than 80% of the results are marked as "low voltage hidden danger exists", it is identified as a low voltage area;
[0063] Step 5.3: If all sub-areas in a certain area are low voltage areas, then the area is also marked as a low voltage area;
[0064] At this point, the night-time low voltage assessment of the area based on the fixed camera sensing the light brightness is completed.
[0065] A system for judging low voltage at night in a region based on fixed cameras sensing light brightness, used to execute the above method, the system comprising:
[0066] A multi-level area division module is used to divide the monitoring area into different areas of different levels according to the type of electricity users and the power supply network, until it is divided into the last level bus coverage area, and the last level bus coverage area is further divided into the smallest sub-areas;
[0067] The minimum sub-area fixed camera calibration module is used to select and calibrate multiple fixed cameras in the minimum sub-area to ensure that the camera can capture different directions in the minimum sub-area;
[0068] Sub-area historical lighting information sorting module, used to collect and sort the history of n cameras n The lighting information within the shooting range is stored in the constructed lighting database
[0069] The real-time regional light brightness determination module is used to determine the light data at the current time point based on the light data stored in the light database to determine whether the area photographed by the camera has "low voltage hidden dangers";
[0070] The regional low voltage analysis module is used to further confirm whether there is low voltage in a sub-area with "low voltage hidden dangers".
[0071] The present invention has the following beneficial effects:
[0072] 1. Divide the monitoring area into security area, industrial area and residential area, and use different thresholds to evaluate the low voltage status, so the result is more accurate;
[0073] 2. Through a series of processing methods for camera data in the area, the screening of effective cameras is realized;
[0074] 3. Night lights are defined as moving lights and fixed lights, which further improves the accuracy of the low voltage judgment method based on lights;
[0075] 4. By defining the light-wrapped area and performing a series of processing on the frame images, the fixed light can be accurately extracted;
[0076] 5. A simple and efficient lighting library was built, which records the average pixel value (representing the brightness of the light) to achieve the representation and storage of the overall brightness of the light;
[0077] 6. Full consideration is given to situations such as lights on, lights off, and lights moving, and different processing methods are adopted to effectively ensure the accuracy of judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 It is a flow chart of a method for analyzing and judging low voltage at night in an area based on a fixed camera sensing light brightness according to the present invention;
[0079] Figure 2 The present invention is a module block diagram of a regional nighttime low voltage analysis system based on a fixed camera sensing light brightness. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. The entire system is implemented in software.
[0081] like Figure 1 As shown, an embodiment of the present invention provides a method for determining low voltage in a region at night based on a fixed camera sensing light brightness, comprising the following steps:
[0082] Step 1: Multi-level area division step, which is used to divide the monitoring area into different levels of different areas according to the type of electricity users, power supply network and other information, until it is divided into the last level bus coverage area, and the last level bus coverage area is further divided into the smallest sub-area, which is convenient for the subsequent power outage analysis and judgment of each level of sub-area. The specific implementation steps are:
[0083] Step 1.1, collect and organize the power supply network diagram of the monitoring area, and organize it using a tree data structure: under the power supply bus, it is divided into a secondary bus; the secondary bus is further branched into a tertiary bus, and so on;
[0084] Step 1.2: Divide the power supply lines into multiple levels in the same manner as in step 1.1 until a bus at a certain level is connected to a specific power user, then stop dividing; at this time, assuming that there are n levels in total, then each level of bus is recorded as Bus n, where Bus1 indicates the power supply bus, Bus2 indicates the secondary bus, and so on; the corresponding bus coverage area is recorded as Area nm , where n represents the n-th level bus, and m represents the m-th bus in the n-th level bus;
[0085] Step 1.3, divide electricity users into three categories: industrial users, residential users and security users;
[0086] Step 1.4, the minimum bus coverage area (corresponding to Bus nm The last bus level) Area nm Can be further divided into Area nm1 、Area nm2 and Area nm3 , corresponding to industrial user areas, residential user areas and security user areas respectively;
[0087] At this point, the division of multi-level sub-areas is completed, with a total of n levels, where m represents the number of buses in the nth level bus; each sub-area corresponding to the terminal bus is further divided into Area nm1 、Area nm2 and Area nm3 , called the smallest sub-region.
[0088] Step 2: The minimum sub-area fixed camera calibration step is used to select and calibrate multiple fixed cameras in the minimum sub-area to ensure that the camera can capture different directions in the minimum sub-area. The specific implementation steps are as follows:
[0089] Step 2.1, collecting and organizing all camera data that can obtain observation information in real time in the smallest sub-area, wherein the camera data includes camera position information and video stream data captured by the camera;
[0090] Step 2.2: Filter the cameras that meet the requirements. The filtering method is described as follows:
[0091] a) For a certain camera, collect the video stream data from 20:00 to 24:00 on a certain night in history;
[0092] b) Take one frame of image every 1 minute, and get a total of 240 images;
[0093] c) converting the 240 images from RGB color space to grayscale space;
[0094] d) For a certain image, calculate the pixel values of all pixels and find the average value of all pixel values;
[0095] e) If the average pixel value of the image is greater than a threshold value (such as 150), it indicates that the overall shooting environment of the image is bright (possibly in an indoor lighting environment), which is defined as "unfavorable for observing light brightness" and the image is excluded;
[0096] f) Assume that the average pixel value of the image is Pix average , the number of all pixels in the image is n, then the pixel value of each pixel is recorded as Pix n ;
[0097] g) If Pix n -Pix average If the number of values greater than 100 is less than the threshold value (such as n / 200), it means that there are too few "bright pixels" in the image, and the image is excluded;
[0098] h) If, among the 240 images of a camera from 20:00 to 24:00 on a certain day, after screening in the above steps, the number of remaining images is less than 60 (1 hour data link), the data of the camera on that day is considered to be unqualified and will not be adopted;
[0099] i) If the data of a camera does not meet the requirements for more than 100 days in the past year (365 days), the data of the camera will be deemed unusable and the camera will be screened out.
[0100] Step 2.3, among the remaining valid cameras, collect the coordinates of all cameras;
[0101] Step 2.4, gridding the sub-region into n×m grid regions;
[0102] Step 2.5: To facilitate high-performance real-time computing, for each grid, at most one camera is retained and other camera data are randomly discarded;
[0103] So far, the screening of cameras in the sub-area has been completed. Assume that there are n cameras, all cameras are recorded as Camera n .
[0104] Step 3: Sub-area historical lighting information sorting step: collect and sort n cameras in history n The lighting information within the shooting range is obtained and stored in the constructed lighting database. The specific implementation steps are as follows:
[0105] Step 3.1: For each camera n(fixed position, fixed shooting angle), the targets (scenes) within the shooting angle are divided into two categories: mobile targets and fixed targets; since mobile targets usually use mobile power supply methods (car lights, mobile phone lights, etc.), they are useless for regional low voltage analysis, so it is necessary to exclude the lights of mobile targets; on the other hand, since the selected time period (20:00-24:00) is a low-light environment (night), it is impossible to separate mobile targets by high-precision background modeling of the image; the adopted method is:
[0106] a) First, for the video stream in the period of 20:00-24:00, starting from the first frame image, calculate the potential light pixels in the first frame image: the pixels whose grayscale space pixel values are greater than a threshold (such as 200);
[0107] b) Calculate the enveloping range of the light area (the light is usually composed of multiple pixels), and the outer edge of the range is the pixel whose adjacent pixels are less than a threshold (such as 200);
[0108] c) Similarly, calculate the light enveloping range in the second frame image. If the light enveloping range coincides with that in the first frame, it means that the light target has not moved during the time period between the two frames.
[0109] d) Calculate the subsequent frame images in sequence. If the light-wrapped area of a frame does not completely overlap with the previous frame image, there are three cases: light off, light on, and light moving;
[0110] e) Light off judgment: If the light envelope of a certain frame of image completely disappears compared with the previous frame, it is considered that the light is off;
[0111] f) Determination of lighting: adding a lighting area to the non-lighting area of the previous frame;
[0112] g) Determination of light movement: The light package range of the current frame moves in a certain direction, which is reflected in the outer edge of the light package range adjacent to one side of the outer pixel point changes from less than the threshold to greater than the threshold, while the inner pixel point of the other side of the outer edge of the light adjacent to one side changes from greater than the threshold to less than the threshold;
[0113] h) If the light is turned off, it means that it has not moved before it is turned off and is considered a fixed light;
[0114] i) If a light is on, it is marked as "pending state" in the current frame, and the subsequent continuous image frames determine whether it is a fixed light or a moving light;
[0115] j) For moving lights, the lights are considered to be those produced by the moving target;
[0116] At this point, the fixed lights within the observation angle of a camera can be filtered out.
[0117] Step 3.2: To facilitate the storage of lighting information in massive data (videos shot historically by multiple cameras), a lighting storage database is constructed. The construction method is as follows:
[0118] a) For a certain camera, within its observation range and observation period (20:00-24:00), record the time point and pixel value (calibrated brightness) of the fixed light;
[0119] b) To avoid the influence of certain high-brightness (high-darkness) lights: For example, a high-brightness light is normally on at a certain time period on a certain day, but is not on at a certain time period on a certain day to be predicted. Therefore, for the frame image of a certain camera at a certain time point, the pixel values of all fixed lights are calculated;
[0120] c) remove the 1 / 3 pixels with the highest pixel value and the 1 / 3 pixels with the lowest pixel value at that time point, and retain the 1 / 3 pixels in the middle of the pixel value;
[0121] d) taking the average value of the pixel values of the retained pixels;
[0122] e) Constructing a light storage database, wherein the table structure of the light storage database has three attributes: camera number, time point, and average value of light pixels at the time point.
[0123] Step 4: Real-time area light brightness determination step: Based on the light data stored in the light database, the light data at the current time point is determined. The determination method is as described in steps 4.1 to 4.5. The determination result is whether there is a low voltage condition in the area photographed by the camera. The specific implementation steps are:
[0124] Step 4.1: For the current time point, read the current frame image of each valid camera (after being screened by the method in step 2);
[0125] Step 4.2: For the current frame of any valid camera, calculate its fixed light data;
[0126] Step 4.3, according to the method in step 3, calculate the average pixel value of the fixed light in the current frame;
[0127] Step 4.4, in the light database described in step 3.2, read the average pixel value of the fixed light of the same camera in the same time period in the past 10 days;
[0128] Step 4.5: Compare the results of step 4.3 and step 4.4. If the difference between the current average pixel value and the 10 results of the comparison of the pixel values in the past 10 days is within 5%, it is determined that "the camera" has not detected low voltage;
[0129] Step 4.6: If the cameras with a current time point greater than a threshold (such as 90%) do not detect low voltage, it is considered that there is no low voltage in the sub-area; otherwise, it indicates that there is a "low voltage hazard" in the sub-area, and proceed to step five.
[0130] Step 5: Regional low voltage assessment step, used to further confirm whether there is low voltage in a sub-area with "low voltage hidden dangers". The specific implementation steps are as follows:
[0131] Step 5.1: If an area is an industrial user area or a security user area, since it is sensitive to voltage, it is necessary to repeat step 4 and count the results of a certain period of time (such as 600 seconds). If more than 50% of the results are marked as "low voltage hidden dangers", it is identified as a low voltage occurrence area;
[0132] Step 5.2: If a certain area is a residential user area, the threshold needs to be adjusted. For example, when the 80% area result is marked as "there is a low voltage hazard", it is identified as a low voltage area;
[0133] Step 5.3: If all sub-areas in a certain area are low voltage areas, then the area is also marked as a low voltage area;
[0134] At this point, the night-time low voltage assessment of the area based on fixed cameras sensing light brightness has been completed.
[0135] like Figure 2 As shown, an embodiment of the present invention further provides a system for evaluating low voltage at night in a region based on a fixed camera sensing light brightness, comprising:
[0136] Multi-level area division module 10. The main function of this module is to divide the monitoring area into different areas of different levels according to the type of electricity users, power supply network and other information, so as to facilitate the subsequent power outage analysis of each sub-area. First, collect and organize the power supply network diagram of the monitoring area, and organize it using a tree data structure: under the power supply bus, it is divided into a secondary bus; the secondary bus is further branched into a tertiary bus, and so on; then, it is divided into multiple levels of power supply lines in turn, until a certain level of bus is connected to a specific electricity user, then the division stops; at this time, assuming that there are n levels in total, then each level of bus is recorded as Bus n , where Bus1 indicates the power supply bus, Bus2 indicates the secondary bus, and so on; the corresponding bus coverage area is recorded as Area nm , where n represents the nth level bus, and m represents the mth bus in the nth level bus; at the same time, electricity users are divided into three categories: industrial users, residential users, and security users; then the minimum bus coverage area (corresponding to Bus nm The last bus level) Area nm Can be further divided into Area nm1 、Areanm2 and Area nm3 , corresponding to industrial user area, residential user area and security user area respectively; finally, the division of multi-level sub-areas is completed, with a total of n levels, where m represents the number of buses in the nth level bus; each sub-area corresponding to the terminal bus is further divided into Area nm1 、Area nm2 and Area nm3 , called the smallest sub-region.
[0137] Minimum sub-area fixed camera calibration module 20. The main function of this module is to select and calibrate multiple fixed cameras in the minimum sub-area to ensure that the camera can capture different directions in the minimum sub-area. First, collect and organize all camera data that can obtain observation information in real time in the minimum sub-area; then, it is necessary to screen cameras that meet the requirements: for a certain camera, collect video stream data from 20:00 to 24:00 on a certain night in history, take a frame of image every 1 minute, and get a total of 240 images, and convert the 240 images from RGB color space to grayscale space; for a certain image, calculate the pixel values of all pixels and find the average value of all pixel values. If the average pixel value of the image is greater than the threshold (such as 150), it means that the overall shooting environment of the image is brighter (possibly in an indoor lighting environment), which is defined as "not conducive to observing light brightness" and the image is excluded; suppose the average pixel value of the image is Pix average , the number of all pixels in the image is n, then the pixel value of each pixel is recorded as Pix n ; If Pix n -Pix average If the number of values greater than 100 is less than the threshold (such as n / 200), it means that there are too few "bright pixels" in the image and the image is excluded; if among the 240 images of a camera from 20:00 to 24:00 on a certain day in history, after screening in the above steps, the number of remaining images is less than 60 (1 hour data link), it is considered that the data of the camera on that day does not meet the requirements and will not be adopted; if the data of a camera for more than 100 days in the past year (365 days) "does not meet the requirements", it is determined that the camera data cannot be used and the camera is screened out; then, among the remaining valid cameras, the coordinates of all cameras are collected; at the same time, the sub-area is gridded and divided into n×m grid areas; to facilitate high-performance real-time computing, for each grid, at most one camera is retained, and the data of other cameras are randomly eliminated; finally, the screening of cameras in the sub-area is completed. Assuming there are n cameras, all cameras are recorded as Camera n .
[0138] Sub-area historical lighting information sorting module 30. The main function of this module is to collect and sort the historical n cameras Camera n First, for each camera, n (fixed position, fixed shooting angle), the targets (scenes) within the shooting angle are divided into two categories: mobile targets and fixed targets; because mobile targets usually use mobile power supply methods (car lights, mobile phone lights, etc.), they are useless for regional low voltage analysis, so it is necessary to exclude the lights of mobile targets; on the other hand, because the selected time period (20:00-24:00) is a low-light environment (night), it is impossible to separate mobile targets by high-precision background modeling of the image; then, in order to facilitate the storage of light information in massive data (videos shot historically by multiple cameras), a light storage database is constructed: for a certain camera, within its observation range and observation period Within the period (20:00-24:00), the time points and pixel values (calibrated brightness) of the fixed lights are recorded; to avoid the influence of certain high-brightness (high-darkness) lights: for example, a high-brightness light is normally on at a certain time period on a certain day, but is not on at a certain time period on a certain day to be predicted, so for the frame image of a certain camera at a certain time point, the pixel values of all fixed lights are calculated; then, the 1 / 3 pixels with the highest and the lowest pixel values at that time point are removed, the 1 / 3 pixels in the middle of the pixel values are retained, and the average pixel value of the retained pixels is taken; finally, the light storage database table structure is obtained: camera number, time point, and the average value of the light pixel points at that time point.
[0139] Real-time regional light brightness determination module 40. The main function of this module is to determine the light data at the current time point based on the light data stored in the light database, so as to lay the foundation for the subsequent regional low voltage determination. First, for the current time point, read the current frame image of each valid camera (after screening by the method in step 2); for the current frame of any valid camera, calculate its fixed light data; then, calculate the average pixel value of the fixed light in the current frame; then, in the light database, read the average pixel value of the fixed light of the same camera in the same time period in the past 10 days; compare the above two results, if the current average pixel value and the 10 results of the pixel value comparison in the past 10 days are within 5%, it is determined that "the camera" has not detected low voltage; if the cameras with a value greater than the threshold (such as 90%) at the current time point have not detected low voltage, it is considered that there is no low voltage in the sub-area; otherwise, it indicates that the sub-area "has a low voltage risk".
[0140] Regional low voltage analysis module 50. The main function of this module is to further confirm whether there is low voltage in a sub-area of "low voltage hidden danger". First, if an area is an industrial user area and a security user area, since it is sensitive to voltage, it is necessary to repeat step 4 and count the results of a certain period of time (such as 600 seconds). If more than 50% of the results are marked as "low voltage hidden danger", it is identified as a low voltage area; if an area is a residential user area, the threshold needs to be adjusted. For example, when 80% of the results are marked as "low voltage hidden danger", it is identified as a low voltage area; if all sub-areas in a certain area are low voltage areas, the area is also marked as a low voltage area; finally, the low voltage analysis of the area at night based on the fixed camera sensing the light brightness is completed.
[0141] Professionals may further appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to functionality. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not exceed the scope of the present invention.
[0142] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory, a memory, a read-only memory, an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0143] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for judging low voltage at night in an area based on fixed cameras sensing light brightness, characterized in that: The steps include: Step 1: Multi-level area division: the monitoring area is divided into different areas of different levels according to the type of electricity users and the power supply network, until it is divided into the last level bus coverage area, and the last level bus coverage area is further divided into the smallest sub-areas; Step 2: Calibrate the fixed camera in the smallest sub-area: In the smallest sub-area, select and calibrate multiple fixed cameras to ensure that the cameras can capture different directions in the smallest sub-area; Step 3: Organize historical lighting information of sub-areas: Collect and organize n cameras in history n The lighting information within the shooting range is collected and stored in the constructed lighting database; Step 4: Real-time regional light brightness determination: Based on the light data stored in the light database, determine the light data at the current time point to determine whether the area captured by the camera has "low voltage hidden dangers"; Step 5: Regional low voltage assessment: Further confirm whether there is low voltage in a sub-area with "low voltage risk".
2. A method for determining low voltage at night in an area based on fixed cameras sensing light brightness as described in claim 1, characterized in that: Step 1 specifically includes: Step 1.1, collect and organize the power supply network diagram of the monitoring area, and organize it using a tree data structure: under the power supply bus, it is divided into a secondary bus; the secondary bus is further branched into a tertiary bus, and so on; Step 1.2: Divide the power supply lines into multiple levels in the same manner as in step 1.1 until a bus at a certain level is connected to a specific power user, then stop dividing; at this time, assuming that there are n levels in total, each level of bus is recorded as Bus n , where Bus1 indicates the power supply bus, Bus2 indicates the secondary bus, and so on; the corresponding bus coverage area is recorded as Area nm , where n represents the n-th level bus, and m represents the m-th bus in the n-th level bus; Step 1.3, divide electricity users into three categories: industrial users, residential users and security users; Step 1.4: Cover the last level bus area nm Further divided into Area nm1 、Area nm2 and Area nm3 , corresponding to industrial user areas, residential user areas and security user areas respectively; At this point, the division of multi-level sub-areas is completed, with a total of n levels, where m represents the number of buses in the nth level bus; each sub-area corresponding to the terminal bus is further divided into Area nm1 、Area nm2 and Area nm3 , called the smallest sub-region.
3. A method for determining low voltage at night in an area based on fixed cameras sensing light brightness as claimed in claim 1, characterized in that: Step 2 specifically includes: Step 2.1, collect and organize all camera data that can obtain observation information in real time in the smallest sub-area; Step 2.2: Filter the cameras that meet the requirements. The specific screening method is as follows: a) For a certain camera, collect video stream data from 20:00 to 24:00 on a certain night in history; b) Take a frame of image every 1 minute, and get a total of 240 images; c) Convert 240 images from RGB color space to grayscale space; d) For a certain image, calculate the pixel values of all pixels and find the average value of all pixel values; e) If the average pixel value of the image is greater than the first threshold, it indicates that the overall shooting environment of the image is bright, which is defined as "unfavorable for observing light brightness" and the image is excluded; f) Let the average pixel value of the image be Pix average , the number of all pixels in the image is n, then the pixel value of each pixel is recorded as Pix n ; g) If Pix n -Pix average If the number of values greater than 100 is less than the second threshold, it indicates that there are too few "bright spot pixels" in the image, and the image is excluded; h) If, among the 240 images of a camera from 20:00 to 24:00 on a certain day, after screening in the above steps, the number of remaining images is less than 60, then the data of the camera on that day is considered to be unqualified and will not be adopted; If the data of a camera does not meet the requirements for more than 100 days in the past year, the data of the camera will be deemed unusable and the camera will be screened out; Step 2.3, among the remaining valid cameras, collect the coordinates of all cameras; Step 2.4: Grid the sub-regions and divide them into Grid area; Step 2.5: For each grid, retain at most one camera and randomly remove the data of other cameras; At this point, the screening of cameras in the sub-area is completed. Assume that there are n cameras, all cameras are recorded as Camera n .
4. A method for determining low voltage at night in an area based on fixed cameras sensing light brightness as claimed in claim 1, characterized in that: Step three specifically includes: Step 3.1: For each camera n , the targets within the shooting angle are divided into two categories: moving targets and fixed targets; first, the moving target lights are excluded, and for the video streams in the selected period 20:00-24:00 in the low-light environment, the following steps are used for processing: First, for the video stream in the 20:00-24:00 period, starting from the first frame image, Calculate potential light pixels in the first frame image: pixels whose grayscale space pixel values are greater than a third threshold; Calculate the enveloping range of the light area, where the outer edge of the range is the pixel points whose adjacent pixels are smaller than the fourth threshold; Similarly, calculate the light enveloping range in the second frame image. If the light enveloping range coincides with that in the first frame, it means that the light target has not moved during the difference period between the two frames. Calculate the subsequent frame images in sequence. If the light-wrapped area of a frame does not completely overlap with the previous frame image, there are three cases: light off, light on, and light moving; Light off judgment: If the light coverage of a certain frame of image completely disappears compared with the previous frame, it is considered that the light is off; Determination of lighting: Add a new lighting area to the non-lighting area in the previous frame; Judgment of light movement: The light package range of the current frame moves in a certain direction, which is reflected in the outer edge of the light package range adjacent to one side of the outer pixel point changes from less than the threshold to greater than the threshold, while the other side of the light outer edge adjacent to the inner pixel point changes from greater than the threshold to less than the threshold; If the light is turned off, it means that it has not moved before it is turned off, and it is considered to be a fixed light; If a light is on, it is marked as "pending state" in the current frame, and the subsequent continuous image frames determine whether it is a fixed light or a moving light; For light movement, it is considered to be the light generated by the moving target; At this point, the fixed lights within the observation angle of a camera are screened out; Step 3.2: Build the lighting database. The construction method is: a) For a certain camera, within its observation range and observation period from 20:00 to 24:00, record the time point and pixel value of the fixed light; b) For a frame image of a camera at a certain time point, calculate the pixel values of all fixed lights; c) Remove the 1 / 3 pixels with the highest pixel value and the 1 / 3 pixels with the lowest pixel value at that time point, and keep the 1 / 3 pixels in the middle; d) Take the average value of the pixel values of the retained pixels; e) Constructing a lighting database, wherein the table structure of the lighting database has three attributes: camera number, time point, and average value of light pixels at the time point.
5. The method for determining low voltage at night in an area based on fixed cameras sensing light brightness as claimed in claim 1, characterized in that: Step 4 specifically includes: Step 4.1: For the current time point, read the current frame image from each valid camera; Step 4.2: For the current frame of any valid camera, calculate its fixed light data; Step 4.3, calculate the average pixel value of the fixed light in the current frame; Step 4.4, in the light database, read the average pixel value of the fixed light of the same camera in the same time period in the past 10 days; Step 4.5: Compare the results of step 4.3 and step 4.
4. If the difference between the current average pixel value and the 10 results of the comparison of the pixel values in the past 10 days is within 5%, it is determined that "the camera" has not detected low voltage; Step 4.6: If the cameras with a voltage greater than the fifth threshold at the current time point do not detect low voltage, it is considered that there is no low voltage in the sub-area; otherwise, it indicates that there is a "low voltage hazard" in the sub-area, and proceed to step five.
6. A method for determining low voltage at night in an area based on fixed cameras sensing light brightness as claimed in claim 1, characterized in that: Step 5 specifically includes: Step 5.1: If an area is an industrial user area or a security user area, repeat step 4 to count the results of a certain period of time. If more than 50% of the results are marked as "low voltage hidden dangers", it is identified as a low voltage occurrence area. Step 5.2: If an area is a residential user area, when more than 80% of the results are marked as "low voltage potential exists", it is identified as a low voltage area; Step 5.3: If all sub-areas in a certain area are low voltage areas, then the area is also marked as a low voltage area; At this point, the night-time low voltage assessment of the area based on the fixed camera sensing the light brightness is completed.
7. A system for judging low voltage at night in a region based on fixed cameras sensing light brightness, characterized in that: For executing the method according to any one of claims 1 to 6, the system comprises: A multi-level area division module is used to divide the monitoring area into different areas of different levels according to the type of electricity users and the power supply network, until it is divided into the last level bus coverage area, and the last level bus coverage area is further divided into the smallest sub-areas; The minimum sub-area fixed camera calibration module is used to select and calibrate multiple fixed cameras in the minimum sub-area to ensure that the camera can capture different directions in the minimum sub-area; Sub-area historical lighting information sorting module, used to collect and sort the history of n cameras n The light information within the shooting range of the camera is stored in the constructed light database. The real-time regional light brightness judgment module is used to judge the light data at the current time point based on the light data stored in the light database to determine whether there is a "low voltage hidden danger" in the area shot by the camera; The regional low voltage analysis module is used to further confirm whether there is low voltage in a sub-area with "low voltage hidden dangers".
Citation Information
Patent Citations
Court low-voltage identification method and device, and terminal equipment
CN109450089A
Transformer area low-voltage prediction method and device based on big data
CN112488361A