Pipe gallery light control method and system and storage medium
By analyzing the clarity information of the monitoring video and independently controlling the rotation angle and brightness of the lighting device in the pipe corridor, the problem of over-illumination in the pipe corridor lighting system is solved, and energy saving and consumption reduction and monitoring effects are improved.
Patent Information
- Application Number
- CN202510749557.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-06
AI Technical Summary
In the existing pipeline lighting system, the unified control of multiple lighting devices leads to excessive lighting in some areas, resulting in waste of energy and increased costs.
By obtaining the monitoring video of the monitoring device, analyzing the lighting clarity information, and independently controlling the rotation angle and brightness of each lighting device to keep the video clarity within the preset range to avoid insufficient or excessive lighting.
Lighting control in different areas has been achieved, monitoring clarity has been improved, energy waste has been reduced, and costs have been reduced.
Smart Images

Figure CN120264547A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to, but is not limited to, the technical field of utility tunnel lighting control, and in particular, to a method, a system, and a storage medium for controlling the lights in a utility tunnel. Background Art
[0002] A utility tunnel is an underground comprehensive corridor for urban pipelines. Usually, a tunnel space is built underground in a city, integrating various engineering pipelines such as electricity, communication, gas, heating, and water supply and drainage. It is equipped with special inspection openings, hoisting openings, and monitoring systems, and unified planning, design, construction, and management are implemented.
[0003] However, in the existing lighting system of a utility tunnel, multiple lighting devices are controlled uniformly, which is likely to cause over-illumination in some areas, resulting in unnecessary energy waste and increased costs. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail in this document. This overview is not intended to limit the scope of protection of the claims.
[0005] The main objective of the embodiments of the present invention is to provide a method, a system, and a storage medium for controlling the lights in a utility tunnel, which can adjust the illumination levels of different areas in the utility tunnel, avoid energy waste, and save costs.
[0006] In a first aspect, an embodiment of the present invention provides a method for controlling the lights in a utility tunnel, which is applied to a utility tunnel system. The utility tunnel system includes a plurality of lighting devices and monitoring devices arranged on the utility tunnel. The plurality of monitoring devices are evenly arranged along the length direction of the utility tunnel. At least two of the lighting devices are arranged between adjacent monitoring devices. The areas of the utility tunnel captured by adjacent monitoring devices are continuous. Different lighting devices are independently controlled. The method for controlling the lights in the utility tunnel includes: Obtaining the monitoring video of the monitoring device; Determining the lighting clarity information in the utility tunnel according to the monitoring video, where the lighting clarity information represents the video clarity information of each area in the utility tunnel; Determining the rotation angle information and brightness information of at least one of the lighting devices according to the lighting clarity information; Determining the monitoring type of the monitoring device according to the monitoring area of the monitoring device and a preset type table; Determining the preset clarity range of the monitoring device according to the monitoring type and the monitoring area; Controlling the rotation angle and brightness of at least one of the lighting devices according to the rotation angle information and the brightness information, so that the video clarity indicated by the lighting clarity information is within the preset clarity range.
[0007] In some alternative embodiments, determining the lighting clarity information in the utility tunnel based on the monitoring video includes: Dividing the monitoring images corresponding to the monitoring video into a preset number of image partitions according to the areas monitored by the monitoring device; Successively calculating the clarity of each of the preset number of image partitions to obtain the image clarity corresponding to each image partition; Obtaining the utility tunnel areas corresponding to each of the image partitions; Configuring the image clarity corresponding to the same image partition as the lighting clarity information of the utility tunnel area corresponding to the same image partition.
[0008] In some alternative embodiments, successively calculating the clarity of each of the preset number of image partitions to obtain the image clarity corresponding to each image partition includes: Obtaining the monitoring priority information of the utility tunnel areas corresponding to the preset number of image partitions, where the monitoring priority information represents the priority degree of the utility tunnel areas during monitoring; Determining the processing priority of the preset number of image partitions according to the monitoring priority information; Successively calculating the clarity of the preset number of image partitions according to the processing priority to obtain the image clarity.
[0009] In some alternative embodiments, the calculation of the image clarity includes: Performing grayscale processing on the image partition to obtain a grayscale image; Calculating the gradient amplitude for each pixel in the grayscale image to obtain the gradient amplitude value; Forming a gradient matrix with the gradient amplitude values corresponding to all pixels; Calculating the average gradient value of all pixels through the gradient matrix; Calculating the gradient variance and the high-gradient pixel ratio through the gradient amplitude values corresponding to each pixel; Obtaining the first weight value corresponding to the average gradient value, the second weight value corresponding to the gradient variance, and the third weight value corresponding to the high-gradient pixel ratio; Calculating the image clarity of the image partition according to the average gradient value, the first weight value, the gradient variance, the second weight value, the high-gradient pixel ratio, and the third weight value; Superposing the image clarities of the preset number of image partitions according to the clarity weighting values determined by the processing priority to obtain the monitoring clarity, where the monitoring clarity represents the clarity of the monitoring image.
[0010] In some alternative embodiments, determining the rotation angle information and brightness information of at least one of the lighting devices according to the lighting clarity information includes: Determining the clarity weighting value of the image partition according to the image clarity and the processing priority indicated by the lighting clarity information; Determining the regulation priority of each image partition in the same monitoring image according to the clarity weighting value; Sequentially determining the rotation sub-angle and lighting sub-brightness corresponding to each image partition reaching a preset clarity range according to the regulation priority; After weighted calculation of the rotation sub-angles and lighting sub-brightness corresponding to each image partition according to the regulation priority to obtain a first rotation angle and a first brightness, the rotation angle information indicates the first rotation angle, and the brightness information indicates the first brightness.
[0011] In some alternative embodiments, after obtaining the first rotation angle and the first brightness by weighted calculation of the rotation sub-angles and lighting sub-brightness corresponding to each image partition according to the regulation priority, the method further includes: Obtaining the monitoring clarity of multiple adjacent monitoring images; Determining the lighting interference coefficient between multiple adjacent monitoring images according to the monitoring clarity; After correcting the first rotation angle and the first brightness according to the lighting interference coefficient between different monitoring images to obtain a second rotation angle and a second brightness, the rotation angle information indicates the second rotation angle, and the brightness information indicates the second brightness.
[0012] In some alternative embodiments, the pipe gallery system further includes a construction personnel detection device, and the method further includes: Detecting the personnel position information of construction personnel through the construction personnel detection device; Obtaining the construction type of construction personnel; Determining a third rotation angle of at least one of the lighting devices according to the personnel position information; Determining a third brightness of at least one of the lighting devices according to the construction type; Configuring the rotation angle of at least one of the lighting devices as the third rotation angle, and configuring the brightness of at least one of the lighting devices as the third brightness.
[0013] In a second aspect, an embodiment of the present invention provides a controller, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, it implements the pipe gallery lighting control method described in the first aspect.
[0014] In a third aspect, an embodiment of the present invention provides a corridor lighting control system, including the controller involved in the second aspect above.
[0015] In a fourth aspect, a computer storage medium stores computer-executable instructions for executing the corridor lighting control method described in the first aspect.
[0016] The beneficial effects of the present invention include: When controlling the corridor lighting, the monitoring video of the monitoring device is obtained; the lighting clarity information in the corridor is determined according to the monitoring video, and the lighting clarity information represents the video clarity information of each area in the corridor; at least one rotation angle information and brightness information of the lighting device are determined according to the lighting clarity information; the rotation angle and brightness of at least one lighting device are controlled according to the rotation angle information and the brightness information, so that the video clarity indicated by the lighting clarity information is within a preset clarity range. By obtaining the clarity of the monitoring video and adjusting the rotation angle and brightness of the lighting device according to the clarity, the insufficient or excessive lighting of the lighting device can be avoided, and the monitoring clarity is improved, and the monitoring effect is good. Therefore, the present application can adjust the lighting intensity of different areas in the corridor, has a good monitoring effect, and avoids energy waste and saves costs.
[0017] Other features and advantages of the present invention will be described in the following specification, and some will become obvious from the specification or be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the specification, claims, and drawings. Description of the Drawings
[0018] Figure 1 is a step flow block diagram of a corridor lighting control method provided by an embodiment of the present invention; Figure 2 is a schematic structural diagram of a corridor provided by an embodiment of the present invention; Figure 3 is a schematic cross-sectional view of a corridor provided by an embodiment of the present invention; Figure 4 is a schematic diagram of a controller provided by an embodiment of the present invention.
[0019] Reference numerals: Controller 1000, Processor 1100, Memory 1200; Corridor 100, Lighting device 200, Monitoring device 300, Pipeline 400. Detailed Embodiments
[0020] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0021] It should be noted that although the functional modules are divided in the device schematic diagram and the logical sequence is shown in the flowchart, in some cases, the steps shown or described can be executed in a different module division in the device or a different order in the flowchart. Terms such as "first", "second", etc. in the specification, claims or the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.
[0022] The utility tunnel 100 is the integrated underground urban pipeline corridor. The utility tunnel 100 usually constructs a tunnel space underground in the city, integrates various engineering pipelines such as electricity, communication, gas, heating, water supply and drainage, etc., and is provided with special inspection openings, hoisting openings and monitoring systems, and implements unified planning, unified design, unified construction and management.
[0023] However, in the existing lighting system of the utility tunnel 100, multiple lighting devices 200 are uniformly controlled, which is likely to cause over-illumination in some areas, thereby leading to unnecessary energy waste and increasing costs.
[0024] To solve the above existing problems, the present application provides a utility tunnel lighting control method, system and storage medium.
[0025] In the present application, a utility tunnel lighting control method, system and storage medium are provided, and will be described in detail one by one in the following embodiments.
[0026] As Figure 1 shown, an embodiment of the present invention provides a utility tunnel lighting control method, including: S100. Obtain the monitoring video of the monitoring device 300; S200. Determine the lighting clarity information in the utility tunnel 100 according to the monitoring video, where the lighting clarity information represents the video clarity information of each area in the utility tunnel 100; the video clarity information represents the clarity of the next adjacent monitoring device in the video captured by the monitoring device; S300. Determine the rotation angle information and brightness information of at least one lighting device 200 according to the lighting clarity information; S400. Determine the monitoring type of the monitoring device according to the monitoring area of the monitoring device and the preset type table; determine the preset clarity range of the monitoring device according to the monitoring type and the monitoring area; S500. Control the rotation angle and brightness of at least one lighting device 200 according to the rotation angle information and brightness information, so that the video clarity indicated by the lighting clarity information is within a preset clarity range.
[0027] It should be noted that, referring to Figures 2-3 , in the utility tunnel 100 in the embodiments of the present invention, a plurality of lighting devices 200 are provided. The lighting devices 200 are evenly arranged above the utility tunnel 100, or the corresponding number of lighting devices 200 are arranged according to the lighting requirements of different regions of the utility tunnel 100. For example, three lighting devices 200 are arranged above the area where various pipelines 400 are placed in the utility tunnel 100 or the area that needs to be monitored key points, and one lighting device 200 is arranged above the aisle or the area that does not need to be monitored key points in the utility tunnel 100; the lighting device 200 adopts a rotatable LED spotlight, and is built-in with a stepping motor and a PWM dimming module (brightness adjustment range 0% - 100%); it is deployed by segmenting the utility tunnel 100 (such as every 10 meters as a segment), and 1 - 3 lighting devices 200 are arranged in each segment, covering different regions of left, middle, and right. The monitoring device 300 is used to monitor different regions in the utility tunnel 100 in real time; the monitoring device 300 is adaptively set according to the area of the utility tunnel to be monitored, and the specific number and setting method are not limited herein; for example, the monitoring device 300 can install a high-definition network camera on the top or side wall of the utility tunnel 100. A plurality of monitoring devices are evenly arranged along the length direction of the utility tunnel, and at least two lighting devices are arranged between adjacent monitoring devices, and the areas of the utility tunnel photographed by adjacent monitoring devices are continuous, so that all areas of the utility tunnel can be monitored without dead angles. The control system of the utility tunnel lighting includes an edge computing unit: analyzing the video stream in real time to generate lighting control instructions; a communication network: connecting the lighting device 200 through protocols such as Zigbee or Modbus to achieve low-latency control.
[0028] Divide a single-frame video into N horizontal regions (such as N = 5, corresponding to left, left-middle, middle, right-middle, right of the utility tunnel 100), and M vertical regions (such as M = 3, corresponding to near, middle, far), forming an M×N grid (such as 3×5 = 15 regions). The specific values of M and N are set according to requirements and are not limited herein.
[0029] Establish a mapping table between the rotation angle, brightness of the lighting device 200 and the video region, as shown in Table 1: Table 1
[0030] Generate rotation angle and brightness commands for the corresponding lighting device 200 based on the differences in clarity and preset range among regions. Prioritize processing of regions with clarity below the lower limit or above the upper limit. If a region has low clarity due to being too dark: control the corresponding lighting device 200 to rotate towards this region and increase the brightness. If a region has low clarity due to overexposure: control the corresponding lighting device 200 to rotate away from this region and / or reduce the brightness. To avoid excessive superposition caused by adjacent lights illuminating the same region, set a minimum rotation angle difference. For each lighting device 200, use the clarity of the responsible region as a feedback signal, and calculate the adjustment amounts of brightness and rotation angle through the PID algorithm.
[0031] Calibrate the initial positions and illumination regions of the lighting devices 200, and establish a mapping relationship between the video regions and physical positions. Set the target range of clarity for each region, and configure the parameters of the PID controller.
[0032] Video acquisition: Obtain the surveillance video at a frame rate of 25fps, and take 1 frame every 1 second for analysis; the specific acquisition and analysis frequencies are set according to requirements and are not limited here. Region clarity calculation: Divide the current frame into 15 regions, and calculate the clarity of each region. Traverse all regions, mark the regions with unqualified clarity; find the corresponding lighting device 200 according to the marked regions, and generate rotation angle and brightness adjustment commands (such as Light_01 rotates 10° to the left region and the brightness increases by 15%). Send the commands to the lighting device 200 through Zigbee (only an example, not specifically limited), drive the motor to rotate and adjust the brightness. After waiting for 5 seconds (the stabilization time of the lighting device 200), acquire a new video frame and verify whether the clarity of the target region enters the preset range.
[0033] If the clarity of a region still fails to meet the standard after 3 consecutive adjustments, trigger an alarm and prompt for manual inspection (such as lamp failure, obstruction).
[0034] At night, appropriately reduce the target range of clarity and lower the overall brightness to save energy. Establish an energy consumption model for the lighting devices 200. On the premise of meeting the clarity requirements, preferentially use the proximal lamps and reduce the brightness of the distal lamps, thereby reducing energy consumption.
[0035] In some embodiments, determine the lighting clarity information in the pipe gallery 100 according to the surveillance video, including: Divide the surveillance image corresponding to the surveillance video into a preset number of image partitions according to the regions monitored by the monitoring device 300; Perform clarity calculation on the preset number of image partitions in sequence to obtain the image clarity corresponding to each image partition; Obtain the pipe gallery regions corresponding to each image partition; Configure the image sharpness corresponding to the same image partition as the lighting sharpness information of the pipe gallery area corresponding to the same image partition.
[0036] Specifically, according to the physical segmentation of the pipe gallery 100 (such as every 5 meters or 10 meters as a segment) and the cross-sectional area (such as left, middle, right), divide the monitoring image into grid partitions that correspond one-to-one with the actual pipe gallery area. Set a higher partition density (such as encrypted to 2.5 meters / segment) for key areas such as the personnel passage area and the equipment installation area, and appropriately reduce the density for non-key areas (such as empty aisles).
[0037] Specific image partitioning methods include but are not limited to: horizontal partitioning (in the length direction of the pipe gallery 100), divided according to the horizontal direction (X-axis) of the video frame. Assume that the total length of the pipe gallery area monitored by a single monitoring device 300 is 10 meters, and the horizontal direction of the monitoring frame corresponds to the physical length L. Then the width of each horizontal partition is (N is the preset number of horizontal partitions, such as N = 20, corresponding to 0.5 meters per partition). Vertical partitioning (in the cross-sectional direction of the pipe gallery 100), divided according to the vertical direction (Y-axis) of the video frame, corresponding to the left, middle, and right areas of the cross-section of the pipe gallery 100 (such as 30% on the left, 40% in the middle, 30% on the right), forming 3 vertical partitions. A horizontal N×vertical M grid (such as 20×3 = 60 partitions), and each image partition corresponds to a rectangular physical area in the pipe gallery 100 (such as 0.5 meters × the width of the pipe gallery). Multiple monitoring devices 300 monitor different areas of the pipe gallery 100, and perform corresponding image partitioning according to the pipe gallery areas monitored by each monitoring device 300; if the area monitored by the monitoring device 300 is located in an important area of the pipe gallery 100 or an area that needs to be monitored key, then perform finer partitioning on the monitoring image of the monitoring video of the monitoring device 300, and the number of image partitions is more; while the area monitored by the monitoring device 300 is located in a non-important area of the pipe gallery 100 or an area that does not need to be monitored key, then perform coarser partitioning on the monitoring image of the monitoring video of the monitoring device 300, and the number of image partitions is less; the specific number of image partitions is not limited here.
[0038] Sharpness index selection: Through the average gradient value (AG): Use the Sobel operator to calculate the average gradient value of the pixels in the partition, reflecting the sharpness of the edges; Variance of Laplacian (VLP): Calculate the variance of the Laplacian convolution result in the partition, reflecting the richness of details; Composite index: Combine AG and VLP to form a composite sharpness score S = 0.6×AG + 0.4×VLP to improve the robustness of the evaluation; The corresponding video sharpness can be obtained through the composite sharpness score, and the composite sharpness score is positively correlated with the video sharpness.
[0039] Mapping of Image Partition and Pipe Gallery Area Camera calibration: By obtaining the internal parameter matrix and external parameter matrix of the camera, the image pixel coordinates are converted into the physical coordinates of the pipe gallery 100. The pixel coordinates (x1, y1) and (x2, y2) of the upper left corner and the lower right corner of each image partition are converted into the physical area (X1, Y1, X2, Y2) in the pipe gallery 100 after calibration, where: X represents the coordinate in the length direction of the pipe gallery 100 (starting from 0); Y represents the cross-sectional coordinate of the pipe gallery 100 (for example, Y = 0 is the left wall, Y = W is the right wall, and W is the width of the pipe gallery). In an embodiment, the mapping relationship between the image partition and the physical area can be automatically calibrated regularly (such as weekly) through the lidar scan data in the pipe gallery 100 to correct the deviation caused by the displacement of the camera or the lens distortion.
[0040] The illumination clarity information of each pipe gallery area includes: area identifier, such as "X = 10 - 15 meters, Y = 2.5 - 4.5 meters"; clarity value, the calculation result of the clarity of the current image partition (such as AG = 85.2); timestamp, the data acquisition time, used to track historical changes.
[0041] Calculate the clarity for all image partitions in sequence to obtain a mapping list of partition IDs and clarity values. Find the corresponding physical area identifier of the pipe gallery 100 according to the partition ID. Store the clarity value of each pipe gallery area in the database for the lighting adjustment module to read in real time. Render the clarity of each area in the form of a heat map on the monitoring interface, where red indicates below the threshold, green indicates meeting the standard, and blue indicates above the threshold.
[0042] Dynamically adjust the partition density according to the distance of the object in the pipe gallery 100 from the camera. Double the number of partitions in the near-view area (such as within 5 meters), and halve the number of partitions in the far-view area (such as beyond 50 meters) to improve the evaluation accuracy of key areas.
[0043] Differentiated thresholds for area types: Personnel activity area: The clarity threshold is set to AG ≥ 60 (to avoid misjudgment due to walking shadows); Equipment area: The clarity threshold is set to AG ≥ 80 (to clearly see the details of the instrument); Empty area: The threshold can be relaxed to AG ≥ 40 (to reduce energy consumption).
[0044] Outlier filtering: Adopt the 3σ principle to filter outliers in the clarity calculation: If the clarity value of a certain partition deviates from the mean of the same type of area by more than 3 times the standard deviation, it is marked as invalid data and recalculated or replaced with historical valid values.
[0045] In some alternative embodiments, determine the monitoring type of the monitoring device according to the monitoring area of the monitoring device and the preset type table; determine the preset clarity range of the monitoring device according to the monitoring type and the monitoring area.
[0046] Specifically, the monitoring devices capture different areas at different positions, and the types of monitoring devices are determined according to the different captured areas. The preset type table stores the corresponding monitoring types when the monitoring devices are located at different positions and capture different areas. For example, when the monitoring device is located at the construction site in the center of the pipe gallery and the captured area is the construction area, the monitoring device type is the construction monitoring type; when the monitoring device is located at the access control at the edge of the pipe gallery and the captured area is the access control area, the monitoring device type is the access control monitoring type. The content and environment captured by the monitoring device in the captured area are different, and the required clarity standards are also different. By determining the corresponding captured content and captured environment and combining the monitoring type of the monitoring device, the preset clarity range corresponding to the corresponding monitoring device is set, that is, the adaptive adjustment of the preset clarity range corresponding to different monitoring devices, so as to meet different monitoring scenarios.
[0047] In some embodiments, calculating the image clarity corresponding to each image partition by sequentially performing clarity calculations on a preset number of image partitions includes: Obtaining the monitoring priority information of the pipe gallery area corresponding to a preset number of image partitions, where the monitoring priority information represents the priority degree of the pipe gallery area during monitoring; Determining the processing priority of a preset number of image partitions according to the monitoring priority information; After sequentially performing clarity calculations on a preset number of image partitions according to the processing priority, the image clarity is obtained.
[0048] Specifically, the monitoring priority of the pipe gallery area in this application can be comprehensively evaluated from the following dimensions: Dimension 1, functional importance: High priority: Entrance and exit of equipment room, valve control area, intersection of personnel passages; Low priority: Ordinary pipeline passage, non-main traffic area. Dimension 2, real-time event trigger: High priority: Area where personnel intrusion or equipment abnormal alarm is detected; Low priority: Normal area without events. Dimension 3, historical data statistics: High priority: Area where the number of events occurring in the past 24 hours ≥ 3 times; Low priority: Idle area without events for a long time. The specific evaluation dimensions are not limited here.
[0049] Convert the priority into a value from 0 to 100 (the higher the value, the higher the priority), as shown in Table 2: Table 2
[0050] Data acquisition method: Static priority: Predetermined by the importance of each area of the pipe gallery 100 and stored in the database.
[0051] Dynamic priority: It is generated in real time by event detection algorithms (such as intrusion detection and abnormal behavior recognition) and pushed to the clarity calculation module through a message queue. The priority of the monitoring area is comprehensively evaluated through static and dynamic priorities.
[0052] Determination of the priority for image partition processing: The monitoring priority value of the pipe gallery area is directly mapped to the processing priority of the corresponding image partition to ensure that "area priority = partition priority". Example: If the priority of the equipment control area (physical area X = 20 - 25 meters, Y = 2.5 - 4.5 meters) is 90, then the processing priority of the corresponding image partition R05 is 90.
[0053] Priority scheduling strategy: Preemptive scheduling: When the dynamic priority of a certain partition suddenly changes to 80 - 100 (such as detecting a fire alarm), immediately interrupt the calculation of the current low-priority partition and give priority to processing this partition.
[0054] Hierarchical queue: All image partitions are divided into multiple queues according to their priorities, and the clarity calculation is performed in sequence according to different priority queues. For example: High-priority queue (priority ≥ 80): Real-time processing, calculation interval ≤ 1 second; Medium-priority queue (priority 50 - 79): Polling processing, calculation interval ≤ 5 seconds; Low-priority queue (priority < 50): Process when idle, calculation interval ≥ 10 seconds.
[0055] Processing priority sorting algorithm: The highest-priority-first algorithm is adopted to sort the partitions within the same queue in descending order of priority values to ensure that high-priority partitions are calculated first.
[0056] In some embodiments, the calculation of image clarity includes: Performing grayscale processing on the image partition to obtain a grayscale image; Calculating the gradient amplitude for each pixel in the grayscale image to obtain the gradient amplitude value; Forming a gradient matrix with the gradient amplitude values corresponding to all pixels; Calculating the average gradient value of all pixels through the gradient matrix; Calculating the gradient variance and the high-gradient pixel ratio through the gradient amplitude values corresponding to each pixel; Obtaining the first weight corresponding to the average gradient value, the second weight corresponding to the gradient variance, and the third weight corresponding to the high-gradient pixel ratio; Calculating the image clarity of the image partition according to the average gradient value, the first weight, the gradient variance, the second weight, the high-gradient pixel ratio, and the third weight; The clarity of the monitored image is obtained by superimposing the clarity weighted values determined according to the processing priority for a preset number of image partitions. The monitored clarity characterizes the clarity of the monitored image.
[0057] Specifically, the image partitions are converted from the RGB color space to the grayscale space to eliminate color interference and focus on brightness changes: Y = 0.299R + 0.587G + 0.114B. Through the convolution kernel: ,
[0058] For each pixel , the horizontal gradient and the vertical gradient are calculated through the convolution kernel, and then the amplitude is synthesized:
[0059] The gradient amplitudes corresponding to all pixels form a gradient matrix: ; The average gradient value (AG, Average Gradient) of all pixels: ; where N represents the total number of pixels in the vertical direction and M represents the total number of pixels in the horizontal direction.
[0060] The calculation formula for the gradient variance is: .
[0061] High-Gradient Ratio (HGR): The proportion of high-gradient pixels (the threshold T can be set to 1.5 times the global gradient mean, that is, pixels with a gradient value greater than 1.5 times the global gradient mean are high-gradient pixels). The calculation formula for the high-gradient pixel ratio is: , where is the indicator function.
[0062] The weight coefficients corresponding to the average gradient value, gradient variance, and high-gradient pixel ratio are respectively: , , ( + + = 1). Combining them into the comprehensive clarity index S, the image clarity can be obtained:
[0063] where , , The value of is set according to requirements and is not limited here; for example, to highlight the edge strength: = 0.5, = 0.3, = 0.2. To highlight the richness of details: = 0.3, = 0.5, = 0.2.
[0064] Through Particle Swarm Optimization (PSO) or Genetic Algorithm, with the Mean Opinion Score (MOS) of manually annotated clarity as the objective function, automatically optimize the weight coefficients , , .
[0065] Convert the processing priority (P, range 0 - 100) of image partitioning into a weighted value α to reflect the contribution of the clarity of key areas to the overall monitoring clarity: (For example, priority 90 corresponds to a weighted value of 0.9); the higher the priority of the partition, the greater the impact of its clarity on the global monitoring clarity.
[0066] Suppose there are K image partitions in total, and the clarity of each partition is , and the weighted value is , then the monitoring clarity is: . Simulate the visual attention mechanism of the human eye to key areas and give priority to the clarity of high-priority areas.
[0067] To avoid large fluctuations in monitoring clarity caused by sudden changes in priority, use Exponential Weighted Moving Average (EWMA) to smooth the weighted value: , = 0.8 (smoothing coefficient).
[0068] Adaptive adjustment of gradient threshold: Global threshold: , where is the global gradient mean, is the standard deviation, is the adjustment coefficient (such as = 1.0); that is, determine the global threshold based on the monitoring image of a single monitoring device 300. Adaptive threshold for partitioning: Calculate for each individual image partition of the monitoring image to avoid ignoring regional differences in the global threshold.
[0069] By fusing the average gradient, gradient variance, high-gradient pixel ratio, and combining with the processing priority weighting, the clarity characteristics of image partitions can be comprehensively captured, while highlighting the importance of key areas. It provides a reasonable quantitative basis for the control of corridor lighting, ensuring that the lighting adjustment not only meets the global clarity requirements but also can dynamically respond to the special needs of high-priority areas.
[0070] In some alternative embodiments, determining the rotation angle information and brightness information of at least one lighting device 200 according to the lighting clarity information includes: Determining the clarity weighting value of the image partition according to the image clarity and processing priority indicated by the lighting clarity information; Determining the regulation priority of each image partition in the same monitoring image according to the clarity weighting value; Sequentially determining the rotation sub-angle and lighting sub-brightness corresponding to each image partition reaching the preset clarity range according to the regulation priority; Performing weighted calculation on the rotation sub-angle and lighting sub-brightness corresponding to each image partition according to the regulation priority to obtain a first rotation angle and a first brightness, where the rotation angle information indicates the first rotation angle and the brightness information indicates the first brightness.
[0071] Specifically, combining the image clarity of the image partition and the processing priority , calculate the clarity weighting value , the formula is: . For areas with high priority, if the clarity deviates from the preset range by the same amount, the regulation requirement is greater; similarly, for areas with the same priority, the greater the deviation of clarity, the greater the regulation requirement. Through the clarity weighting value , the regulation priority of each image partition and the regulation weighting value corresponding to the regulation priority can be determined.
[0072] Converting the clarity weighting value into the regulation priority , the rules are as follows: If < (less clear): = 100 - (the larger the value, the higher the priority); If > (overexposed): = - 100 (the larger the value, the higher the priority); If ≤ ≤ : = 0 (no regulation required).
[0073] Example: Image partition A: = 40 ( = 50), = 90, then = 40 × 0.9 = 36, = 100 - 36 = 64; Image partition B: = 160 ( = 150), = 80, then = 160 × 0.8 = 128, = 128 - 100 = 28.
[0074] Press Sort in descending order to form a regulation queue: Queue = Sort( | > 0, descending).
[0075] Single - partition regulation parameter calculation (rotor angle and illuminator brightness): Establish a response model for the lighting device 200: Fit the relationship between the rotation angle ( ) and brightness ( ) of the lighting device 200 and the partition clarity through experimental data: Rotation angle response: (where a is the angle sensitivity coefficient and b is the offset) Brightness response: (where c is the brightness sensitivity coefficient and d is the offset).
[0076] Assume the target clarity is (take the median value in the preset range, such as 100), and the current clarity is , then the required adjustment amount is: .
[0077] The rotor angle is: (restricted within the device rotation range, such as - 60° ≤ ≤ + 60°); The illuminator brightness is: (restricted within 0% - 100%).
[0078] If one image partition corresponds to multiple lighting devices 200 (such as the partition straddles the irradiation ranges of two lamps), allocate the regulation parameters in the following way: Rotation angle: Take the average of the current angles of each device, or perform weighted averaging according to the distance between the device and the partition (devices closer to the partition have higher weights).
[0079] Brightness adjustment: Allocate the adjustment amount according to the power ratio of the devices (for example, devices with higher power bear more brightness changes).
[0080] Determination of the first rotation angle and the first brightness: Determination of the weighting factor: Calculate the weighting factor according to the regulation priority : : ; For partitions with higher priorities, the contribution of their regulation parameters to the global parameters is greater.
[0081] Rotation angle and brightness synthesis: The first rotation angle ( ): ( is the current angle of the device) The first brightness ( ): ( is the current brightness of the device, limited within the range of 0% to 100%).
[0082] If multiple partitions require the device to rotate in opposite directions, take the weighted net rotation amount. If the absolute value is less than the threshold (such as 5°), then maintain the current angle. Each adjustment amplitude ≤ 15% to avoid sudden brightness changes.
[0083] Through the above method, a layer-by-layer mapping from the clarity of image partitions to the regulation parameters of the lighting device 200 can be achieved, ensuring that high-priority areas are adjusted first, multi-partition collaborative optimization, and ultimately achieving the global clarity goal. While ensuring the monitoring image quality, taking into account the motion smoothness and energy consumption efficiency of the lighting device 200, it is applicable to the dynamic lighting control scenario of the intelligent pipe gallery 100.
[0084] In some alternative embodiments, after obtaining the first rotation angle and the first brightness by weighted calculation of the rotation sub-angles and lighting sub-brightness corresponding to each image partition according to the regulation priority, the method further includes: Obtain the monitoring clarity of multiple adjacent monitoring images; Determine the lighting interference coefficient between multiple adjacent monitoring images according to the monitoring clarity; Modify the first rotation angle and the first brightness according to the lighting interference coefficient between different monitoring images to obtain the second rotation angle and the second brightness. The rotation angle information indicates the second rotation angle, and the brightness information indicates the second brightness.
[0085] Specifically, obtain the monitoring clarity of multiple adjacent monitoring images from the monitoring system. Different monitoring images are collected by monitoring devices 300 set at different positions in the pipe gallery 100. There is partial overlap between adjacent monitoring images, and their monitoring clarity can be calculated through the above calculation method.
[0086] The lighting interference coefficient is used to measure the degree of mutual influence of lighting between adjacent monitoring images. It can be calculated through the following steps: Determine the overlapping area: Find the overlapping area between adjacent monitoring images, which can be determined by the installation position and viewing angle range of the monitoring device 300.
[0087] Calculate the clarity difference of the overlapping area: For the overlapping area of adjacent surveillance images, calculate their clarity in different surveillance images respectively, and then calculate the difference between the two. Let the adjacent surveillance images and , the clarity of the overlapping area in is , in is , then the clarity difference .
[0088] Determine the lighting interference coefficient according to the clarity difference , and the following formula can be used: ; The lighting interference coefficient ranges from 0 to 1, and the larger the value, the more serious the lighting interference between adjacent surveillance images.
[0089] According to the lighting interference coefficient between different surveillance images, correct the first rotation angle and the first brightness to obtain the second rotation angle and the second brightness. If the lighting interference coefficient is large, it means that the lighting between adjacent surveillance images affects each other significantly, and a large adjustment needs to be made to the first rotation angle and the first brightness to reduce the interference; conversely, if the lighting interference coefficient is small, the adjustment amplitude is also correspondingly small.
[0090] Let the first rotation angle be , the first brightness be , the second rotation angle be , the second brightness be , the correction coefficient be (which can be adjusted according to the actual situation, for example = 0.5), then the correction formula is as follows: ; .
[0091] Among them, the correction coefficient needs to be adjusted according to the actual scenario to achieve the best lighting control effect, and the appropriate value can be determined through experiments and tests. Since the environment and lighting conditions in the pipe gallery 100 may change, it is necessary to update the surveillance clarity and lighting interference coefficient in real time, and accordingly correct the rotation angle and brightness.
[0092] Through the above steps, considering the lighting interference between adjacent surveillance images, correct the rotation angle and brightness of the lighting device 200, so as to improve the overall effect of the pipe gallery lighting and the clarity of the surveillance images.
[0093] In some optional embodiments, the pipe gallery system further includes a construction personnel detection device, and the method further includes: Detecting the location information of construction personnel through a construction personnel detection device; Get the construction type of the construction worker; Determining a third rotation angle of at least one lighting device 200 according to the personnel position information; Determining a third brightness of at least one lighting device 200 according to the construction type; The rotation angle of at least one lighting device 200 is configured to be a third rotation angle, and the brightness of at least one lighting device 200 is configured to be a third brightness.
[0094] Specifically, the construction personnel detection device includes a construction personnel positioning system and a construction type identification system. The construction personnel positioning system can use a UWB positioning base station or a Beidou differential positioning device, which is deployed on the top of the tunnel 100 to obtain the position of the positioning tag worn by the construction personnel in real time. The smart safety helmet has a built-in RFID tag, and the construction type identification system identifies the construction type (such as electrical work, pipeline installation, welding, etc.) through a card reader. Alternatively, the construction type is determined by storing or inputting a construction list into the control system in advance, and the construction personnel are identified and located through a visual detection device or an infrared detection device. The specific construction personnel positioning and construction type acquisition are not limited here.
[0095] By identifying the location of the construction workers, the corresponding lighting device 200 is controlled to follow the construction workers, thereby ensuring the lighting of the construction location and the clarity of the monitoring video, which not only facilitates the construction of the construction workers, but also ensures the monitoring effect of the construction process.
[0096] According to the lighting requirements of the construction operation, different types of target brightness are set, as shown in Table 3: Table 3
[0097] By integrating construction personnel positioning and operation type data, the tunnel lighting system can achieve intelligent response during construction, reducing energy consumption while improving construction safety. It is particularly suitable for dynamic operation needs in complex underground spaces.
[0098] The beneficial effects of the present invention include: when controlling the lights in the pipe gallery, the monitoring video of the monitoring device 300 is obtained; the lighting clarity information in the pipe gallery 100 is determined according to the monitoring video, and the lighting clarity information represents the video clarity information of each area in the pipe gallery 100; at least one lighting device 200's rotation angle information and brightness information are determined according to the lighting clarity information; the rotation angle and brightness of at least one lighting device 200 are controlled according to the rotation angle information and brightness information, so that the video clarity indicated by the lighting clarity information is within a preset clarity range. By obtaining the clarity of the monitoring video and adjusting the rotation angle and brightness of the lighting device 200 according to the clarity, the insufficient lighting or over-illumination of the lighting device 200 is avoided, and the monitoring clarity is improved, and the monitoring effect is good. Therefore, the present application can regulate the lighting intensity of different areas of the pipe gallery 100, has a good monitoring effect, and avoids energy waste and saves costs.
[0099] As Figure 4 shown, Figure 4 FIG. shows a structural block diagram of a controller 1000 according to an embodiment of the present application. The components of the controller 1000 include but are not limited to a memory 1200 and a processor 1100. The processor 1100 is connected to the memory 1200 through a bus, and the memory 1200 is used to store data.
[0100] The controller 1000 further includes an access device, which enables the controller 1000 to communicate via one or more networks. Examples of these networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device may include one or more of any type of wired or wireless network interface (for example, a Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0101] The controller 1000 can be any type of stationary or mobile electronic device, including a mobile computer or mobile electronic device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (for example, a smart phone), a wearable electronic device (for example, a smart watch, smart glasses, etc.) or other types of mobile devices, or a stationary electronic device such as a desktop computer or a PC. The controller 1000 can also be a mobile or stationary server.
[0102] Among them, the processor 1100 is used to execute the computer-executable instructions of the pipe gallery lighting control method.
[0103] The above is a schematic solution of a controller according to this embodiment. It should be noted that the technical solution of this controller and the technical solution of the above-described corridor lighting control method belong to the same concept. For the detailed content not described in the technical solution of the controller, reference can be made to the description of the technical solution of the above-described corridor lighting control method.
[0104] According to an embodiment of the present application, there is also provided a corridor lighting control system. The corridor lighting control system includes a hospital bed, and a controller 1000 is installed in the hospital bed, or the hospital bed is communicatively connected to the controller 1000 so that the hospital bed can be adjusted through the controller 1000. It should be noted that the technical solution of this corridor lighting control system and the technical solution of the above-described corridor lighting control method belong to the same concept. For the detailed content not described in the technical solution of the corridor lighting control system, reference can be made to the description of the technical solution of the above-described corridor lighting control method.
[0105] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above-described corridor lighting control method.
[0106] As a non-transitory computer-readable storage medium, a memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory can include a memory remotely located relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0107] Those of ordinary skill in the art will understand that all or some of the steps and systems disclosed in the above methods can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.
[0108] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the above embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present application.
Claims
1. A method for controlling the lights in a pipe gallery, characterized in that, Applied to a pipe gallery system, the pipe gallery system includes a plurality of lighting devices and monitoring devices arranged on the pipe gallery. The plurality of monitoring devices are evenly arranged along the length direction of the pipe gallery. At least two lighting devices are arranged between adjacent monitoring devices. The pipe gallery areas photographed by adjacent monitoring devices are continuous. Different lighting devices are independently controlled. The pipe gallery lighting control method includes: Obtain the monitoring video of the monitoring device; Determine the lighting clarity information in the pipe gallery according to the monitoring video. The lighting clarity information characterizes the video clarity information of each area in the pipe gallery. The video clarity information characterizes the clarity of the next adjacent monitoring device in the video photographed by the monitoring device; Determine the rotation angle information and brightness information of at least one lighting device according to the lighting clarity information; Determine the monitoring type of the monitoring device according to the monitoring area of the monitoring device and a preset type table; Determine the preset clarity range of the monitoring device according to the monitoring type and the monitoring area; Control the rotation angle and brightness of at least one lighting device according to the rotation angle information and the brightness information, so that the video clarity indicated by the lighting clarity information is within the preset clarity range.
2. The method for controlling the lights in the pipe gallery according to claim 1, characterized in that, The determining the lighting clarity information in the pipe gallery according to the monitoring video includes: Divide the monitoring image corresponding to the monitoring video into a preset number of image partitions according to the area monitored by the monitoring device; Perform clarity calculation on the preset number of image partitions in sequence to obtain the image clarity corresponding to each image partition; Obtain the pipe gallery area corresponding to each image partition; Configure the image clarity corresponding to the same image partition as the lighting clarity information of the pipe gallery area corresponding to the same image partition.
3. The method for controlling the lights in a utility tunnel according to claim 2, wherein The performing clarity calculation on the preset number of image partitions in sequence to obtain the image clarity corresponding to each image partition includes: Obtain the monitoring priority information of the pipe gallery areas corresponding to the preset number of image partitions. The monitoring priority information characterizes the priority degree of the pipe gallery area during monitoring; Determine the processing priority of the preset number of image partitions according to the monitoring priority information; Perform clarity calculation on the preset number of image partitions in sequence according to the processing priority to obtain the image clarity.
4. A method for controlling the lights in a utility tunnel according to claim 3, characterized in that, The calculation of the image clarity includes: Perform graying processing on the image partition to obtain a grayed image; Perform gradient calculation on each pixel in the grayed image to obtain a gradient amplitude; Form a gradient matrix with the gradient amplitudes corresponding to all pixels; Calculate the average gradient value of all pixels through the gradient matrix; Calculate the gradient variance and the high-gradient pixel ratio through the gradient amplitudes corresponding to each pixel; Obtain the first weight corresponding to the average gradient value, the second weight corresponding to the gradient variance, and the third weight corresponding to the high-gradient pixel ratio; Calculating the image sharpness of the image partition according to the average gradient value, the first weight, the gradient variance, the second weight, the high-gradient pixel ratio, and the third weight; Overlaying the image sharpness of a preset number of the image partitions according to the sharpness weighting value determined by the processing priority to obtain the monitoring sharpness, where the monitoring sharpness characterizes the sharpness of the monitoring image.
5. A method for controlling the lights in a pipe gallery according to claim 4, characterized in that, The determining the rotation angle information and the brightness information of at least one of the lighting devices according to the lighting sharpness information includes: Determining the sharpness weighting value of the image partition according to the image sharpness indicated by the lighting sharpness information and the processing priority; Determining the regulation priority of each image partition in the same monitoring image according to the sharpness weighting value; Sequentially determining the rotation sub-angle and the lighting sub-brightness corresponding to each image partition reaching a preset sharpness range according to the regulation priority; Performing weighted calculation on the rotation sub-angle and the lighting sub-brightness corresponding to each image partition according to the regulation priority to obtain a first rotation angle and a first brightness, where the rotation angle information indicates the first rotation angle and the brightness information indicates the first brightness.
6. A method for controlling the lights in a pipe gallery according to claim 5, characterized in that, After performing weighted calculation on the rotation sub-angle and the lighting sub-brightness corresponding to each image partition according to the regulation priority to obtain a first rotation angle and a first brightness, the method further includes: Obtaining the monitoring sharpness of a plurality of adjacent monitoring images; Determining the lighting interference coefficient between a plurality of adjacent monitoring images according to the monitoring sharpness; Correcting the first rotation angle and the first brightness according to the lighting interference coefficient between different monitoring images to obtain a second rotation angle and a second brightness, where the rotation angle information indicates the second rotation angle and the brightness information indicates the second brightness.
7. A method for controlling the lights in a utility tunnel according to claim 1, characterized in that, The pipe gallery system further includes a construction personnel detection device, and the method further includes: Detecting the personnel position information of the construction personnel through the construction personnel detection device; Obtaining the construction type of the construction personnel; Determining a third rotation angle of at least one of the lighting devices according to the personnel position information; Determining a third brightness of at least one of the lighting devices according to the construction type; Configuring the rotation angle of at least one of the lighting devices to the third rotation angle and configuring the brightness of at least one of the lighting devices to the third brightness.
8. A corridor lighting control system, characterized in that, Including a controller, where the controller includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements the pipe gallery lighting control method according to any one of claims 1-7.
9. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions for executing the pipe gallery lighting control method according to any one of claims 1-7.
Citation Information
Patent Citations
Illuminating system with monitoring and alarming functions
CN107420826A
Image processing method and device and electronic equipment
CN110572579A
Brightness parameter adjustment control method and device, equipment and medium
CN111447372A
Light-on control method and device of LED lamp
CN118591043A