A signal light state monitoring method and device, electronic equipment and storage medium

By acquiring traffic light images and calculating the average brightness to set detection parameters, and deleting lit areas that do not meet the threshold range, the real-time and accuracy issues of traffic light fault monitoring are solved, and efficient monitoring of traffic light status is achieved.

CN115797322BActive Publication Date: 2026-02-03HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211658583.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-22
Publication Date
2026-02-03
Estimated Expiration
2042-12-22

AI Technical Summary

Technical Problem

Traffic lights are susceptible to malfunctions due to environmental factors, leading to traffic congestion and even accidents. Existing technology makes it difficult to monitor their lighting status in real time.

Method used

By acquiring the image of the traffic light to be detected, the lighting information is determined, the average brightness of the pixels is calculated, detection parameters and threshold ranges are set, lighting areas that do not meet the threshold ranges are deleted, and the lighting status is determined based on the retained information.

Benefits of technology

It enables real-time monitoring of traffic light illumination status, improves the accuracy of illumination information, reduces false detections, and closely approximates the actual illumination status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115797322B_ABST
    Figure CN115797322B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a signal lamp state monitoring method and device, electronic equipment and storage medium, the method comprises: acquiring the to-be-detected image about the target signal lamp according to the specified detection period, and determining the light-on information of the to-be-detected image; calculating the average value of the brightness of each pixel point in the to-be-detected image, and determining the detection parameter and the detection threshold interval about the to-be-detected image based on the average value; for each light-on region, based on the numerical relationship between the pixel value of each pixel point in the light-on region and the detection parameter, determine the detection feature of the light-on region; delete the position information and the light-on color of each light-on region in the light-on information, which does not satisfy the detection threshold interval; determine the light-on state of the target signal lamp in the to-be-detected image based on the retained light-on information. By applying the embodiments of the present application, the light-on state of the signal lamp can be monitored in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image detection technology, and in particular to a method, apparatus, electronic device, and storage medium for monitoring the status of traffic lights. Background Technology

[0002] Traffic lights are an important tool for road traffic control. However, because traffic lights are mostly installed outdoors and operate continuously around the clock, they are susceptible to environmental factors and may malfunction, such as all lights going out or different colored lights illuminating simultaneously. Traffic light malfunctions can easily lead to traffic congestion and even traffic accidents. Therefore, it is necessary to monitor the lighting status of traffic lights in order to detect malfunctions promptly. Summary of the Invention

[0003] The purpose of this application is to provide a traffic light status monitoring method, device, electronic device, and storage medium to monitor the lighting status of traffic lights in real time. The specific technical solution is as follows:

[0004] In a first aspect, embodiments of this application provide a method for monitoring the status of a traffic light, the method comprising:

[0005] According to a specified detection cycle, acquire the image to be detected of the target traffic light and determine the lighting information of the image to be detected; wherein, the lighting information includes: the position information of each lighting area in the image to be detected, and the lighting color of each lighting area;

[0006] Calculate the average brightness of each pixel in the image to be detected, and determine the detection parameters and detection threshold range for the image to be detected based on the average value;

[0007] For each illuminated area, the detection features of that illuminated area are determined based on the relationship between the pixel values ​​of each pixel in that illuminated area and the numerical values ​​of the detection parameters.

[0008] Delete the location information and lighting color of each lighting area in the lighting information where the detection feature does not meet the detection threshold range;

[0009] Based on the retained lighting information, the lighting status of the target signal light in the image to be detected is determined.

[0010] Optionally, in one specific implementation, the detection parameters include: a first parameter and a second parameter; the step of determining the detection features of each illuminated area based on the numerical relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters includes:

[0011] For each illuminated area, a first number of pixels in the illuminated area whose all color channel values ​​are greater than the first parameter is determined, and the ratio of the first number to the total number of pixels in the illuminated area is determined as the first detection feature.

[0012] For each illuminated area, a second number of pixels in that illuminated area with at least one color channel value greater than the second parameter is determined, and the ratio of the second number to the total number of pixels is determined as a second detection feature.

[0013] Optionally, in one specific implementation, the detection threshold interval includes: a first threshold interval and a second threshold interval; in deleting the lighting information, the location information and lighting color of each lighting area whose detection features do not satisfy the detection threshold interval include:

[0014] Delete the location information and lighting color of each lighting area other than the target lighting area from the lighting information;

[0015] The target lighting area is defined as the lighting area where the first detection feature belongs to the first threshold interval and the second detection feature belongs to the second threshold interval.

[0016] Optionally, in one specific implementation, determining the lighting information of the image to be detected includes:

[0017] Based on preset traffic light area information, a target area related to the target traffic light is extracted from the image to be detected;

[0018] Lighting information is detected in the target area to obtain the lighting information of the image to be detected.

[0019] Optionally, in one specific implementation, the method further includes:

[0020] For each illuminated area retained in the illumination information, the target center position of the illuminated area is determined according to the position information of the illuminated area, and the preset center position of the illuminated area is determined according to the signal light area information.

[0021] For each illuminated area retained in the illumination information, calculate the positional deviation between the target center position of the illuminated area and the preset center position of the illuminated area;

[0022] The average value of the obtained positional deviations is used as the target offset of the next frame of the image to be detected.

[0023] The step of cropping a target region related to the traffic light from the image to be detected based on preset traffic light region information includes:

[0024] Based on the preset traffic light area information and the target offset determined based on the previous frame of the image to be detected, the target area related to the traffic light is extracted from the image to be detected.

[0025] Optionally, in one specific implementation, the method further includes:

[0026] For each first preset cycle, the fault detection result of the signal light within that first preset cycle is determined based on the lighting status of each light within that first preset cycle.

[0027] Optionally, in one specific implementation, the method further includes:

[0028] For each second preset cycle, the target detection result of the signal light within the second preset cycle is determined based on the various fault detection results determined within that second preset cycle.

[0029] Wherein, the second preset period is greater than the first preset period, and the second preset period is an integer multiple of the first preset period.

[0030] Optionally, in one specific implementation, the method further includes:

[0031] If the target detection result indicates that the signal light is faulty, an alarm signal is output.

[0032] Secondly, embodiments of this application provide a traffic light status monitoring device, the device comprising:

[0033] The information determination module is used to acquire an image of a target traffic light to be detected according to a specified detection cycle, and determine the lighting information of the image to be detected; wherein, the lighting information includes: the position information of each lighting area in the image to be detected, and the lighting color of each lighting area;

[0034] The parameter determination module is used to calculate the average brightness of each pixel in the image to be detected, and to determine the detection parameters and detection threshold range for the image to be detected based on the average value.

[0035] The feature determination module is used to determine the detection features of each illuminated area based on the numerical relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters.

[0036] The information deletion module is used to delete the location information and lighting color of each lighting area in the lighting information where the detection feature does not meet the detection threshold range;

[0037] The status determination module is used to determine the lighting status of the target signal light in the image to be detected based on the retained lighting information.

[0038] Optionally, in one specific implementation, the detection parameters include: a first parameter and a second parameter; the feature determination module is specifically used for:

[0039] For each illuminated area, a first number of pixels in the illuminated area whose all color channel values ​​are greater than the first parameter is determined, and the ratio of the first number to the total number of pixels in the illuminated area is determined as the first detection feature.

[0040] For each illuminated area, a second number of pixels in that illuminated area with at least one color channel value greater than the second parameter is determined, and the ratio of the second number to the total number of pixels is determined as a second detection feature.

[0041] Optionally, in one specific implementation, the detection threshold interval includes: a first threshold interval and a second threshold interval; the information deletion module is specifically used for:

[0042] Delete the location information and lighting color of each lighting area other than the target lighting area from the lighting information;

[0043] The target lighting area is defined as the lighting area where the first detection feature belongs to the first threshold interval and the second detection feature belongs to the second threshold interval.

[0044] Optionally, in one specific implementation, the information determination module includes:

[0045] The region cropping submodule is used to crop a target region about the traffic light in the image to be detected based on preset traffic light region information;

[0046] The information detection submodule is used to detect the lighting information of the target area to obtain the lighting information of the image to be detected.

[0047] Optionally, in one specific implementation, the apparatus further includes:

[0048] The location determination module is used to determine the target center position of each illuminated area retained in the illumination information based on the location information of the illuminated area, and to determine the preset center position of the illuminated area based on the signal light area information.

[0049] The deviation calculation module is used to calculate the positional deviation between the target center position and the preset center position of each lighting area retained in the lighting information.

[0050] The mean calculation module is used to calculate the average value of the obtained positional deviations, which is used as the target offset of the next frame of the image to be detected.

[0051] The region capture submodule is specifically used for:

[0052] Based on the preset traffic light area information and the target offset determined based on the previous frame of the image to be detected, the target area related to the traffic light is extracted from the image to be detected.

[0053] Optionally, in one specific implementation, the apparatus further includes:

[0054] The first result determination module is used to determine the fault detection result of the signal light within each first preset period based on the lighting status determined within that first preset period.

[0055] Optionally, in one specific implementation, the apparatus further includes:

[0056] The second result determination module is used to determine the target detection result of the signal light in each second preset period based on the fault detection results determined in the second preset period.

[0057] Wherein, the second preset period is greater than the first preset period, and the second preset period is an integer multiple of the first preset period.

[0058] Optionally, in one specific implementation, the apparatus further includes:

[0059] The signal output module is used to output an alarm signal if the target detection result indicates that the signal light is faulty.

[0060] Thirdly, embodiments of this application provide an electronic device, including:

[0061] Memory, used to store computer programs;

[0062] When the processor executes a program stored in the memory, it implements any of the signal light status monitoring methods provided in the first aspect above.

[0063] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the signal light status monitoring methods provided in the first aspect above.

[0064] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the signal light status monitoring methods provided in the first aspect above.

[0065] Beneficial effects of the embodiments in this application:

[0066] As can be seen from the above, when monitoring the status of traffic lights using the scheme provided in this application, an image of the target traffic light can be acquired according to a specified detection cycle, and the lighting information of the image can be determined. The lighting information includes the position information of each lit area in the image and the lighting color of each lit area. Then, the average brightness of each pixel in the image is calculated, and detection parameters and a detection threshold range are determined based on this average value. For each lit area, the detection features of that area are determined based on the relationship between the pixel values ​​of each pixel in that area and the numerical values ​​of the detection parameters. Then, the position information and lighting color of each lit area whose detection features do not meet the detection threshold range can be deleted from the lighting information. Based on the retained lighting information, the lighting status of the target traffic light in the image can be determined.

[0067] Based on this, by applying the solution provided in the embodiments of this application, the lighting information of the target traffic light in the image to be detected can be determined according to a specified detection cycle, thereby determining the lighting status of the target traffic light and realizing real-time monitoring of the lighting status of the traffic light. Furthermore, since the average brightness of each pixel in the image to be detected is correlated with the ambient light conditions of the traffic light when the image was acquired, and the detection parameters and detection threshold range are determined based on the average brightness of each pixel in the image to be detected, and the detection features of each lit area are determined based on the numerical relationship between the pixel values ​​of each pixel in the lit area and the detection parameters, lit areas whose detection features do not meet the detection threshold range are very likely to be falsely detected lit areas, rather than actual lit areas of the traffic light. Therefore, deleting the position information and lit color of lit areas whose detection features do not meet the detection threshold range from the lit information can remove falsely detected lit areas, improve the accuracy of the retained lit information, and thus make the determination of the lit state of the target traffic light in the image to be detected based on the retained lit information more accurate and closer to the actual lit state of the target traffic light.

[0068] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0069] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0070] Figure 1 This is a schematic flowchart of a traffic light status monitoring method provided in an embodiment of this application;

[0071] Figure 2 This is another flowchart illustrating the traffic light status monitoring method provided in this application embodiment;

[0072] Figure 3 This is another flowchart illustrating the traffic light status monitoring method provided in this application embodiment;

[0073] Figure 4 This is another schematic flowchart illustrating the traffic light status monitoring method provided in the embodiments of this application;

[0074] Figure 5 This is another schematic flowchart illustrating the traffic light status monitoring method provided in the embodiments of this application;

[0075] Figure 6 This is a schematic diagram of the structure of a traffic light status monitoring device provided in an embodiment of this application;

[0076] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0077] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0078] Traffic light malfunctions can easily lead to traffic congestion and even traffic accidents. Therefore, it is necessary to monitor the lighting status of traffic lights in order to detect malfunctions in a timely manner.

[0079] This application provides a method for monitoring the status of traffic lights.

[0080] This method is applicable to scenarios involving status monitoring of various traffic lights. These traffic lights can be road intersection traffic lights, flashing warning traffic lights, road and railway level crossing traffic lights, etc., and this application does not specifically limit their application.

[0081] Furthermore, this method can be applied to various electronic devices capable of image processing. The electronic device can be an image acquisition device with image processing capabilities, or any other device capable of image processing that has a communication connection with the image acquisition device. Moreover, the electronic device can be a standalone electronic device or a cluster of multiple electronic devices; this application does not specifically limit this, and will be referred to as an electronic device.

[0082] The traffic light status monitoring method provided in this application embodiment may include the following steps:

[0083] According to a specified detection cycle, acquire the image to be detected of the target traffic light and determine the lighting information of the image to be detected; wherein, the lighting information includes: the position information of each lighting area in the image to be detected, and the lighting color of each lighting area;

[0084] Calculate the average brightness of each pixel in the image to be detected, and determine the detection parameters and detection threshold range for the image to be detected based on the average value;

[0085] For each illuminated area, the detection features of that illuminated area are determined based on the relationship between the pixel values ​​of each pixel in that illuminated area and the numerical values ​​of the detection parameters.

[0086] Delete the location information and lighting color of each lighting area in the lighting information where the detection feature does not meet the detection threshold range;

[0087] Based on the retained lighting information, the lighting status of the target signal light in the image to be detected is determined.

[0088] As can be seen from the above, when monitoring the status of traffic lights using the scheme provided in this application, an image of the target traffic light can be acquired according to a specified detection cycle, and the lighting information of the image can be determined. The lighting information includes the position information of each lit area in the image and the lighting color of each lit area. Then, the average brightness of each pixel in the image is calculated, and detection parameters and a detection threshold range are determined based on this average value. For each lit area, the detection features of that area are determined based on the relationship between the pixel values ​​of each pixel in that area and the numerical values ​​of the detection parameters. Then, the position information and lighting color of each lit area whose detection features do not meet the detection threshold range can be deleted from the lighting information. Based on the retained lighting information, the lighting status of the target traffic light in the image can be determined.

[0089] Based on this, by applying the solution provided in the embodiments of this application, the lighting information of the target traffic light in the image to be detected can be determined according to a specified detection cycle, thereby determining the lighting status of the target traffic light and realizing real-time monitoring of the lighting status of the traffic light. Furthermore, since the average brightness of each pixel in the image to be detected is correlated with the ambient light conditions of the traffic light when the image was acquired, and the detection parameters and detection threshold range are determined based on the average brightness of each pixel in the image to be detected, and the detection features of each lit area are determined based on the numerical relationship between the pixel values ​​of each pixel in the lit area and the detection parameters, lit areas whose detection features do not meet the detection threshold range are very likely to be falsely detected lit areas, rather than actual lit areas of the traffic light. Therefore, deleting the position information and lit color of lit areas whose detection features do not meet the detection threshold range from the lit information can remove falsely detected lit areas, improve the accuracy of the retained lit information, and thus make the determination of the lit state of the target traffic light in the image to be detected based on the retained lit information more accurate and closer to the actual lit state of the target traffic light.

[0090] The following is a detailed description of a traffic light status monitoring method provided in the embodiments of this application, with reference to the accompanying drawings.

[0091] Figure 1 This is a schematic flowchart of a road defect detection method provided in an embodiment of this application, such as... Figure 1 As shown, the method may include the following steps S101-S105.

[0092] S101: According to the specified detection cycle, acquire the image to be detected of the target signal light and determine the lighting information of the image to be detected.

[0093] The lighting information includes: the location information of each lit area in the image to be detected, and the lighting color of each lit area.

[0094] When monitoring the status of traffic lights, you can first acquire images of the target traffic light according to a specified detection cycle and determine the lighting information of the images.

[0095] Optionally, in one specific implementation, the image to be detected regarding the target traffic light can be an image containing the target traffic light captured by a road camera placed opposite the target traffic light.

[0096] Optionally, a target detection model can be pre-trained based on multiple traffic light detection data pairs. Each traffic light detection data pair can include an image of the traffic light, the location information of the illuminated areas of each traffic light in the image, and the illumination color of each illuminated area. Then, if the image of the traffic light is input into the target detection model, the model can output the location information of the illuminated areas of each traffic light in the image, as well as the illumination color of each illuminated area. Therefore, the image to be detected can be input into the target detection model, and the location information of each illuminated area in the image output by the target detection model, along with the illumination color of each illuminated area, can be determined as the illumination information of the image to be detected.

[0097] The aforementioned object detection model can be any machine learning model capable of detecting objects in an image, such as R-CNN (Region-based Convolutional Neural Network) or MobileNetV1-YoloV3. This application does not specifically limit the choice of a particular object detection model.

[0098] In the above-mentioned object detection model, MobileNetV1-YoloV3, MobileNetV1 serves as the backbone network, derived from the MobileNetV1 deep learning classification network, and is a lightweight and fast model. YoloV3 is an image object detection network framework, a single-stage object detection algorithm based on deep learning principles. The lightweight backbone network and single-stage object detection algorithm can quickly obtain lighting information in the image to be detected and are suitable for both server-side and embedded systems. Therefore, applying the MobileNetV1-YoloV3 model to determine the lighting information of the image to be detected has high practicality.

[0099] S102: Calculate the average brightness of each pixel in the image to be detected, and determine the detection parameters and detection threshold range for the image to be detected based on the average value.

[0100] Since the target traffic lights and the equipment used to acquire images of them are typically placed outdoors, ambient light such as sunlight, streetlights, and vehicle headlights can lead to false positives in the determined illumination information of the image. For example, in strong sunlight, the sunlight shining on the target traffic light may cause areas of yellow light that are not actually lit to appear brighter in the acquired image, resulting in the inclusion of the location and color of lit yellow light areas in the determined illumination information. Similarly, at night, the image of the target traffic light may contain streetlights and vehicle headlights; when determining the illumination information, these streetlights and vehicle headlights in the image may be mistakenly identified as lit.

[0101] Furthermore, after determining the lighting information of the image to be detected, it is also possible to remove false detections of signal lights due to the influence of ambient light.

[0102] During the day, false alarms related to traffic light illumination are primarily affected by sunlight, while at night, they are mainly influenced by streetlights, vehicle headlights, and other lighting conditions. Since sunlight and artificial light have different effects on false alarms, the methods for removing false alarms caused by ambient light in the traffic light illumination data can also differ depending on the ambient light conditions. Therefore, when removing false alarms caused by ambient light in the traffic light illumination data, it is essential to first determine the ambient light conditions when the image to be detected was acquired.

[0103] Because there is a correlation between the ambient light conditions when the image to be detected is acquired and the brightness of the image itself—for example, when the ambient light is bright, such as during the day, the brightness of the image to be detected is also high; conversely, when the ambient light is dim, such as at night, the brightness of the image to be detected is also low—the average brightness of each pixel in the image to be detected can be used to indicate the brightness level of the image. Therefore, the average brightness of each pixel in the image to be detected can reflect the ambient light conditions when the image was acquired. Thus, after acquiring the image of the target traffic light, the average brightness of each pixel in the image to be detected can be calculated, and this average value can reflect the ambient light conditions when the image was acquired.

[0104] Therefore, based on the above average values, the detection parameters and detection threshold range for the image to be detected can be determined, and the false detection of signal lights due to the influence of ambient light in the lighting information can be removed based on the detection parameters and detection threshold range.

[0105] Optionally, the average brightness of each pixel in the image to be detected can be calculated based on the brightness information of the Y channel of the image to be detected.

[0106] For example, the image to be detected can be divided into n regions, and the average brightness of each pixel in each region can be calculated as the average brightness of that region. The minimum average brightness among the n regions is then determined as the average value. Assuming the brightness of a pixel in the image to be detected is Y(x, y), the starting coordinates of each of the n regions are (i, j), and the width and height of each region are w and h respectively, then the average value... The calculation formula can be shown below.

[0107]

[0108] Alternatively, those skilled in the art can use multiple images of traffic lights to determine the pixel characteristics of the illuminated areas and non-illuminated areas of the traffic lights under different ambient light conditions. Then, based on the pixel characteristics of the illuminated areas and non-illuminated areas of the traffic lights under different ambient light conditions, detection parameters and detection threshold ranges for the images to be detected under different ambient light conditions can be set. This allows for the differentiation of the illuminated areas and non-illuminated areas of the traffic lights under each ambient light condition based on the detection parameters and detection threshold range under that ambient light condition.

[0109] Furthermore, since the average brightness of each pixel in the image to be detected can be used to indicate the ambient light conditions of the image, those skilled in the art can set detection parameters and detection threshold ranges for the image to be detected corresponding to different average values. Thus, after calculating the average brightness of each pixel in the image to be detected, the detection parameters and detection threshold ranges for the image to be detected can be determined based on the average value.

[0110] S103: For each illuminated area, determine the detection features of the illuminated area based on the relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters.

[0111] After determining the detection parameters and detection threshold range for the image to be detected, the detection features of each illuminated area can be determined based on the numerical relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters.

[0112] Optionally, in one specific implementation, the detection parameters may include: a first parameter and a second parameter; the determination of the detection features of each illuminated area based on the numerical relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters may include the following steps 11 and 12.

[0113] Step 11: For each illuminated area, determine the first number of pixels in the illuminated area whose all color channel values ​​are greater than the first parameter, and determine the ratio of the first number to the total number of pixels in the illuminated area as the first detection feature.

[0114] Step 12: For each illuminated area, determine the second number of pixels in the illuminated area whose color channel value is greater than the second parameter, and determine the ratio of the second number to the total number of pixels as the second detection feature.

[0115] The aforementioned color channel values ​​include: red channel pixel values, green channel pixel values, and blue channel pixel values.

[0116] For example, assuming the red channel pixel value of the image to be detected is R(x, y), the green channel pixel value is G(x, y), the blue channel pixel value is B(x, y), the lower left corner pixel coordinate of each lit area is (i, j), the width and height of each lit area are w pixels and h pixels respectively, the first parameter is Y1, and the second parameter is Y2, then the calculation formula of the first detection feature α1 and the second detection feature α2 can be as follows.

[0117]

[0118]

[0119] In this context, S1 and S2 both have a value of 1, and are used to calculate the molecules in their respective formulas.

[0120] In the calculation formula of the first detection feature α1, when traversing to a pixel, if the red channel pixel value, green channel pixel value, and blue channel pixel value of the pixel are all greater than the first parameter, then the summation part of the numerator in the calculation formula will be increased by one S1. Finally, the numerator in the calculation formula is: the number of pixels whose red channel pixel value, green channel pixel value, and blue channel pixel value are all greater than the first parameter. This number is the sum of all S1 added to the summation part of the numerator in the calculation formula. Since S1 = 1, the above number is the total number of S1 added to the summation part of the numerator in the calculation formula.

[0121] Accordingly, in the calculation formula of the second detection feature α2, when traversing to a pixel, if at least one of the red, green, and blue channel pixel values ​​of that pixel is greater than the second parameter, then the summation part of the numerator in the calculation formula will increase by S2. Finally, the numerator in the calculation formula is the number of pixels whose at least one of the red, green, and blue channel pixel values ​​is greater than the second parameter. This number is the sum of all S2 values ​​added to the summation part of the numerator in the calculation formula. Since S2 = 1, the above number is the total number of S2 values ​​added to the summation part of the numerator in the calculation formula.

[0122] S104: Delete the location information and lighting color of each lighting area in the lighting information where the detection features do not meet the detection threshold range.

[0123] After determining the detection features of each lit area, since each lit area whose detection features do not meet the detection threshold range is very likely to be a false detection, the location information and lighting color of each lit area whose detection features do not meet the detection threshold range can be deleted from the lighting information.

[0124] Optionally, in one specific implementation, based on the specific implementation shown in steps 11-12 above, step S104 may include the following step 21.

[0125] Step 21: Delete the location information and lighting color of each lighting area except the target lighting area from the lighting information.

[0126] The target lighting area mentioned above is the lighting area where the first detection feature belongs to the first threshold interval and the second detection feature belongs to the second threshold interval.

[0127] After determining the first and second detection features of each illuminated area, for each illuminated area, if the first detection feature belongs to the first threshold interval and the second detection feature belongs to the second threshold interval, then the illuminated area can be considered not a falsely detected illuminated area. Therefore, the target illuminated areas in each illuminated area whose first detection feature belongs to the first threshold interval and whose second detection feature belongs to the second threshold interval can be retained, while the position information and illumination color of each illuminated area other than the target illuminated areas can be deleted from the illumination information. This reduces the possibility of falsely detected illumination information in the retained illumination information and improves the accuracy of the illumination status of the target traffic lights determined based on the illumination information.

[0128] In other words, for each lit area, if the first detection feature of the lit area does not belong to the first threshold interval, or the second detection feature of the lit area does not belong to the second threshold interval, or the first detection feature of the lit area does not belong to the first threshold interval and the second detection feature does not belong to the second threshold interval, then the position information and lighting color of the lit area are deleted from the lighting information.

[0129] In addition, when determining the lighting information of the image to be detected, the area where the street lights, building decorative lights, etc. are located in the image to be detected may be mistakenly identified as the lit area. In general, the size of the lit area of ​​the street lights, building decorative lights and target traffic lights in the image to be detected is different.

[0130] Therefore, in one optional implementation, a third threshold interval for the image to be detected can be determined, and the position information and color of each lit area in the lighting information that do not meet the third threshold interval in terms of pixel count can be deleted.

[0131] S105: Based on the retained lighting information, determine the lighting status of the target signal light in the image to be detected.

[0132] After deleting the location information and lighting color of each lit area whose detection features do not meet the detection threshold range, that is, after deleting the false lighting information in the lighting information, the lighting status of the target signal light in the image to be detected can be determined based on the retained lighting information.

[0133] For example, if there is no lit area in the retained lighting information, it can be determined that the lighting status of the target traffic light in the image to be detected is that all traffic lights are off.

[0134] For example, if the retained lighting information includes the location information A of the lighting area A and the lighting color of the lighting area A is red, then it can be determined that the lighting status of the target signal light in the image to be detected is red.

[0135] For example, if the retained lighting information includes the location information B of the lighting area B and the lighting color of the lighting area B is yellow, then it can be determined that the lighting status of the target signal light in the image to be detected is yellow.

[0136] For example, if the retained lighting information includes the location information C of the lighting area C and the lighting color of the lighting area C is green, then it can be determined that the lighting status of the target signal light in the image to be detected is green.

[0137] For example, if the retained lighting information includes the location information A of the lighting area A and the location information C of the lighting area C, and the lighting color of the lighting area A is red and the lighting color of the lighting area C is green, then it can be determined that the lighting status of the target signal light in the image to be detected is red light on and green light on.

[0138] Since the red, green, and yellow lights of a traffic light have different functions, they cannot be lit at the same time. Therefore, when the red and green lights are lit at the same time, it is an abnormal state of the traffic light, indicating that the traffic light may be malfunctioning.

[0139] Furthermore, in one optional implementation, after determining the lighting status of the target signal light in the image to be detected, it is also possible to determine whether a specified fault has occurred in the signal light based on the lighting status of the target signal light.

[0140] The specified faults include the simultaneous illumination of different colored lights, which can be detected by a single image of the target traffic light. The simultaneous illumination of different colored lights includes situations where red and green lights are on simultaneously, red and yellow lights are on simultaneously, green and yellow lights are on simultaneously, and red, green, and yellow lights are on simultaneously.

[0141] Based on this, by applying the solution provided in the embodiments of this application, the lighting information of the target traffic light in the image to be detected can be determined according to a specified detection cycle, thereby determining the lighting status of the target traffic light and realizing real-time monitoring of the lighting status of the traffic light. Furthermore, since the average brightness of each pixel in the image to be detected is correlated with the ambient light conditions of the traffic light when the image was acquired, and the detection parameters and detection threshold range are determined based on the average brightness of each pixel in the image to be detected, and the detection features of each lit area are determined based on the numerical relationship between the pixel values ​​of each pixel in the lit area and the detection parameters, lit areas whose detection features do not meet the detection threshold range are very likely to be falsely detected lit areas, rather than actual lit areas of the traffic light. Therefore, deleting the position information and lit color of lit areas whose detection features do not meet the detection threshold range from the lit information can remove falsely detected lit areas, improve the accuracy of the retained lit information, and thus make the determination of the lit state of the target traffic light in the image to be detected based on the retained lit information more accurate and closer to the actual lit state of the target traffic light.

[0142] Optionally, in one specific implementation, determining the lighting information of the image to be detected in step S101 above may include the following steps 31-32.

[0143] Step 31: Based on the preset traffic light area information, extract the target area related to the traffic light from the image to be detected.

[0144] Step 32: Detect lighting information in the target area to obtain lighting information of the image to be detected.

[0145] When monitoring traffic light status, since the installation location of the image acquisition device for acquiring the target traffic light image is usually fixed, before monitoring the traffic light status, a person skilled in the art can preset the traffic light area information of the image to be detected in the image acquired by each image acquisition device based on the position information of the target traffic light in the image of the target traffic light acquired by each image acquisition device. Then, after acquiring the image to be detected of the target traffic light, the target area of ​​the traffic light can be extracted from the image to be detected based on the preset traffic light area information, and then the lighting information of the target area can be detected to obtain the lighting information of the image to be detected.

[0146] Based on this, since the target area is the area where the traffic lights are located in the image to be detected, and compared with the image to be detected, the target area has less data and contains less interference information, such as street lights and vehicle lights, the detection speed of lighting information of the target area based on the preset traffic light area information is faster and the lighting information obtained is more accurate.

[0147] However, due to the influence of natural wind and air convection generated when vehicles pass by, the image acquisition device used to capture the target traffic light image may experience slight vibrations, which may cause changes in the image acquisition area and consequently change the location of the target traffic light in the image. However, since the preset traffic light area information is fixed, slight vibrations of the image acquisition device may result in only a portion of the traffic light image existing in the captured target area.

[0148] Therefore, in one possible implementation, in step 31 above: after cropping the target area of ​​the traffic light in the image to be detected based on the preset traffic light area information, the target area can be expanded outward by a certain size, and then the lighting information of the expanded target area can be detected to cope with the influence of small-range jitter of the image acquisition device.

[0149] The aforementioned outward expansion dimension can be set by those skilled in the art according to actual conditions, and this application embodiment does not impose specific limitations here.

[0150] For example, the aforementioned outward expansion dimension can be set according to the width and height data of the traffic light.

[0151] Furthermore, natural winds and air convection generated by passing vehicles can cause the image acquisition device to shift in one direction for an extended period, thus changing the image capture area and altering the location of the target traffic light in the image being detected. Since the preset traffic light area information is fixed, a prolonged shift in one direction by the image acquisition device may result in only a portion of the traffic light image, or even no traffic light image at all, being captured within the target area related to the traffic light.

[0152] Therefore, in one optional specific implementation, such as Figure 2 As shown in the embodiment of this application, a traffic light status monitoring method may further include the following steps S201-S203.

[0153] S201: For each illuminated area retained in the illumination information, determine the target center position of the illuminated area based on the position information of the illuminated area, and determine the preset center position of the illuminated area based on the signal light area information.

[0154] First, for each illuminated area retained in the lighting information, the target center position of that illuminated area can be determined based on its location information. Furthermore, since the positions of each illuminated area are fixed within the target area indicated by the preset traffic light area information, the preset center position of that illuminated area can be determined based on the preset traffic light area information.

[0155] S202: For each illuminated area retained in the illumination information, calculate the positional deviation between the target center position of the illuminated area and the preset center position of the illuminated area.

[0156] After determining the target center position and preset center position of each illuminated area retained in the illumination information, the positional deviation between the target center position and the preset center position of each illuminated area retained in the illumination information can be calculated.

[0157] S203: Calculate the average value of the obtained positional deviations, and use it as the target offset of the next frame of the image to be detected.

[0158] After obtaining the positional deviation between the target center position of each illuminated area and the preset center position of that illuminated area, the average value of each positional deviation can be used as the target offset of the next frame of the image to be detected, so that the next frame of the image to be detected can be cropped with respect to the traffic light based on the target offset.

[0159] If only one illuminated area is retained in the illumination information, the positional deviation between the target center position of the illuminated area and the preset center position of the illuminated area can be directly used as the target offset of the next frame of the image to be detected.

[0160] For steps S201-S203 above, for example, if the lighting area retained in the lighting information is lighting area C, the lighting color of the lighting area is red, and according to the signal light area information, the preset center position coordinates of lighting area C are determined as (center_x c center_y c Assuming the top-left corner of the illuminated area C is (x1, y1) and the bottom-right corner is (x2, y2), then the center position of the illuminated area C can be calculated (center_new_x). c ,center_new_y c The coordinates of are shown below.

[0161] center_new_x c = (x2 + x1) / 2

[0162] center_new_y c = (y2+y1) / 2

[0163] Furthermore, based on the center coordinates (center_new_x) of the illuminated area C... c ,center_new_y c The preset center position coordinates (center_x) of the illuminated area C. c center_y c The positional deviations of the target center position of the illuminated area from the preset center position of the illuminated area in the x-direction (offset_x) and y-direction (offset_y) can be determined. The calculation formulas for offset_x and offset_y are shown below.

[0164] offset_x = center_new_x c -center_x c

[0165] offset_y = center_new_y c -center_y c

[0166] Furthermore, according to the above steps S201-S203, step 31: based on the preset traffic light area information, the target area about the traffic light is extracted in the image to be detected, which may include the following step 41.

[0167] Step 41: Based on the preset traffic light area information and the target offset determined based on the previous frame of the image to be detected, extract the target area related to the traffic light in the image to be detected.

[0168] Based on the above steps S201-S203, it can be seen that in each specified detection cycle, the target offset of the next frame of the image to be detected can be determined. Therefore, in each specified detection cycle, the target area related to the traffic light can be extracted in the image to be detected based on the target offset determined in the previous frame of the image to be detected, thereby reducing the impact of the image acquisition device shifting in a certain direction on the monitoring of the traffic light status.

[0169] Alternatively, in one specific implementation, such as Figure 3 As shown in the embodiment of this application, a signal light status detection method may further include the following step S301.

[0170] Step S301: For each first preset cycle, determine the fault detection result of the signal light within the first preset cycle based on the lighting status of each light determined within the first preset cycle.

[0171] Wherein, the first preset period is greater than the specified detection period, and the first preset period is an integer multiple of the specified detection period.

[0172] Based on the lighting status of the target traffic light determined in each specified detection cycle, a fault of simultaneous illumination of different colored lights can be identified. However, since there are times when the red light flashes and / or the green light flashes and / or the yellow light flashes during the traffic light lighting cycle, and during the flashing time of each color traffic light, there are times when none of the colors of traffic lights are lit, it is impossible to determine faults such as traffic light off-light faults and abnormal yellow light faults based on the image to be detected acquired in a single specified detection cycle. Therefore, for faults such as all traffic lights off faults and abnormal yellow light faults of the target traffic light, they can be determined based on multiple lighting statuses determined within the first preset cycle. Among them, abnormal yellow light faults can include yellow light constantly on faults and yellow light flashing faults.

[0173] For example, in the case of a signal light all-out fault, if there is no lighting information in any of the lighting states determined in each first preset cycle, it can be considered that the signal light has experienced a signal light all-out fault.

[0174] For example, regarding a yellow light malfunction, for each specified detection cycle, if the lighting state indicates that only the yellow light is on and no other colored lights are on, then the lighting state for that specified detection cycle is recorded as yellow light on. The system then sequentially checks whether the lighting state for each specified detection cycle in the first preset cycle is yellow light on. If the lighting state for each specified detection cycle is yellow light on, then the signal light is determined to have a constant yellow light malfunction. If, in the first preset cycle, half of the specified detection cycles show yellow light on and half show the signal light completely off, then the signal light is determined to have a flashing yellow light malfunction.

[0175] Optionally, the first preset cycle can be a traffic light control cycle, which is the time required for the red, yellow, and green lights of the traffic light to illuminate once.

[0176] Optionally, in one specific implementation, the first preset period can be no less than one traffic light control period. Furthermore, for each first preset period, the fault detection result of the traffic light in the first preset period can be determined based on the proportion of the number of specified detection periods for the specified lighting state determined in the first preset period to the total number of specified detection periods in the first preset period.

[0177] For example, if the indicator light is yellow for more than half of the specified detection cycles within a first preset cycle, it can be determined that the indicator light has a fault of constantly being on yellow.

[0178] For example, if the indicator lights are all off for more than half of the specified detection cycles within a first preset cycle, it can be determined that the indicator lights have a fault of not lighting up.

[0179] Alternatively, in one specific implementation, such as Figure 4 As shown in the embodiment of this application, a signal light status detection method may further include the following step S401.

[0180] S401: For each second preset cycle, based on the fault detection results determined within the second preset cycle, determine the target detection result of the traffic light within the second preset cycle.

[0181] The second preset period is greater than the first preset period, and the second preset period is an integer multiple of the first preset period.

[0182] After determining the fault detection results of the traffic light in the first preset period, in order to further ensure the accuracy of the determined detection results, the target detection results of the traffic light in the second preset period can be determined based on the various fault detection results determined in the second preset period, and the target detection results can be used as the final detection results.

[0183] Alternatively, in one specific implementation, such as Figure 5 As shown in the embodiment of this application, a signal light status detection method may further include the following step S501.

[0184] S501: If the target detection result indicates that the signal light is faulty, an alarm signal will be output.

[0185] Once the target detection result is determined, if the target detection result indicates that the signal light is faulty, an alarm signal can be output.

[0186] Optionally, for each second preset cycle, an alarm signal can be output when the number of a certain fault exceeds a preset threshold.

[0187] Corresponding to the traffic light status monitoring method provided in the above embodiments of this application, this application also provides a traffic light status monitoring device.

[0188] Figure 6 This is a schematic diagram of the structure of a traffic light status monitoring device provided in an embodiment of this application, as shown below. Figure 6 As shown, the traffic light status monitoring device may include the following modules:

[0189] The information determination module 601 is used to acquire a target signal light image to be detected according to a specified detection cycle, and determine the lighting information of the target signal light image; wherein, the lighting information includes: the position information of each lighting area in the target signal light image, and the lighting color of each lighting area;

[0190] The parameter determination module 602 is used to calculate the average brightness of each pixel in the image to be detected, and to determine the detection parameters and detection threshold range for the image to be detected based on the average value.

[0191] The feature determination module 603 is used to determine the detection features of each illuminated area based on the numerical relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters.

[0192] Information deletion module 604 is used to delete the position information and lighting color of each lighting area in the lighting information where the detection feature does not meet the detection threshold range;

[0193] The state determination module 605 is used to determine the lighting state of the target signal light in the image to be detected based on the retained lighting information.

[0194] Based on this, by applying the solution provided in the embodiments of this application, the lighting information of the target traffic light in the image to be detected can be determined according to a specified detection cycle, thereby determining the lighting status of the target traffic light and realizing real-time monitoring of the lighting status of the traffic light. Furthermore, since the average brightness of each pixel in the image to be detected is correlated with the ambient light conditions of the traffic light when the image was acquired, and the detection parameters and detection threshold range are determined based on the average brightness of each pixel in the image to be detected, and the detection features of each lit area are determined based on the numerical relationship between the pixel values ​​of each pixel in the lit area and the detection parameters, lit areas whose detection features do not meet the detection threshold range are very likely to be falsely detected lit areas, rather than actual lit areas of the traffic light. Therefore, deleting the position information and lit color of lit areas whose detection features do not meet the detection threshold range from the lit information can remove falsely detected lit areas, improve the accuracy of the retained lit information, and thus make the determination of the lit state of the target traffic light in the image to be detected based on the retained lit information more accurate and closer to the actual lit state of the target traffic light.

[0195] Optionally, in one specific implementation, the detection parameters include: a first parameter and a second parameter; the feature determination module is specifically used for:

[0196] For each illuminated area, a first number of pixels in the illuminated area whose all color channel values ​​are greater than the first parameter is determined, and the ratio of the first number to the total number of pixels in the illuminated area is determined as the first detection feature.

[0197] For each illuminated area, a second number of pixels in that illuminated area with at least one color channel value greater than the second parameter is determined, and the ratio of the second number to the total number of pixels is determined as a second detection feature.

[0198] Optionally, in one specific implementation, the detection threshold interval includes: a first threshold interval and a second threshold interval; the information deletion module is specifically used for:

[0199] Delete the location information and lighting color of each lighting area other than the target lighting area from the lighting information;

[0200] The target lighting area is defined as the lighting area where the first detection feature belongs to the first threshold interval and the second detection feature belongs to the second threshold interval.

[0201] Optionally, in one specific implementation, the information determination module includes:

[0202] The region cropping submodule is used to crop a target region about the traffic light in the image to be detected based on preset traffic light region information;

[0203] The information detection submodule is used to detect the lighting information of the target area to obtain the lighting information of the image to be detected.

[0204] Optionally, in one specific implementation, the apparatus further includes:

[0205] The location determination module is used to determine the target center position of each illuminated area retained in the illumination information based on the location information of the illuminated area, and to determine the preset center position of the illuminated area based on the signal light area information.

[0206] The deviation calculation module is used to calculate the positional deviation between the target center position and the preset center position of each lighting area retained in the lighting information.

[0207] The mean calculation module is used to calculate the average value of the obtained positional deviations, which is used as the target offset of the next frame of the image to be detected.

[0208] The region capture submodule is specifically used for:

[0209] Based on the preset traffic light area information and the target offset determined based on the previous frame of the image to be detected, the target area related to the traffic light is extracted from the image to be detected.

[0210] Optionally, in one specific implementation, the apparatus further includes:

[0211] The first result determination module is used to determine the fault detection result of the signal light within each first preset period based on the lighting status determined within that first preset period.

[0212] Optionally, in one specific implementation, the apparatus further includes:

[0213] The second result determination module is used to determine the target detection result of the signal light in each second preset period based on the fault detection results determined in the second preset period.

[0214] Wherein, the second preset period is greater than the first preset period, and the second preset period is an integer multiple of the first preset period.

[0215] Optionally, in one specific implementation, the apparatus further includes:

[0216] The signal output module is used to output an alarm signal when the target detection result indicates that the signal light is faulty.

[0217] This application also provides an electronic device, such as... Figure 7 As shown, it includes:

[0218] Memory 701 is used to store computer programs;

[0219] When the processor 702 executes the program stored in the memory 701, it implements the steps of any of the above-described signal light status monitoring methods.

[0220] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 702, the communication interface, and the memory 701 communicating with each other via the communication bus.

[0221] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0222] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0223] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0224] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0225] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described signal light status monitoring methods.

[0226] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the signal light status monitoring methods described above.

[0227] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0228] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0229] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0230] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for monitoring the status of traffic lights, characterized in that, The method includes: According to a specified detection cycle, acquire the image to be detected of the target traffic light and determine the lighting information of the image to be detected; wherein, the lighting information includes: the position information of each lighting area in the image to be detected, and the lighting color of each lighting area; Calculate the average brightness of each pixel in the image to be detected, and determine the detection parameters and detection threshold range for the image to be detected based on the average value; For each illuminated area, the detection features of that illuminated area are determined based on the relationship between the pixel values ​​of each pixel in that illuminated area and the numerical values ​​of the detection parameters. Delete the location information and lighting color of each lighting area in the lighting information where the detection feature does not meet the detection threshold range; Based on the retained lighting information, the lighting status of the target signal light in the image to be detected is determined; The detection parameters include: a first parameter and a second parameter; for each illuminated area, the detection features of the illuminated area are determined based on the numerical relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters, including: For each illuminated area, a first number of pixels in the illuminated area whose all color channel values ​​are greater than the first parameter is determined, and the ratio of the first number to the total number of pixels in the illuminated area is determined as the first detection feature. For each illuminated area, a second number of pixels in that illuminated area with at least one color channel value greater than the second parameter is determined, and the ratio of the second number to the total number of pixels is determined as a second detection feature.

2. The method according to claim 1, characterized in that, The detection threshold interval includes: a first threshold interval and a second threshold interval; in deleting the lighting information, the location information and lighting color of each lighting area whose detection features do not meet the detection threshold interval include: Delete the location information and lighting color of each lighting area other than the target lighting area from the lighting information; The target lighting area is defined as the lighting area where the first detection feature belongs to the first threshold interval and the second detection feature belongs to the second threshold interval.

3. The method according to any one of claims 1-2, characterized in that, Determining the lighting information of the image to be detected includes: Based on preset traffic light area information, a target area related to the target traffic light is extracted from the image to be detected; Lighting information is detected in the target area to obtain the lighting information of the image to be detected.

4. The method according to claim 3, characterized in that, The method further includes: For each illuminated area retained in the illumination information, the target center position of the illuminated area is determined according to the position information of the illuminated area, and the preset center position of the illuminated area is determined according to the signal light area information. For each illuminated area retained in the illumination information, calculate the positional deviation between the target center position of the illuminated area and the preset center position of the illuminated area; The average value of the obtained positional deviations is used as the target offset of the next frame of the image to be detected. The step of cropping a target region related to the traffic light from the image to be detected based on preset traffic light region information includes: Based on the preset traffic light area information and the target offset determined based on the previous frame of the image to be detected, the target area related to the traffic light is extracted from the image to be detected.

5. The method according to any one of claims 1-2, characterized in that, The method further includes: For each first preset cycle, the fault detection result of the signal light within that first preset cycle is determined based on the lighting status of each light within that first preset cycle.

6. The method according to claim 5, characterized in that, The method further includes: For each second preset cycle, the target detection result of the signal light within the second preset cycle is determined based on the various fault detection results determined within that second preset cycle. Wherein, the second preset period is greater than the first preset period, and the second preset period is an integer multiple of the first preset period.

7. The method according to claim 6, characterized in that, The method further includes: If the target detection result indicates that the signal light is faulty, an alarm signal is output.

8. A signal light status monitoring device, characterized in that, The device includes: The information determination module is used to acquire an image of a target traffic light to be detected according to a specified detection cycle, and determine the lighting information of the image to be detected; wherein, the lighting information includes: the position information of each lighting area in the image to be detected, and the lighting color of each lighting area; The parameter determination module is used to calculate the average brightness of each pixel in the image to be detected, and to determine the detection parameters and detection threshold range for the image to be detected based on the average value. The feature determination module is used to determine the detection features of each illuminated area based on the numerical relationship between the pixel values ​​of each pixel in the illuminated area and the detection parameters. The information deletion module is used to delete the location information and lighting color of each lighting area in the lighting information where the detection feature does not meet the detection threshold range; The status determination module is used to determine the lighting status of the target signal light in the image to be detected based on the retained lighting information. The detection parameters include: a first parameter and a second parameter; the feature determination module is specifically used to, for each illuminated area, determine a first number of pixels in the illuminated area whose all color channel values ​​are greater than the first parameter, and determine the ratio of the first number to the total number of pixels in the illuminated area as a first detection feature; for each illuminated area, determine a second number of pixels in the illuminated area whose at least one color channel value is greater than the second parameter, and determine the ratio of the second number to the total number of pixels as a second detection feature.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for traffic light image reinforcement based on day-and-night imaging features

    CN106991707A

  • Device inspection method, device and system, computer readable storage medium and tour inspection robot

    CN107832770A