A tunnel lighting control method, system and storage medium
By independently controlling the rotation angle and brightness of the lighting devices in the tunnel, the problem of over-lighting in the tunnel lighting system is solved, and energy saving and consumption reduction as well as improved monitoring effects are achieved.
Patent Information
- Application Number
- CN202510749557.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-06
AI Technical Summary
In the existing tunnel lighting system, the unified control of multiple lighting devices leads to over-lighting in some areas, causing energy waste and increased costs.
By acquiring surveillance videos from monitoring devices and analyzing lighting clarity information, the rotation angle and brightness of each lighting device are independently controlled to keep the video clarity within the preset range. Rotatable LED spotlights and PWM dimming modules are used, combined with edge computing and communication networks for real-time control.
It realizes the control of lighting levels in different areas of the tunnel, avoids insufficient or excessive lighting, improves monitoring clarity, saves energy and reduces costs.
Smart Images

Figure CN120264547B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to, but is not limited to, the technical field of pipe gallery lighting control, and in particular to a pipe gallery lighting control method, system, and storage medium. Background Art
[0002] A utility gallery is an integrated underground urban pipeline corridor. Typically constructed as a tunnel beneath a city, it integrates various engineering pipelines, including power, communications, gas, heating, water supply, and drainage. It features specialized inspection and lifting ports, as well as monitoring systems, and is uniformly planned, designed, constructed, and managed.
[0003] However, in the existing tunnel lighting system, multiple lighting devices are controlled in a unified manner, which can easily cause excessive lighting in some areas, leading to unnecessary energy waste and increased costs. Summary of the Invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] The main purpose of the embodiments of the present invention is to provide a tunnel lighting control method, a hospital bed and a storage medium, which can adjust the illumination of different areas of the tunnel, avoid energy waste and save costs.
[0006] In a first aspect, an embodiment of the present invention provides a tunnel lighting control method, which is applied to a tunnel system. The tunnel system includes multiple lighting devices and monitoring devices arranged on the tunnel. The multiple monitoring devices are evenly arranged along the length of the tunnel. At least two lighting devices are arranged between adjacent monitoring devices. The tunnel areas photographed by adjacent monitoring devices are continuous. Different lighting devices are independently controlled. The tunnel lighting control method includes:
[0007] Obtaining a surveillance video from the surveillance device;
[0008] Determining lighting clarity information within the tunnel based on the surveillance video, wherein the lighting clarity information represents video clarity information of each area within the tunnel;
[0009] determining rotation angle information and brightness information of at least one of the lighting devices according to the lighting clarity information;
[0010] Determining the monitoring type of the monitoring device according to the monitoring area of the monitoring device and a preset type table;
[0011] Determining a preset clarity range of the monitoring device according to the monitoring type and the monitoring area;
[0012] The rotation angle and brightness of at least one of the lighting devices 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 the preset clarity range.
[0013] In some optional embodiments, determining the lighting clarity information in the pipe gallery based on the surveillance video includes:
[0014] Dividing the surveillance image corresponding to the surveillance video into a preset number of image partitions according to the area monitored by the surveillance device;
[0015] Performing definition calculation on a preset number of image partitions in sequence to obtain image definition corresponding to each image partition;
[0016] Obtaining the pipe gallery area corresponding to each of the image partitions;
[0017] The image clarity corresponding to the same image partition is configured as the lighting clarity information of the pipe gallery area corresponding to the same image partition.
[0018] In some optional embodiments, the sequentially performing definition calculation on a preset number of image partitions to obtain the image definition corresponding to each image partition includes:
[0019] Acquire monitoring priority information of the pipe gallery area corresponding to a preset number of the image partitions, wherein the monitoring priority information represents a priority level of the pipe gallery area during monitoring;
[0020] determining processing priorities of a preset number of the image partitions according to the monitoring priority information;
[0021] The image clarity is obtained by sequentially performing clarity calculation on a preset number of image partitions according to the processing priority.
[0022] In some optional embodiments, the calculation of the image clarity includes:
[0023] Performing grayscale processing on the image partition to obtain a grayscale image;
[0024] Performing gradient calculation on each pixel in the grayscale image to obtain a gradient amplitude;
[0025] Composing a gradient matrix with the gradient magnitudes corresponding to all pixels;
[0026] Calculate the average gradient value of all pixels using the gradient matrix;
[0027] The gradient variance and the high gradient pixel ratio are calculated by the gradient amplitude corresponding to each pixel;
[0028] Obtaining a first weight corresponding to the average gradient value, a second weight corresponding to the gradient variance, and a third weight corresponding to the high gradient pixel ratio;
[0029] Calculate 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;
[0030] The image clarity of a preset number of the image partitions is superimposed with a clarity weighted value determined according to the processing priority to obtain monitoring clarity, where the monitoring clarity represents the clarity of the monitoring image.
[0031] In some optional embodiments, determining the rotation angle information and brightness information of at least one of the lighting devices according to the lighting clarity information includes:
[0032] determining the clarity weight value of the image partition according to the image clarity indicated by the illumination clarity information and the processing priority;
[0033] Determining the control priority of each of the image partitions in the same monitoring image according to the clarity weighted value;
[0034] Determining, in sequence according to the control priority, the rotation sub-angle and the illumination sub-brightness corresponding to each of the image partitions reaching a preset clarity range;
[0035] The rotation sub-angles and illumination sub-brightnesses corresponding to the respective image partitions are weightedly calculated according to the control priority to obtain a first rotation angle and a first brightness, the rotation angle information indicating the first rotation angle, and the brightness information indicating the first brightness.
[0036] In some optional embodiments, after performing weighted calculation on the rotation sub-angles and illumination sub-brightnesses corresponding to the respective image partitions according to the control priority to obtain the first rotation angle and the first brightness, the method further includes:
[0037] Acquiring the monitoring clarity of a plurality of adjacent monitoring images;
[0038] determining an illumination interference coefficient between a plurality of adjacent monitoring images according to the monitoring clarity;
[0039] The second rotation angle and the second brightness are obtained by correcting the first rotation angle and the first brightness according to the illumination interference coefficient between different monitoring images. The rotation angle information indicates the second rotation angle, and the brightness information indicates the second brightness.
[0040] In some optional embodiments, the pipe gallery system further includes a construction personnel detection device, and the method further includes:
[0041] Detecting the location information of the construction workers by the construction worker detection device;
[0042] Get the construction type of the construction worker;
[0043] determining a third rotation angle of at least one of the lighting devices according to the personnel position information;
[0044] determining a third brightness of at least one of the lighting devices according to the construction type;
[0045] The rotation angle of at least one of the lighting devices is configured to be a third rotation angle, and the brightness of at least one of the lighting devices is configured to be a third brightness.
[0046] In a second aspect, an embodiment of the present invention provides a controller comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the tunnel lighting control method described in the first aspect is implemented.
[0047] In a third aspect, an embodiment of the present invention provides a tunnel lighting control system, comprising the controller involved in the second aspect above.
[0048] In a fourth aspect, a computer storage medium stores computer-executable instructions, wherein the computer-executable instructions are used to execute the tunnel lighting control method described in the first aspect.
[0049] The beneficial effects of the present invention include: when controlling the tunnel lighting, the present invention obtains the monitoring video of the monitoring device; determines the lighting clarity information in the tunnel based on the monitoring video, and the lighting clarity information represents the video clarity information of each area in the tunnel; determines the rotation angle information and brightness information of at least one of the lighting devices based on the lighting clarity information; controls the rotation angle and brightness of at least one of the lighting devices based on 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, insufficient or excessive lighting of the lighting device is avoided, and the monitoring clarity is improved, with a good monitoring effect. Therefore, the present application can regulate the illumination of different areas in the tunnel, achieve a good monitoring effect, avoid energy waste, and save costs.
[0050] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flowchart of the steps of a tunnel lighting control method provided by an embodiment of the present invention;
[0052] Figure 2 Schematic diagram of the structure of the pipe gallery provided by an embodiment of the present invention;
[0053] Figure 3 is a schematic cross-sectional view of a pipe gallery provided in an embodiment of the present invention;
[0054] Figure 4 This is a schematic diagram of a controller provided by an embodiment of the present invention.
[0055] Reference numerals: controller 1000 , processor 1100 , memory 1200 ;
[0056] Pipe gallery 100, lighting device 200, monitoring device 300, pipeline 400. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, 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 intended to limit the present invention.
[0058] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and the like in the specification, claims, or accompanying drawings are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0059] Pipeline Gallery 100 is an integrated underground urban pipeline corridor. Typically constructed as a tunnel beneath a city, Pipeline Gallery 100 integrates various engineering pipelines, including power, communications, gas, heating, water supply, and drainage. It features dedicated inspection and lifting ports, as well as monitoring systems, and is uniformly planned, designed, constructed, and managed.
[0060] However, in the lighting system of the existing pipe corridor 100, multiple lighting devices 200 are controlled in a unified manner, which easily causes excessive lighting in some areas, thereby leading to unnecessary energy waste and increased costs.
[0061] To solve the above-mentioned problems, the present application provides a tunnel lighting control method, system and storage medium.
[0062] In this application, a tunnel lighting control method, system and storage medium are provided, which are described in detail one by one in the following embodiments.
[0063] like Figure 1 As shown, an embodiment of the present invention provides a tunnel lighting control method, comprising:
[0064] S100, obtaining monitoring video from the monitoring device 300;
[0065] S200: Determine lighting clarity information within the tunnel 100 based on the surveillance video, where the lighting clarity information represents video clarity information of each area within the tunnel 100; the video clarity information represents the clarity of the next adjacent surveillance device in the video captured by the surveillance device;
[0066] S300, determining rotation angle information and brightness information of at least one lighting device 200 according to lighting clarity information;
[0067] S400, determining a monitoring type of the monitoring device according to a monitoring area of the monitoring device and a preset type table; determining a preset clarity range of the monitoring device according to the monitoring type and the monitoring area;
[0068] S500: Control the rotation angle and brightness of at least one lighting device 200 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.
[0069] It should be noted that, referring to Figure 2-3In the embodiment of the present invention, multiple lighting devices 200 are installed within the tunnel 100. These lighting devices 200 are evenly distributed above the tunnel 100, or a corresponding number of lighting devices 200 are installed based on the lighting requirements of different areas of the tunnel 100. For example, three lighting devices 200 are installed above areas of the tunnel 100 where various pipelines 400 are located or areas requiring key monitoring, and one lighting device 200 is installed above aisles or areas within the tunnel 100 that do not require key monitoring. The lighting devices 200 utilize rotatable LED spotlights with built-in stepper motors and PWM dimming modules (brightness adjustment range 0% to 100%). They are deployed in sections of the tunnel 100 (e.g., every 10 meters), with one to three lighting devices 200 installed in each section, covering the left, center, and right areas. Monitoring devices 300 are used for real-time monitoring of different areas within the tunnel 100. Monitoring devices 300 are adaptively configured based on the tunnel area to be monitored, and the specific number and configuration are not limited herein. For example, high-definition network cameras can be installed on the top or side walls of the tunnel 100. Multiple monitoring devices are evenly spaced along the length of the tunnel, with at least two lighting devices positioned between adjacent monitoring devices. This ensures that each area of the tunnel is captured continuously, ensuring comprehensive monitoring. The tunnel lighting control system includes an edge computing unit that analyzes video streams in real time and generates lighting control commands. A communication network connects the lighting devices 200 via protocols such as Zigbee or Modbus, enabling low-latency control.
[0070] Divide a single-frame video into N horizontal regions (for example, N = 5, corresponding to the left, left center, center, right center, and right of the tunnel 100) and M vertical regions (for example, M = 3, corresponding to near, center, and far), forming an M×N grid (for example, 3×5 = 15 regions). The specific values of M and N are set according to requirements and are not limited here.
[0071] A mapping table of the rotation angle, brightness and video area of the lighting device 200 is established, as shown in Table 1:
[0072] Table 1
[0073]
[0074] Based on the difference between the clarity of each area and the preset range, the rotation angle and brightness instructions of the corresponding lighting device 200 are generated. Priority is given to areas with clarity below the lower limit or above the upper limit. If the clarity of an area is low due to being too dark: control the corresponding lighting device 200 to rotate toward the area and increase the brightness. If the clarity of an area is low due to overexposure: control the corresponding lighting device 200 to rotate away from the area, and / or reduce the brightness. To avoid excessive overlap caused by adjacent lights illuminating the same area, a minimum rotation angle difference is set. For each lighting device 200, the clarity of the responsible area is used as a feedback signal, and the brightness and rotation angle adjustment amount are calculated through the PID algorithm.
[0075] Calibrate the initial position and illumination area of each lighting device 200, establish a mapping relationship between the video area and the physical location, set the target range of clarity for each area, and configure the PID controller parameters.
[0076] Video Capture: Surveillance video is captured at a 25fps frame rate, with one frame analyzed every second. The specific acquisition and analysis frequency is set based on needs and is not specified here. Regional Clarity Calculation: The current frame is divided into 15 regions, and the clarity of each region is calculated. All regions are traversed, marking those that do not meet the clarity requirements. The corresponding lighting device 200 is searched for in each marked region, and rotation angle and brightness adjustment instructions are generated (for example, rotating Light_01 10° to the left increases the brightness by 15%). Instructions are sent to lighting device 200 via Zigbee (for example only, not specific). This drives the motor to rotate and adjust the brightness. After waiting for 5 seconds (the stabilization time for lighting device 200), a new video frame is captured to verify that the clarity of the target region is within the preset range.
[0077] If the clarity of a certain area still does not meet the standard after three consecutive adjustments, an alarm will be triggered and a manual inspection will be prompted (such as lamp failure or obstruction).
[0078] At night, the clarity target range is appropriately narrowed, reducing overall brightness to save energy. A 200-degree energy consumption model for lighting fixtures is established. While meeting clarity requirements, near-end lamps are prioritized, while reducing the brightness of far-end lamps, thereby reducing energy consumption.
[0079] In some embodiments, determining the lighting clarity information in the pipe gallery 100 based on the surveillance video includes:
[0080] Dividing the surveillance image corresponding to the surveillance video into a preset number of image partitions according to the area monitored by the surveillance device 300;
[0081] Calculating the clarity of a preset number of image partitions in sequence to obtain the image clarity corresponding to each image partition;
[0082] Obtain the pipe gallery area corresponding to each image partition;
[0083] The image clarity corresponding to the same image partition is configured as the lighting clarity information of the pipe gallery area corresponding to the same image partition.
[0084] Specifically, based on the physical segmentation of the tunnel 100 (e.g., every 5 or 10 meters) and cross-sectional areas (e.g., left, center, and right), the surveillance image is divided into grid zones corresponding to the actual tunnel areas. A higher grid density (e.g., up to 2.5 meters per section) is set for critical areas such as pedestrian and equipment installation areas, while the density is appropriately reduced in non-critical areas (e.g., open corridors).
[0085] Specific image partitioning methods include but are not limited to: horizontal partitioning (length direction of the tunnel 100), divided by the horizontal direction of the video screen (X axis), assuming that the tunnel area monitored by a single monitoring device 300 is 10 meters long, and the horizontal direction of the monitoring screen corresponds to the physical length L, then the width of each horizontal partition is (N is the preset number of horizontal partitions; for example, N=20 corresponds to a 0.5-meter partition per partition.) Vertical partitions (across the tunnel 100) are divided vertically (on the Y axis) along the video image, corresponding to the left, center, and right areas of the tunnel 100 (for example, 30% left, 40% center, and 30% right). This creates three vertical partitions. A horizontal grid of N x vertical grids (for example, 20 x 3 = 60 partitions) is formed, with each image partition corresponding to a rectangular physical area within the tunnel 100 (for example, 0.5 meters x tunnel width). Multiple monitoring devices 300 monitor different areas of the tunnel 100, and corresponding image partitions are performed according to the tunnel area monitored by each monitoring device 300; if the area monitored by the monitoring device 300 is located in an important area of the tunnel 100, or an area that requires key monitoring, the monitoring image of the monitoring video of the monitoring device 300 is partitioned more finely, and the number of image partitions is greater; and if the area monitored by the monitoring device 300 is located in a non-important area of the tunnel 100, or an area that does not require key monitoring, the monitoring image of the monitoring video of the monitoring device 300 is partitioned more coarsely, and the number of image partitions is less; the specific number of image partitions is not limited here.
[0086] Selection of clarity indicators: Through the average gradient value (AG): the Sobel operator is used to calculate the average gradient value of pixels within the partition to reflect the sharpness of the edge; Laplace variance (VLP): the variance of the Laplace convolution result within the partition is calculated to reflect the richness of details; combined indicators: AG and VLP are combined to form a composite clarity score S=0.6×AG+0.4×VLP to improve the robustness of the evaluation; the composite clarity score can correspond to the corresponding video clarity, and the composite clarity score is positively correlated with the video clarity.
[0087] Mapping of image partitions and tunnel areas
[0088] Camera calibration: By obtaining the camera's intrinsic and extrinsic parameter matrices, image pixel coordinates are converted to physical coordinates of the tunnel 100. The pixel coordinates (x1, y1) and (x2, y2) of the upper left and lower right corners of each image partition are calibrated and converted to the physical area (X1, Y1, X2, Y2) within the tunnel 100, where: X represents the longitudinal coordinate of the tunnel 100 (with the starting point at 0); Y represents the cross-sectional coordinate of the tunnel 100 (e.g., Y=0 represents the left wall, Y=W represents the right wall, and W represents the tunnel width). In one embodiment, the mapping relationship between image partitions and physical areas can be automatically calibrated using LiDAR scan data within the tunnel 100 on a regular basis (e.g., weekly) to correct for deviations caused by camera displacement or lens distortion.
[0089] The lighting clarity information for each tunnel area includes: area identification, such as "X=10-15 meters, Y=2.5-4.5 meters"; clarity value, which is the clarity calculation result of the current image partition (such as AG=85.2); and timestamp, which is the data collection time, used to track historical changes.
[0090] The clarity of all image partitions is calculated sequentially, generating a mapping between partition IDs and clarity values. The physical area identifier of the corresponding tunnel 100 is then searched for based on the partition ID. The clarity value for each tunnel area is stored in a database for real-time access by the lighting control module. The clarity of each area is rendered as a heat map on the monitoring interface, with red indicating clarity below the threshold, green indicating clarity above the threshold, and blue indicating clarity above the threshold.
[0091] The partition density is dynamically adjusted based on the distance of objects within the tunnel 100 from the camera. The number of partitions in the near-view area (such as within 5 meters) is doubled, and the number of partitions in the far-view area (such as beyond 50 meters) is halved, thereby improving the assessment accuracy of key areas.
[0092] Differentiated thresholds for area types: In personnel activity areas, the clarity threshold is set to AG ≥ 60 (to avoid misjudgment due to shadows cast by movement); in equipment areas, the clarity threshold is set to AG ≥ 80 (to clearly see instrument details); in open areas, the threshold can be relaxed to AG ≥ 40 (to reduce energy consumption).
[0093] Outlier filtering: The 3σ principle is used 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 standard deviations, it is marked as invalid data and recalculated or replaced by a historical valid value.
[0094] In some optional embodiments, the monitoring type of the monitoring device is determined according to the monitoring area of the monitoring device and a preset type table; and the preset clarity range of the monitoring device is determined according to the monitoring type and the monitoring area.
[0095] Specifically, the monitoring device captures different areas at different locations, and the type of monitoring device is determined based on the different shooting areas. The preset type table stores the monitoring types corresponding to the monitoring device at different locations and shooting areas. For example, if the monitoring device is located at the construction site in the center of the tunnel, and the shooting area is the construction area, then the monitoring device type is the construction monitoring type; if the monitoring device is located at the access control area at the edge of the tunnel, and the shooting area is the access control area, then the monitoring device type is the access control monitoring type. The content and environment captured by the monitoring device within the shooting area are different, and the required clarity standards are also different. By determining the corresponding shooting content and shooting 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 preset clarity range corresponding to different monitoring devices is adaptively adjusted to meet different monitoring scenarios.
[0096] In some embodiments, performing definition calculations on a preset number of image partitions in sequence to obtain the image definition corresponding to each image partition includes:
[0097] Obtain monitoring priority information of the pipe gallery area corresponding to a preset number of image partitions, where the monitoring priority information represents the priority of the pipe gallery area during monitoring;
[0098] determining the processing priorities of a preset number of image partitions according to the monitoring priority information;
[0099] The image clarity is obtained by sequentially calculating the clarity of a preset number of image partitions according to the processing priority.
[0100] Specifically, the monitoring priority of the tunnel area in this application can be comprehensively evaluated from the following dimensions:
[0101] Dimension 1, Functional Importance: High priority: Equipment entrances and exits, valve control areas, and personnel corridor intersections; Low priority: General pipeline corridors and non-critical traffic areas. Dimension 2, Real-time Event Triggering: High priority: Areas where intrusion is detected or equipment anomaly alarms are detected; Low priority: Normally, incident-free areas. Dimension 3, Historical Data Statistics: High priority: Areas where incidents have occurred three or more times in the past 24 hours; Low priority: Idle areas with no incidents for a long time. Specific evaluation dimensions are not limited here.
[0102] Convert the priority to a value between 0 and 100 (the higher the value, the higher the priority), as shown in Table 2:
[0103] Table 2
[0104]
[0105] Data acquisition method:
[0106] Static priority: predefined by the importance of each area of the tunnel 100 and stored in the database.
[0107] Dynamic priority: Generated in real time by event detection algorithms (such as intrusion detection and abnormal behavior identification), it is pushed to the clarity calculation module via the message queue. The priority of the monitored area is comprehensively evaluated using static and dynamic priorities.
[0108] Determine image zone processing priority: Map the monitoring priority value of the tunnel area directly to the processing priority of the corresponding image zone, ensuring that "area priority = zone priority." For example, if the equipment control zone (physical area X = 20-25 meters, Y = 2.5-4.5 meters) has a priority of 90, then the corresponding image zone R05 has a processing priority of 90.
[0109] Priority scheduling strategy:
[0110] Preemptive scheduling: When the dynamic priority of a partition suddenly changes to 80-100 (such as when a fire alarm is detected), the calculation of the current low-priority partition is immediately interrupted and the partition is processed first.
[0111] Hierarchical queue: All image partitions are divided into multiple queues according to priority, and the clarity calculation is performed in sequence according to different priority queues, such as:
[0112] High priority queue (priority ≥ 80): real-time processing, calculation interval ≤ 1 second;
[0113] Medium priority queue (priority 50-79): polling processing, calculation interval ≤ 5 seconds;
[0114] Low priority queue (priority < 50): Processed when idle, calculation interval ≥ 10 seconds.
[0115] Processing priority sorting algorithm: Use the highest priority first algorithm to sort partitions in the same queue in descending order of priority values to ensure that high-priority partitions are calculated first.
[0116] In some embodiments, the calculation of image clarity includes:
[0117] The image partitions are subjected to grayscale processing to obtain a grayscale image;
[0118] The gradient amplitude is obtained after the gradient calculation is performed on each pixel in the grayscale image;
[0119] The gradient magnitudes corresponding to all pixels form a gradient matrix;
[0120] Calculate the average gradient value of all pixels through the gradient matrix;
[0121] The gradient variance and high gradient pixel ratio are calculated by calculating the gradient amplitude corresponding to each pixel;
[0122] Obtaining a first weight corresponding to the average gradient value, a second weight corresponding to the gradient variance, and a third weight corresponding to the high gradient pixel ratio;
[0123] The image clarity of the image partition is calculated based on the average gradient value, the first weight, the gradient variance, the second weight, the high gradient pixel ratio and the third weight;
[0124] The image clarity of a preset number of image partitions is superimposed with a clarity weighted value determined according to the processing priority to obtain the monitoring clarity, which represents the clarity of the monitoring image.
[0125] Specifically, the image partition is converted from RGB color space to grayscale space to eliminate color interference and focus on brightness changes: Y=0.299R+0.587G+0.114B. Through the convolution kernel:
[0126] ,
[0127] For each pixel , calculate the horizontal gradient through the convolution kernel and vertical gradients , and then synthesize the amplitude :
[0128]
[0129] The gradient magnitudes corresponding to all pixels form a gradient matrix: ; The average gradient value of all pixels (AG, Average Gradient):
[0130] ;Wherein, N represents the total number of pixels in the vertical direction, and M represents the total number of pixels in the horizontal direction.
[0131] The calculation formula of gradient variance is: .
[0132] High-Gradient Ratio (HGR): The ratio of high-gradient pixels (the threshold T can be set to 1.5 times the global gradient mean, that is, pixels with gradient values greater than 1.5 times the global gradient mean are high-gradient pixels). The calculation formula for the high-gradient pixel ratio is: ,in, is the indicator function.
[0133] The weight coefficients corresponding to the average gradient value, gradient variance, and high gradient pixel ratio are: , , ( + + =1), and combined into a comprehensive clarity index S to obtain image clarity:
[0134]
[0135] in, , , The value is set according to the requirements and is not limited here; for example, the edge strength is: =0.5, =0.3, =0.2. Highlight the richness of details: =0.3, =0.5, =0.2.
[0136] Automatically optimize the weight coefficients using particle swarm optimization (PSO) or genetic algorithms, taking the manually annotated clarity score (MOS) as the objective function , , .
[0137] The processing priority (P, range 0-100) of the image partition is converted into a weighted value α, which reflects the contribution of the clarity of the key area to the overall monitoring clarity: (For example, a priority of 90 corresponds to a weighted value of 0.9); the higher the priority of a partition, the greater the impact of its clarity on the global monitoring clarity.
[0138] Assume there are K image partitions, and the clarity of each partition is , the weighted value is , then monitor clarity for: . It simulates the human eye's visual attention mechanism to key areas and gives priority to the clarity of high-priority areas.
[0139] To avoid excessive fluctuations in monitoring clarity caused by sudden changes in priority, the exponentially weighted moving average (EWMA) is used to smooth the weighted values: , =0.8 (smoothing coefficient).
[0140] Adaptive adjustment of gradient threshold:
[0141] Global Threshold: ,in is the global gradient mean, is the standard deviation, is the adjustment coefficient (e.g. =1.0); that is, the global threshold is determined based on the monitoring image of a single monitoring device 300. Partition adaptive threshold: The single image partition of the monitoring image is calculated separately , to avoid the global threshold ignoring regional differences.
[0142] By integrating average gradient, gradient variance, and high-gradient pixel ratio, combined with weighted processing priorities, we can comprehensively capture the clarity characteristics of image partitions while highlighting the importance of key areas. This provides a reasonable quantitative basis for tunnel lighting control, ensuring that lighting adjustments meet global clarity requirements while dynamically responding to the specific needs of high-priority areas.
[0143] In some optional embodiments, determining the rotation angle information and brightness information of at least one lighting device 200 according to the lighting clarity information includes:
[0144] determining a clarity weighted value of the image partition according to the image clarity indicated by the illumination clarity information and the processing priority;
[0145] Determine the control priority of each image partition in the same monitoring image according to the clarity weighted value;
[0146] Determine the rotation sub-angle and illumination sub-brightness corresponding to each image partition reaching a preset clarity range according to the control priority;
[0147] The rotation sub-angles and illumination sub-brightnesses corresponding to the respective image partitions are weightedly calculated according to the control 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.
[0148] Specifically, the image clarity is combined with the image partition and processing priority , calculate the clarity weighted value , the formula is: For areas with high priority, if the clarity deviates from the preset range by the same amount, the greater the control demand; similarly, for areas with the same priority, the greater the clarity deviation, the greater the control demand. The control priority of each image partition and the control weight value corresponding to the control priority can be determined.
[0149] Converting clarity weights to control priorities , the rules are as follows:
[0150] like < (Not clear): =100− (The larger the value, the higher the priority);
[0151] like > (Overexposure): = −100 (the larger the value, the higher the priority);
[0152] like ≤ ≤ : =0 (no regulation required).
[0153] 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.
[0154] according to Arrange in descending order to form a control queue: Queue=Sort( ∣ >0,descending).
[0155] Calculation of single-zone control parameters (rotation angle and illumination brightness):
[0156] Establishing the response model of the lighting device 200: Fitting the rotation angle of the lighting device 200 by experimental data ( ) and brightness ( ) and partition clarity:
[0157] Rotation angle response: (where a is the angle sensitivity coefficient and b is the offset)
[0158] Brightness response: (where c is the brightness sensitivity coefficient and d is the offset).
[0159] Assume that the target clarity is (Take the value in the preset range, such as 100), the current definition is , then the demand adjustment is: .
[0160] Rotator Angle for: (Limited to the device rotation range, such as −60°≤ ≤+60°);
[0161] Illumination brightness for: (Limited to 0% to 100%).
[0162] If an image partition corresponds to multiple lighting devices 200 (e.g., a partition spans the illumination range of two lamps), the control parameters are allocated as follows:
[0163] Rotation angle: Take the average of the current angles of each device, or take a weighted average based on the distance between the device and the partition (closer devices have higher weights).
[0164] Brightness adjustment: The adjustment amount is distributed according to the power ratio of the device (for example, the device with higher power will bear more brightness changes).
[0165] The first rotation angle and the first brightness are determined:
[0166] Weighting factor determination: Based on control priority Calculate weighting factors :
[0167] ; The higher the priority of a partition, the greater the contribution of its control parameters to the global parameters.
[0168] Rotation angle and brightness synthesis: the first rotation angle ( ): ( is the current angle of the device)
[0169] First brightness ( ): ( is the current brightness of the device, limited to 0% to 100%).
[0170] If multiple zones require the device to rotate in opposite directions, the weighted net rotation is calculated. If the absolute value is less than a threshold (e.g., 5°), the current angle is maintained. Each adjustment should be ≤15% to avoid sudden changes in brightness.
[0171] The above method achieves a layer-by-layer mapping from image partition clarity to control parameters of the lighting device 200, ensuring that high-priority areas are adjusted first and that multiple partitions are collaboratively optimized, ultimately achieving the overall clarity goal. While ensuring monitoring image quality, it also takes into account the smoothness and energy efficiency of the lighting device 200, making it suitable for dynamic lighting control scenarios in intelligent pipe corridors 100.
[0172] In some optional embodiments, after performing weighted calculation on the rotation sub-angles and illumination sub-brightnesses corresponding to the respective image partitions according to the control priority to obtain the first rotation angle and the first brightness, the method further includes:
[0173] Obtaining the surveillance clarity of multiple adjacent surveillance images;
[0174] determining an illumination interference coefficient between a plurality of adjacent surveillance images according to surveillance clarity;
[0175] The second rotation angle and the second brightness are obtained by correcting the first rotation angle and the first brightness according to the illumination interference coefficient between different monitoring images. The rotation angle information indicates the second rotation angle, and the brightness information indicates the second brightness.
[0176] Specifically, the monitoring clarity of multiple adjacent monitoring images is obtained from the monitoring system. Different monitoring images are collected by monitoring devices 300 installed at different locations in the tunnel 100. Adjacent monitoring images have some overlapping areas, and their monitoring clarity can be calculated using the above calculation method.
[0177] The lighting interference coefficient is used to measure the degree of mutual influence of lighting between adjacent surveillance images. It can be calculated by the following steps:
[0178] 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.
[0179] Calculate the clarity difference of overlapping areas: For the overlapping areas of adjacent surveillance images, calculate their clarity in different surveillance images respectively, and then calculate the difference between the two. and , the overlapping area is The clarity in ,exist The clarity in , the clarity difference .
[0180] Determining the illumination interference coefficient based on the difference in clarity , the following formula can be used:
[0181] ;
[0182] Illumination interference coefficient The value range is between 0 and 1. The larger the value, the more serious the lighting interference between adjacent surveillance images.
[0183] Based on the illumination interference coefficient between different surveillance images, the first rotation angle and first brightness are corrected to obtain a second rotation angle and second brightness. If the illumination interference coefficient is large, it indicates that the illumination between adjacent surveillance images significantly affects each other, and a larger adjustment to the first rotation angle and first brightness is required to reduce interference. Conversely, if the illumination interference coefficient is small, the adjustment is also smaller.
[0184] Let the first rotation angle be , the first brightness is , the second rotation angle is , the second brightness is , the correction factor is (It can be adjusted according to actual conditions, for example =0.5), the correction formula is as follows:
[0185] ;
[0186] .
[0187] Among them, the correction coefficient It needs to be adjusted according to the actual scene to achieve the best lighting control effect. The appropriate lighting control effect can be determined through experiments and tests. Since the environment and lighting conditions in the tunnel 100 may change, it is necessary to update the monitoring clarity and lighting interference coefficient in real time, and to correct the rotation angle and brightness accordingly.
[0188] Through the above steps, the rotation angle and brightness of the lighting device 200 are corrected while taking into account the interference of adjacent monitoring image lighting, thereby improving the overall effect of the corridor lighting and the clarity of the monitoring image.
[0189] In some optional embodiments, the pipe gallery system further includes a construction personnel detection device, and the method further includes:
[0190] Detecting the location information of construction workers through a construction worker detection device;
[0191] Get the construction type of the construction worker;
[0192] determining a third rotation angle of at least one lighting device 200 according to the personnel position information;
[0193] determining a third brightness of at least one lighting device 200 according to the construction type;
[0194] 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.
[0195] Specifically, the construction worker detection device includes a construction worker positioning system and a construction type identification system. The construction worker positioning system can use a UWB positioning base station or Beidou differential positioning equipment, deployed at the top of the tunnel 100, to obtain the real-time location of the positioning tags worn by construction workers. Smart hard hats have built-in RFID tags, and the construction type identification system uses a card reader to identify the construction type (such as electrical work, pipe installation, welding, etc.). Alternatively, the construction type can be determined by pre-stored or inputted construction checklists into the control system. Meanwhile, visual detection devices or infrared detection devices are used to identify and locate construction workers. The specific methods for locating construction workers and obtaining construction type information are not limited here.
[0196] 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.
[0197] According to the lighting requirements of construction operations, different types of target brightness are set, as shown in Table 3:
[0198] Table 3
[0199]
[0200] By integrating construction worker positioning and operation type data, the tunnel lighting system can achieve intelligent response during construction, improving construction safety while reducing energy consumption. It is particularly suitable for the dynamic operation needs of complex underground spaces.
[0201] The beneficial effects of the present invention include: when controlling the tunnel lighting, the present invention obtains the monitoring video of the monitoring device 300; determines the lighting clarity information in the tunnel 100 based on the monitoring video, and the lighting clarity information represents the video clarity information of each area in the tunnel 100; determines the rotation angle information and brightness information of at least one lighting device 200 based on the lighting clarity information; controls the rotation angle and brightness of at least one lighting device 200 based on 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, insufficient or excessive lighting of the lighting device 200 is avoided, and the monitoring clarity is improved, with a good monitoring effect. Therefore, the present application can regulate the illumination of different areas of the tunnel 100, achieve a good monitoring effect, avoid energy waste, and save costs.
[0202] like Figure 4 As shown, Figure 41 shows a 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 and the memory 1200 are connected via a bus, and the memory 1200 is used to store data.
[0203] The controller 1000 also includes an access device that enables the controller 1000 to communicate via one or more networks. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a 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 network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide 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 the like.
[0204] The controller 1000 may be any type of stationary or mobile electronic device, including a mobile computer or mobile electronic device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable electronic device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary electronic device such as a desktop computer or PC. The controller 1000 may also be a mobile or stationary server.
[0205] The processor 1100 is used to execute computer executable instructions of the tunnel lighting control method.
[0206] The above is a schematic diagram of a controller of this embodiment. It should be noted that the technical solution of this controller is based on the same concept as the technical solution of the tunnel lighting control method described above. For details not described in detail in the technical solution of the controller, please refer to the description of the technical solution of the tunnel lighting control method described above.
[0207] According to one embodiment of the present application, a tunnel lighting control system is also provided. The tunnel lighting control system includes a hospital bed, in which a controller 1000 is installed, or the hospital bed and the controller 1000 are connected via communication, so that the hospital bed can be adjusted via the controller 1000. It should be noted that the technical solution of the tunnel lighting control system and the technical solution of the tunnel lighting control method described above are based on the same concept. For details not described in detail in the technical solution of the tunnel lighting control system, please refer to the description of the technical solution of the tunnel lighting control method described above.
[0208] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned tunnel lighting control method is implemented.
[0209] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely illustrative, wherein 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 may be selected according to actual needs to achieve the purpose of the present embodiment.
[0210] Those skilled in the art will appreciate that all or some of the steps and systems described above can be implemented as software, firmware, hardware, or any combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term computer storage media encompasses 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 (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, 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. Furthermore, as is well known to those skilled 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 transport mechanism, and may include any information delivery media.
[0211] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the art can also make various equivalent modifications or substitutions under the shared conditions that do not violate the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A tunnel lighting control method, 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 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, and different lighting devices are independently controlled. The pipe gallery lighting control method includes: Obtaining a surveillance video from the surveillance device; Determining lighting clarity information in the tunnel based on the monitoring video, wherein the lighting clarity information represents video clarity information of each area in the tunnel; the video clarity information represents the clarity of the next adjacent monitoring device in the video captured by the monitoring device; Determining the rotation angle information and brightness information of at least one of the lighting devices according to the lighting clarity information; specifically comprising: determining the control priority of each image partition in the same surveillance image according to the lighting clarity information and the processing priority, determining the rotation sub-angle and lighting sub-brightness corresponding to each of the image partitions reaching a preset clarity range according to the control priority, performing weighted calculation on the rotation sub-angle and lighting sub-brightness corresponding to each of the image partitions according to the control priority to obtain a first rotation angle and a first brightness, the rotation angle information indicating the first rotation angle, and the brightness information indicating the first brightness; wherein the processing priority is obtained by simulating the visual attention mechanism of the human eye to the key area, giving priority to the clarity of the high-priority area; Determining the monitoring type of the monitoring device according to the monitoring area of the monitoring device and a preset type table; Determining a preset clarity range of the monitoring device according to the monitoring type and the monitoring area; The rotation angle and brightness of at least one of the lighting devices 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 the preset clarity range.
2. A tunnel lighting control method according to claim 1, characterized in that: Determining the lighting clarity information in the pipe gallery according to the monitoring video includes: Dividing the surveillance image corresponding to the surveillance video into a preset number of image partitions according to the area monitored by the surveillance device; Performing definition calculation on a preset number of image partitions in sequence to obtain image definition corresponding to each image partition; Obtaining the pipe gallery area corresponding to each of the image partitions; The image clarity corresponding to the same image partition is configured as the lighting clarity information of the pipe gallery area corresponding to the same image partition.
3. A tunnel lighting control method according to claim 2, characterized in that: The sequentially performing definition calculation on a preset number of image partitions to obtain image definition corresponding to each image partition includes: Acquire monitoring priority information of the pipe gallery area corresponding to a preset number of the image partitions, wherein the monitoring priority information represents a priority level of the pipe gallery area during monitoring; determining processing priorities of a preset number of the image partitions according to the monitoring priority information; The image clarity is obtained by sequentially performing clarity calculation on a preset number of image partitions according to the processing priority.
4. A tunnel lighting control method according to claim 3, characterized in that: The calculation of the image clarity includes: Performing grayscale processing on the image partition to obtain a grayscale image; Performing gradient calculation on each pixel in the grayscale image to obtain a gradient amplitude; Composing a gradient matrix with the gradient magnitudes corresponding to all pixels; Calculate the average gradient value of all pixels using the gradient matrix; The gradient variance and the high gradient pixel ratio are calculated by the gradient amplitude corresponding to each pixel; Obtaining a first weight corresponding to the average gradient value, a second weight corresponding to the gradient variance, and a third weight corresponding to the high gradient pixel ratio; Calculate 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 image clarity of a preset number of the image partitions is superimposed with a clarity weighted value determined according to the processing priority to obtain monitoring clarity, where the monitoring clarity represents the clarity of the monitoring image.
5. A tunnel lighting control method according to claim 4, characterized in that: The determining of the control priority of each image partition in the same surveillance image according to the lighting clarity information and the processing priority includes: determining the clarity weight value of the image partition according to the image clarity indicated by the illumination clarity information and the processing priority; The control priority of each image partition in the same monitoring image is determined according to the clarity weighted value.
6. A tunnel lighting control method according to claim 5, characterized in that: After performing weighted calculation on the rotation sub-angles and illumination sub-brightnesses corresponding to the respective image partitions according to the control priority to obtain the first rotation angle and the first brightness, the method further includes: Acquiring the monitoring clarity of a plurality of adjacent monitoring images; determining an illumination interference coefficient between a plurality of adjacent monitoring images according to the monitoring clarity; The second rotation angle and the second brightness are obtained by correcting the first rotation angle and the first brightness according to the illumination interference coefficient between different monitoring images. The rotation angle information indicates the second rotation angle, and the brightness information indicates the second brightness.
7. A tunnel lighting control method 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 location information of the construction workers by the construction worker detection device; Get the construction type of the construction worker; 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; The rotation angle of at least one of the lighting devices is configured to be a third rotation angle, and the brightness of at least one of the lighting devices is configured to be a third brightness.
8. A tunnel lighting control system, characterized in that: The method comprises a controller, wherein the controller comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for controlling the pipe corridor lighting according to any one of claims 1 to 7 is implemented.
9. A computer storage medium, characterized in that The computer storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the pipe gallery lighting control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method and device and electronic equipment
CN110572579A
Light-on control method and device of LED lamp
CN118591043A