CN112989891B - Signal lamp display state detection method and device - Google Patents

Signal lamp display state detection method and device Download PDF

Info

Publication number
CN112989891B
CN112989891B CN201911302907.2A CN201911302907A CN112989891B CN 112989891 B CN112989891 B CN 112989891B CN 201911302907 A CN201911302907 A CN 201911302907A CN 112989891 B CN112989891 B CN 112989891B
Authority
CN
China
Prior art keywords
periods
signal lamp
display
image frames
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911302907.2A
Other languages
Chinese (zh)
Other versions
CN112989891A (en
Inventor
郑海涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201911302907.2A priority Critical patent/CN112989891B/en
Publication of CN112989891A publication Critical patent/CN112989891A/en
Application granted granted Critical
Publication of CN112989891B publication Critical patent/CN112989891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/54Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application discloses a method and a device for detecting a signal lamp display state. The method comprises the following steps: collecting image frames of a plurality of periods in an area where the signal lamp is positioned; generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames; determining display variation degree values in a plurality of periods according to the characteristic sequences in the plurality of periods; and detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, wherein the preset degree thresholds are related to the display change degree values of the display states.

Description

Signal lamp display state detection method and device
Technical Field
The present disclosure relates to the field of image processing, and in particular, to a method and an apparatus for detecting a signal lamp display state.
Background
Traffic lights, commonly known as traffic lights, are light color signals which are exchanged within a predetermined time period, are usually arranged at places where traffic control is required, and can assign road right of way to vehicles and pedestrians to control traffic.
In order to monitor traffic behavior of vehicles, pedestrians, etc., signal lamp-based video monitoring is becoming a popular means. For example, when the signal lamp is in a red light state, monitoring whether a traffic (running the red light) occurs or not; when the signal lamp is in a yellow lamp state, whether traffic behavior occurs is not monitored, and whether overspeed behavior occurs is monitored.
Therefore, the detection of the display state of the signal lamp is the basis of traffic behavior monitoring, so a scheme is needed to accurately detect the display state of the signal lamp.
Disclosure of Invention
The embodiment of the application provides a detection method for the display state of a signal lamp, which can accurately detect the current display state of the signal lamp.
The embodiment of the application provides a detection device for a signal lamp display state, which can accurately detect the current display state of a signal lamp.
In order to solve the technical problems, the embodiment of the application is realized as follows:
the embodiment of the application adopts the following technical scheme:
a signal lamp display state detection method comprises the following steps:
collecting image frames of a plurality of periods in an area where the signal lamp is positioned;
generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames;
Determining display variation degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, wherein the preset degree thresholds are related to the display change degree values of the display states.
A signal lamp display state detection device, comprising: an image frame acquisition unit, a feature sequence generation unit, a degree value determination unit, and a state detection unit, wherein,
the image frame acquisition unit is used for acquiring image frames of a plurality of periods in the area where the signal lamp is positioned;
the characteristic sequence generating unit is used for generating characteristic sequences of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequences comprise display characteristic parameters respectively corresponding to different image frames;
the degree value determining unit is used for determining display change degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
the state detection unit is used for detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, and the preset degree thresholds are related to the display change degree values of the display states.
According to the technical scheme provided by the embodiment, for the area containing the signal lamp, the image frames in a plurality of periods are collected, the characteristic sequences which respectively correspond to the display characteristic parameters and contain different image frames in a plurality of periods are generated for the signal lamp, and then the display change degree values in the plurality of periods are determined according to the generated characteristic sequences, so that the current display state of the signal lamp can be detected according to the relation between the display change degree values in the plurality of periods and the degree threshold values determined according to the specific display state.
That is, when detecting the current display state of the signal lamp, the display characteristic parameters of the image frames in a plurality of periods can be determined first, and then the display change degree value in a plurality of periods is determined according to the characteristic parameters, so that the effect of detecting the display state can be realized according to the relation between the display change degree value and the preset degree threshold.
The display change degree in a plurality of periods is used as the basis for detecting the display state of the signal lamp through the image frames in the plurality of periods, so that the display state of the signal lamp can be accurately identified in the process of collecting the image containing the signal lamp.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present application, the drawings that are required for the description of the embodiments or prior art will be briefly described below, it being apparent that the drawings in the following description are only some of the embodiments described in the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flow chart of a method for detecting a signal lamp display state according to an embodiment of the present application;
fig. 2 is a schematic diagram of a signal lamp according to an embodiment of the present application;
FIG. 3 is a schematic diagram of original parameters corresponding to different image frames in a plurality of periods according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of generating a feature sequence over multiple cycles provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of determining display variation values over a plurality of periods according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a signal lamp display state detection device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments in the present application with reference to the accompanying drawings.
Example 1
The embodiment provides a method for detecting the display state of a signal lamp, which can accurately detect the current display state of the signal lamp. The specific flow diagram of the method is shown in fig. 1, and comprises the following steps:
step 102: and collecting image frames of a plurality of periods for the area where the signal lamp is positioned.
In this embodiment, a signal light may refer to a signal light or a plurality of signal lights, such as one or more of a red light, a yellow light, a green light, or a digital light. In practical application, one or more signal lamps can form a signal lamp unit with traffic control function.
For example, the signal lamp unit may include red, yellow and green lamps, so that traffic control may be performed by the alternating states of the three lamps; for example, the signal lamp unit can also only comprise a yellow lamp, and can prompt rapid passing through a bright and dark flashing state, and also can prompt safety in rainy days, foggy days and the like; as another example, the signal lamp unit may also comprise only one lamp, which may achieve traffic control by changing the different colors red, yellow and green.
As shown in fig. 2, a schematic diagram of two signal lamp units is shown, the left diagram is a signal lamp unit including three signal lamps of red, yellow and green, and the right diagram may also include a digital signal lamp, both of which may be regarded as one signal lamp unit. In this step, the area where the signal lamp is located may be an area where one signal lamp is located, may be an area where a plurality of signal lamps are located, or may be an area where a signal lamp unit composed of a plurality of signal lamps is located.
In a real environment, the signal lamp or the signal lamp unit may swing due to different wind directions and wind forces, that is, displacement occurs. Therefore, the displacement factors need to be considered in advance to determine the display area of the signal lamp, and the area where the signal lamp is located in the step can be within the area according to the situation that the signal lamp is displaced. The dashed boxes shown in the left diagram of fig. 2 may be the areas where one signal lamp is located, or the areas where a plurality of signal lamps (signal lamp units) are located, respectively; the dashed box shown in the right drawing may be an area where a plurality of signal lamps (signal lamp units) are located.
Since traffic control is achieved by alternately lighting and dimming the signal lamp, a display condition of a certain period is usually required in order to detect the display state of the signal lamp, so that a specific period can be preset, and the display state is detected by the display condition of the signal lamp in a plurality of periods. For example, the period may be 120 seconds, 180 seconds, etc., whereby multiple periods of image frames may be acquired. The plurality of periods may be adjacent periods, such as capturing a plurality of image frames within 120 seconds, non-adjacent periods, such as capturing image frames within 120 seconds of odd (or even) number of 120 seconds, or random adjacent or non-adjacent periods, etc. The number of the periods can be set according to different requirements, for example, if the display state of the signal lamp is to be detected according to the display condition of the signal lamp in more periods, 10 periods, 20 periods or the like can be selected.
Here, the image frames in the period may be all or part of the image frames in the period. For example, in one cycle, all image frames may be acquired, or an odd (or even) th image frame, or a random plurality of image frames, or the like may be acquired. However, when a plurality of random image frames are acquired, for example, in a period, image frames between shorter time intervals are acquired, and in practical application, in order to accurately acquire the display condition of the signal lamp, as many image frames as possible may be acquired.
For example, as shown in the graph of fig. 2, for the area where the three signal lamps are located, image frames in 10 adjacent periods may be continuously acquired, all the image frames may be acquired in each period, and if X image frames are available in each period, 10 groups may be obtained, each group including a dataset of X image frames.
Step 104: and generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames.
The signal lamp may be periodically changed during the display process, such as when a red light is turned on for 60 seconds, a green light is turned on for 60 seconds, a yellow light is turned on for 5 seconds, and then the signal lamp is turned back on for 60 seconds, etc. Therefore, in the image frames in one period, different display conditions of the signal lamp may occur, so that the step can generate a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in a plurality of periods, wherein the characteristic sequence can comprise display characteristic parameters respectively corresponding to different image frames, and the display characteristic parameters can represent the display characteristics of the signal lamp. Thus, the current display state of the signal lamp can be detected by utilizing the characteristics in a plurality of periods. Specifically, the different image frames may include original parameters characterizing display characteristics of the signal lamp, that is, the different image frames may respectively correspond to the original parameters having display characteristics, where the original parameters may include position coordinates of the signal lamp in an area, pixel area of the signal lamp in the area, bright and dark states of the signal lamp, minimum circumscribed rectangular area of the signal lamp, color data of the signal lamp, and the like.
Further, the position coordinates may refer to position coordinates of the signal lamp in the area when the signal lamp is in the on state; the pixel area may be the pixel area in the area when the signal lamp is in the on state, generally, one pixel point can be used as a unit area, and how many pixel points can correspond to how many pixel areas; the bright-dark state may refer to whether it is in a lit state or an extinguished state, for which it may be recorded by a value of 1 and for which it may be recorded by a value of 0; the area of the minimum circumscribed rectangular area of the signal lamp may refer to the area of the minimum circumscribed rectangular area capable of containing the signal lamp when the signal lamp is in a lighting state, for example, the area of the minimum circumscribed rectangular area of the signal lamp is a rectangle formed by a dot-dash line in the right diagram of fig. 2, and when the signal lamp is in a lighting state, halation occurs in the outermost contour, so that the minimum circumscribed rectangular area containing the signal lamp is generally larger than the size of the signal lamp. Color data may refer to color data identified when the signal lamp is in a lit state, such as may be represented by an RGB (red green blue) color pattern.
Furthermore, the data processing can be performed on the original parameters of the display features corresponding to the different image frames, so that the feature sequences can be generated for a plurality of periods respectively.
Specifically, the display characteristic parameters of the position coordinates, the pixel proportion and the lamp lighting frequency corresponding to the different image frames can be generated according to the position coordinates, the pixel area, the lighting state and the minimum circumscribed rectangular area of the signal lamp corresponding to the different image frames.
The pixel ratio fg_ratio may be the ratio of the pixel area to the minimum circumscribed rectangular area of the signal lamp in the original parameters, for example, for a circular signal lamp in fig. 2, the ratio of the circular area to the dot-dash rectangle, i.e. the pixel ratio, may be generally above 0.8, and for a digital signal lamp in fig. 2, the ratio of the digital area to the dot-dash rectangle, i.e. the pixel ratio, may be generally around 0.3.
The position coordinates may be the position coordinates of the signal lamp in the original parameters, and if the signal lamp is in the off state, the position coordinates may be set to a null value. The coordinates may include an x-axis, a y-axis, a w signal width, and an h signal height.
The lamp lighting frequency freq may be a cumulative number of times the signal lamp is lighted in one cycle. For example, after counting the bright and dark states of the signal lamps in the original parameters in one period, the corresponding image frames are 1000 times when the red lamps are lighted, the corresponding image frames are 500 times when the green lamps are lighted, and the corresponding image frames are 40 times when the yellow lamps are lighted, so that the frequencies can be used as the lamp bright frequencies of the signal lamps in the period.
The display characteristic parameter of the color data corresponding to the different image frames can be generated according to the color data corresponding to the different image frames. Specifically, the color data RGB may be color data of the signal lamp in the original parameter, and if they are in the off state, they may be set to null values.
The display characteristic parameter of the status of the bright and dark states corresponding to different image frames can be generated according to the bright and dark states corresponding to different image frames. Specifically, the bright-dark state of the signal lamp can be obtained from the original parameters, and since the bright-dark state and the dark state can be represented by numerical values in the original parameters, the feature sequence can also be represented by numerical values. For example, when aiming at a certain image frame in a period, the red light is in a lighting state, and other lights are all turned off, so that the lighting state corresponding to the red light can be set to be a value of 1, and the lighting state corresponding to other signal lamps is set to be a value of 0.
The original parameters of the display characteristics corresponding to different image frames may be multi-dimensional, each dimension representing one of the original parameters. For example, when the red light is in the on state, the original parameters corresponding to the image frame at this time may be the position coordinates of the red light, the pixel area, the on state, the minimum area containing the red light, and the color data of the red light. If the signal lamp is in the off state, the signal lamp can be set to be null for a plurality of dimensions. Similarly, the original parameters over multiple periods may be generated for each of the multiple periods.
As shown in fig. 3, the original parameters corresponding to different image frames in a plurality of periods are shown. It should be noted that, if the signal lamps are shown in the right diagram of fig. 2, in practical application, there is a high possibility that two signal lamps are turned on simultaneously, two sets of original parameters may be included in the original parameters simultaneously, and each set of parameters may correspond to each other. It can be understood that the original parameters of all the signal lamps can be recorded, if a signal lamp is in an off state in the current image frame, the position coordinates, the pixel area, the minimum circumscribed rectangular area of the signal lamp and the color data can be all set to be null or 0, and the bright-dark state is set to be 0 to represent the off state. That is, if the signal lamp is shown in the left diagram of fig. 2, there may be three sets of values in each original parameter in fig. 3, corresponding to three signal lamps respectively.
For example, as shown in fig. 2, the signal lamp may include 3 or 4 signal lamps, and when the feature sequence is generated, a set of display feature parameters may be generated for each signal lamp in the feature sequence. For example, for the position coordinates, three coordinates may be included, which represent red, yellow and green lights in sequence, where when the red light is turned on, the first coordinate is the determined position coordinate, and the second two coordinates are null values, and similarly, other display feature parameters may also be similar, so that there may be three groups of feature sequences in each period, which represent red, yellow and green lights, respectively.
In practical applications, errors may occur due to different light conditions, or problems such as failure of the collection device. For example, due to the conditions of overexposure, underexposure, noise and the like, errors are caused to original parameters corresponding to different image frames, so that errors occur to generated display characteristic parameters, specifically, for example, a yellow lamp is identified as a red lamp, light rays are temporarily blocked due to leaves, and the conditions that a signal lamp is not identified are caused. Therefore, in order to detect the current display state of the signal lamp more accurately, generating the feature sequence of the signal lamp in a plurality of periods according to the image frames in a plurality of periods may include: a sequence of features of the signal lamp in a plurality of different accumulation periods is generated from the image frames in the plurality of periods.
Specifically, the accumulation period may be the accumulation of the previous period, or the accumulation of the adjacent period, or the like. For example, there are 10 periods in total, and the previous period is accumulated, and may be the previous period, the previous two periods, the previous three periods, and up to the previous ten periods. The accumulation period may include one period, or at least two adjacent consecutive periods, for example, the generation of the characteristic sequence of the signal lamp in a plurality of different accumulation periods may be sequentially generated in the first N accumulation periods, where N may be a positive integer greater than 0 and less than or equal to the number of periods. If n=10, there may be 10 feature sequences, which may be a sequence corresponding to the first period, a feature sequence corresponding to the first two periods, and a feature sequence corresponding to the first three periods, up to a feature sequence corresponding to the first ten periods, and a feature sequence corresponding to the first three periods.
As shown in fig. 4, a schematic diagram of a feature sequence over a plurality of cycles is generated. The first accumulation period may be the first period and the period before the first period, and since the first period is the initial period, the first period may be the previous period, and similarly, the first two periods, the first three periods, and the first N periods may be the next.
In practical applications, the accumulation period may further include a period between the current period and an adjacent period, for example, the first period may be accumulated with the second period, the second period may be accumulated with the first and third periods, the ninth period may be accumulated with the eighth and tenth periods, the tenth period may be accumulated with the ninth period, etc., so as to generate the feature sequences in a plurality of different accumulation periods.
Step 106: and determining the display change degree value in a plurality of periods according to the characteristic sequence in the plurality of periods.
In the foregoing steps, display characteristic parameters respectively corresponding to different image frames are generated. The display variation degree value in a plurality of periods can be determined based on the characteristic parameters in this step. The display change degree value can represent the display change degree between the signal lamps, for example, the red lamp is turned into the green lamp, and when the yellow lamp is repeatedly turned on and off, different display change degree values can be obtained.
According to the foregoing description, there are various display characteristic parameters, such as the pixel ratio fg_ratio, the position coordinates, the lamp lighting frequency freq, the color data RGB, the lighting status, etc. While different display characteristics may characterize different display variations, for example, there may be display characteristics related to signal light display locations, display characteristics related to signal light display colors, and display characteristics related to signal light status switching, etc.
Specifically, when the feature sequence includes position coordinates, pixel proportions, and lamp lighting frequencies corresponding to different image frames, the step can determine the position dispersion in a plurality of periods according to the display feature parameters. Here, the position dispersion characterizes the position dispersion degree among the signal lamps, the larger the dispersion is, the signal lamps at a plurality of different positions can be indicated to be bright and dark, and the smaller the dispersion is, the signal lamp position of the bright and dark change can be indicated to be relatively fixed.
For example, in a daily time period, in order to realize traffic control, the red, yellow and green lamps are alternately turned on and off, but in the early morning, because the traffic flow of people is very small and some road sections have only one passing direction, in order to enable people and vehicles to pass through quickly, the signal lamp can be modulated into a yellow flashing state, namely, only the yellow lamps are turned on and off (flashing) alternately faster, so that people and vehicles are prompted to pass through quickly. Then for both cases the first case will be relatively large due to the alternating ignition of the three lamps and the second case will be relatively small due to the rapid ignition of the yellow lamps only. Therefore, the position dispersion of the signal lamp in a plurality of periods can be determined, so that the display state of the signal lamp can be accurately detected.
Further, the same signal lamp can be subjected to position combination in the time domain to obtain the average position coordinate of the same signal lamp. For example, the average position coordinates can be obtained by directly averaging the position coordinates of the red light in different image frames, or the average position coordinates can be determined by using the pixel proportion, specifically, the method can be adopted as follows:
{x,y,w,h}=∑ t (fg_ratio t ×{x,y,w,h} t )/∑ t fg_ratio t
wherein t is the time corresponding to each of the different image frames in the period. For example, when the multiple periods are multiple accumulation periods as shown in fig. 3, t may be the respective corresponding times of different image frames in the previous period, and when accumulation is performed for the previous two periods, may be the respective corresponding times of different image frames in the previous two periods, etc.
{ x, y, w, h } is the average position coordinate; { x, y, w, h } t The position coordinate at the time t; fg_ratio t Is the pixel ratio.
In airspace, the distance between every two signal lamps can be determined,
x c =x+w/2;y c =y+h/2;D(i,j)=SQRT((x ci –x cj )^2+(y ci –y cj )^2);
wherein i, j=1, 2, … L, and i+.j, L is the number of signal lamps, x c And y c For centroid position coordinates, D is the euclidean distance and SQRT is the open square.
For example, if the signal lamps are shown in the left diagram of fig. 2, l=3, and the euclidean distance can be calculated between every two signal lamps.
The location dispersion can be expressed as:
position dispersion T =∑ ij ((freq i +freq j )×D(i,j))/∑ ij (freq i +freq j ) The method comprises the steps of carrying out a first treatment on the surface of the The freq is the lighting frequency, specifically, the cumulative number of times of lighting the ith or jth signal lamp in a period is counted, for example, according to the description above, in a period, 1000 times of corresponding image frames are counted when the red lamp is lighted, 500 times of green lamp and 40 times of yellow lamp, and the value can be utilized when the dispersion is determined.
Wherein T is different periods. For example, when the multiple periods are multiple accumulation periods as shown in fig. 3, then T is the previous period, the previous two periods, the previous N periods, etc.
If t=10, there may be 10 positional divergences.
When the feature sequence includes color data and lighting frequency of the lamps corresponding to different image frames, the step can determine the color discrete degree in a plurality of periods according to the display feature parameters in the feature sequence. Here, the color dispersion characterizes the degree of color dispersion among the signal lamps, and the larger the dispersion, the more the signal lamps of different colors are lighted, that is, the more the signal lamps of different colors are lighted, and the smaller the dispersion, the less the signal lamps of different colors are lighted.
For example, the red, yellow and green lamps are alternately turned on and off, or only the yellow lamps are alternately turned on and off. Since the three lamps are alternately lighted, the color dispersion is relatively large, and when only the yellow lamps are alternately lighted, the color dispersion is relatively small. Therefore, the color dispersion of the signal lamp in a plurality of periods can be determined, so that the display state of the signal lamp can be accurately detected.
Further, the same signal lamp can be subjected to color combination in the time domain to obtain the average color data of the same signal lamp. For example, the average color data can be obtained by directly averaging the color data of red light in different image frames, or the average color data can be determined by using the saturation, specifically, the method can be as follows:
rgb=∑ t rgb t ×S t /∑ t S t
wherein S is t =(max(r t ,g t ,b t )–min(r t ,g t ,b t ))/(max(r t ,g t ,b t )+min(r t ,g t ,b t ) With t=the first N cycles, N being a positive integer).
In the space domain, the chromatic aberration between every two signal lamps can be determined,
Δc=SQRT((Δl^2+Δa^2+Δb^2));
where Δc represents the color difference, Δl, Δa, Δb represent the difference between the two colors in different components, respectively, where the lab color space is based on the perception of color by the human eye, and may represent all colors perceived by the human eye, l represents the brightness, a represents the red-green color difference, and b represents blue Huang Secha. The equivalent color difference deltac can be obtained here in the rgb color space in the following way:
r’=(r i +r j )/2;Δr=r i –r j ;Δg=g i –g j ;Δb=b i –b j
Δc=SQRT((2+r’/256)×Δr^2+4×Δg^2+(2+(255-r’)/256)×Δb^2);
The calculated rgb value may be normalized and then the color difference Δc may be calculated in order to avoid that the range of the color difference fluctuates greatly due to an excessive difference in brightness between day and night. The normalization mode can be to stretch the maximum value corresponding to the rgb to 255, and then to adjust the other two components by proper values according to the stretch ratio. The color dispersion can be expressed as:
color dispersion T =∑ ij ((freq i +freq j )×Δc(i,j))/∑ ij (freq i +freq j )
Wherein i, j=1, 2, … L, and i+.j, L is the number of signal lamps,
if t=10, there may also be 10 color dispersions.
When the feature sequence includes bright and dark states corresponding to different image frames, the state switching rate in a plurality of periods can be determined according to the display feature parameters. Here, the state switching rate characterizes the switching frequency of the brightness and darkness between the signal lamps, and the larger the switching rate is, the more frequent the brightness and darkness of the signal lamps are, the smaller the switching rate is, and the more frequent and slower the brightness and darkness of the signal lamps are.
For example, the red, yellow and green lamps are alternately turned on and off, or only the yellow lamps are alternately turned on and off. In general, three lamps are alternately turned on to control traffic, so the state switching rate is not too frequent, but when only yellow lamps are turned on and off alternately, the state switching rate can be more frequent in order to prompt people and vehicles to pass quickly. Therefore, the state switching rate of the signal lamp in a plurality of periods can be determined, and the display state of the signal lamp can be accurately detected.
Further, the light-to-dark or dark-to-light determination of the same signal lamp can be made from the time domain. As already described above, the on state may be represented by a value of 1, the off state by a value of 0, then the bright-dark states corresponding to the plurality of image frames, a sequence of light and dark states can be formed, for example, can be 0, 1 1, 0, … …, etc. Accordingly, the number of switching counts can be determined according to the 1, 0 sequence of the signal lamp, wherein the number of switching counts can be the total number of times from 1 to 0 and from 0 to 1.
It has been mentioned above that errors may occur for various reasons, where if errors of the on state and the off state occur, the detection of the display state of the signal lamp may be directly affected, so here, R values before and after each 1 or 0 value may be taken as the center, and added to the center value, and 2r+1 is taken as the basis of the average value, and by rounding, if the average value is greater than 0.5, 1 is taken, and if the average value is less than 0.5, 0 is taken, so that average filtering is performed on the state sequence, and a flatter bright-dark state sequence is obtained. In practical applications, other mean filtering methods are also possible.
Accordingly, the state switching rate per cycle, or per accumulation period, may then be determined by: conf=count/T;
where t=the duration of the first N cycles, N being a positive integer.
Accumulating the state switching rate of the signal lamp in the airspace, the state switching rate can be expressed as:
state switching rate T =∑ i Conf i The method comprises the steps of carrying out a first treatment on the surface of the Wherein i=1, 2, … L, L is the number of signal lamps.
If t=10, there may be 10 state switching rates.
The position dispersion, the color dispersion and the state switching rate described above can represent the display state of the signal lamp to a certain extent, but in practical application, one of them can be selected for generation, or two or more of them can be selected for generation. Of course, in practical applications, other display change degree values may also be determined.
As shown in fig. 5, to obtain a relatively gentle level value and improve accuracy of determining a display state, where the plurality of periods may also be a plurality of different accumulation periods, the determining the display change level value in the plurality of periods according to the feature sequence in the plurality of periods may include: and determining the display change degree value in a plurality of different accumulation periods according to the characteristic sequences in the plurality of different accumulation periods. For example, fig. 5 may include a previous cycle, a previous two cycles, position dispersions, color dispersions, and state switching rates corresponding to the previous N cycles, respectively. If 10 periods are selected, there are 10 accumulation periods, each corresponding to the three display variation degree values, there may be 30 display variation degree values in total.
Step 108: and detecting the current display state of the signal lamp according to the relation between the display change degree values in a plurality of periods and the preset degree threshold value.
According to the foregoing steps, the display change degree values in a plurality of periods are determined, and the display change degree values in a plurality of different accumulation periods can be determined as described above, so in this step, the current display state of the signal lamp can be detected according to the relationship between the display change degree values in a plurality of different accumulation periods and the preset degree threshold value respectively.
Specifically, the display variation degree values in the plurality of different accumulation periods may have at least one of position dispersion, color dispersion, and state switching rate, such as 10 position dispersion, 10 color dispersion, and 10 state switching rate in 10 accumulation periods, for example, according to the foregoing examples. In practical applications, different display states generally have respective characteristics in terms of display change degree values, so a degree threshold may be preset according to the display change degree of a specific display state, that is, the preset degree threshold may be related to the display change degree value of each display state.
For example, when the signal lamp is in red, yellow and green intersection and is lighted, as the three lamps are alternately displayed and have different colors, and the red lamp and the green lamp are lighted for a longer time and a lower switching frequency under the actual traffic control condition, when the threshold value of the degree is preset for the display state, the position dispersion threshold value and the color dispersion threshold value can be set to be larger, and the state switching rate threshold value is set to be smaller; for another example, when the signal lamp is in the yellow light fast alternate on (flashing), since only the yellow light fast alternate on and off, both the position dispersion threshold and the color dispersion threshold can be set smaller, and the state switching rate threshold can be set larger. Accordingly, different degree thresholds can be preset for different display states.
Further, after the position dispersion threshold value, the color dispersion threshold value and the state switching rate threshold value are preset, the position dispersions, the color dispersions and the state switching rates corresponding to different accumulation periods can be respectively compared with the respective degree threshold values to obtain a magnitude relation, and the display state of the signal lamp is determined according to preset conditions.
For example, a set of level thresholds may be preset for the yellow-flashing state, and the period may be 10 accumulation periods as exemplified above, and may be marked as 1 when the position dispersion is smaller than the position dispersion threshold, or marked as 0 when the position dispersion is smaller than the color dispersion threshold, or similarly marked as 1 when the color dispersion is smaller than the color dispersion threshold, or marked as 0 when the state switching rate is larger than the state switching rate threshold, or marked as 1 when the state switching rate is larger than the state switching rate threshold. Thus three sets of sequences 1 and 0 can be obtained.
The preset conditions can be adopted for the yellow flashing state, and the number of times that each group of display change degree values appear 1 is more than or equal to 70 percent multiplied by T; there are two sequences having a number of occurrences of 1 equal to or greater than 90% x T times, and if t=10, the preset condition is that each sequence has a number of occurrences of 1 equal to or greater than 7 times, and there are two sequences having a number of occurrences of 1 equal to or greater than 9 times. If this condition is met, it may be determined that the signal is in a yellow flashing state.
That is, in one embodiment, in order to detect whether the signal lamp is in the yellow flash state more accurately, the detecting the current display state of the signal lamp according to the relationship between the display change degree values in the plurality of periods and the preset degree threshold values, respectively, may include: and detecting whether the signal lamp is in a yellow flashing display state according to the relation between the display change degree values in a plurality of periods and the preset yellow flashing display state degree threshold value.
The threshold level of yellow-flash display status here may include the location dispersion threshold, color dispersion threshold, and status switching rate threshold exemplified above for determining whether a yellow-flash status is present.
Similarly, the threshold of the display state degree can be preset according to the normal state of the traffic light, so that whether the traffic light is in the normal state can be determined according to the threshold. In addition, a threshold value of the display state degree under the fault state, such as faults such as abnormal alternating time intervals, can be preset according to the traffic light faults.
The above description describes how to detect the current display state of the signal lamp, taking the display change degree values corresponding to the multiple accumulation periods as an example, and it can be understood that the current display state of the signal lamp can also be detected according to the display change degree values corresponding to the multiple accumulation periods. Similarly, three display change degree values are exemplified above, and it is understood that the current display state of the signal lamp may be detected according to one display change degree value corresponding to a plurality of periods, and an adaptive change degree threshold is also required.
As already described above, errors may occur in the generation of the display sequence and the feature sequence for various reasons, thereby affecting the accuracy of the display variation degree value, so that the display state of the signal lamp is more accurately determined. In one embodiment, detecting the current display state of the signal lamp according to the relationship between the display variation degree values in the plurality of periods and the preset degree threshold values, respectively, may include: performing average filtering on the display change degree values in a plurality of periods to generate display change degree values after the average value in the plurality of periods; and detecting the current display state of the signal lamp according to the relation between the display change degree value after the average value in a plurality of periods and the preset degree threshold value.
Specifically, taking 10 position dispersions as an example, the average value filtering may be performed on the 10 position dispersions, for example, two adjacent position dispersions, namely, a front position dispersion and a rear position dispersion, may be selected with each position dispersion as a center, and a current dispersion is combined to determine an average value. And the first and the last position dispersion can be respectively combined with the last two position dispersion and the first two position dispersion to determine the average value, so that the display change degree value after average value filtering is performed in a plurality of periods or a plurality of accumulation periods can be generated. And then, determining whether the signal lamp is in a specific state according to the display change degree value after the mean value.
In practical application, if it is determined that the signal is in the yellow flashing state, a specific function, such as a function of detecting whether a red light running occurs, or the like, may be turned off.
The method provided by the above embodiment can be seen that, for an area including a signal lamp, image frames in a plurality of periods are collected, and for the signal lamp, a feature sequence in which different image frames in a plurality of periods respectively correspond to display feature parameters is generated, and then, according to the generated feature sequence, a display change degree value in the plurality of periods is determined, so that the current display state of the signal lamp can be detected according to the relationship between the display change degree value in the plurality of periods and the degree threshold value determined according to the specific display state.
That is, when detecting the current display state of the signal lamp, the display characteristic parameters of the image frames in a plurality of periods can be determined first, and then the display change degree value in a plurality of periods is determined according to the characteristic parameters, so that the effect of detecting the display state can be realized according to the relation between the display change degree value and the preset degree threshold.
The display change degree in a plurality of periods is used as the basis for detecting the display state of the signal lamp through the image frames in the plurality of periods, so that the display state of the signal lamp can be accurately identified in the process of collecting the image containing the signal lamp.
Example 2
Based on the same conception, embodiment 2 of the present application provides a detection device for a display state of a signal lamp, which can detect a current display state of the signal lamp more accurately. The structure of the device is schematically shown in fig. 6, and the device comprises: an image frame acquisition unit 202, a feature sequence generation unit 204, a degree value determination unit 206, and a state detection unit 208, wherein,
the image frame acquisition unit 202 may be configured to acquire image frames of a plurality of periods for an area where the signal lamp is located;
the feature sequence generating unit 204 may be configured to generate, according to image frames of multiple periods, a feature sequence of the signal lamp in the multiple periods, where the feature sequence includes display feature parameters corresponding to different image frames respectively;
A degree value determining unit 206, which may be configured to determine a display change degree value in a plurality of periods according to the feature sequences in the plurality of periods;
the state detection unit 208 may be configured to detect the current display state of the signal lamp according to the relationship between the display change degree values in the multiple periods and the preset degree threshold, where the preset degree threshold is related to the display change degree value of each display state.
In one embodiment, the degree value determining unit 206 may be configured to:
determining the position dispersion in a plurality of periods according to the display characteristic parameters related to the display positions of the signal lamps in the characteristic sequences in the plurality of periods;
the state detection unit 208 may be configured to:
and detecting the current display state of the signal lamp according to the relation between the position dispersion in a plurality of periods and the preset position dispersion threshold value.
In one embodiment, the degree value determining unit 206 may be configured to:
determining color discrete degrees in a plurality of periods according to display characteristic parameters related to signal lamp display colors in the characteristic sequences in the plurality of periods;
the state detection unit 208 may be configured to:
and detecting the current display state of the signal lamp according to the relation between the color discrete degree in a plurality of periods and the preset color discrete degree threshold value.
In one embodiment, the degree value determining unit 206 may be configured to:
according to the display characteristic parameters related to signal lamp state switching in the characteristic sequences in a plurality of periods, determining state switching rates in the plurality of periods;
the state detection unit 208 may be configured to:
and detecting the current display state of the signal lamp according to the relation between the state switching rates in a plurality of periods and the preset state switching rate threshold value.
In one embodiment, the feature sequence generating unit 204 may be configured to:
generating a characteristic sequence of the signal lamp in a plurality of different accumulation periods according to the image frames in the plurality of periods, wherein the accumulation period comprises one period or at least two adjacent continuous periods;
the degree value determining unit 206 may be configured to:
determining display variation degree values in a plurality of different accumulation periods according to the characteristic sequences in the plurality of different accumulation periods;
the state detection unit 208 may be configured to:
and detecting the current display state of the signal lamp according to the relation between the display change degree values in a plurality of different accumulation periods and the preset degree threshold value.
In one embodiment, the status detection unit 208 may be configured to:
Performing average filtering on the display change degree values in a plurality of periods to generate display change degree values after the average value in the plurality of periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree value after the average value in a plurality of periods and the preset degree threshold value.
In one embodiment, the status detection unit 208 may be configured to:
and detecting whether the signal lamp is in a yellow flashing display state according to the relation between the display change degree values in a plurality of periods and the preset yellow flashing display state degree threshold value.
The device provided by the above embodiment can be seen that, for an area including a signal lamp, image frames in a plurality of periods are collected, and for the signal lamp, a feature sequence in which different image frames in a plurality of periods respectively correspond to display feature parameters is generated, and then, according to the generated feature sequence, a display change degree value in the plurality of periods is determined, so that the current display state of the signal lamp can be detected according to the relationship between the display change degree value in the plurality of periods and the degree threshold value determined according to the specific display state.
That is, when detecting the current display state of the signal lamp, the display characteristic parameters of the image frames in a plurality of periods can be determined first, and then the display change degree value in a plurality of periods is determined according to the characteristic parameters, so that the effect of detecting the display state can be realized according to the relation between the display change degree value and the preset degree threshold.
The display change degree in a plurality of periods is used as the basis for detecting the display state of the signal lamp through the image frames in the plurality of periods, so that the display state of the signal lamp can be accurately identified in the process of collecting the image containing the signal lamp.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. At the hardware level, the electronic device comprises a processor, optionally an internal bus, a network interface, a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 7, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs, and a signal lamp display state detection device is formed on a logic level. The processor is used for executing the programs stored in the memory and is specifically used for executing the following operations:
collecting image frames of a plurality of periods in an area where the signal lamp is positioned;
generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames;
determining display variation degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, wherein the preset degree thresholds are related to the display change degree values of the display states.
The method executed by the signal lamp display state detection device provided in the embodiment shown in fig. 6 of the present application may be applied to a processor or implemented by the processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may also execute the function of the embodiment shown in fig. 7 of the detection device for the signal lamp display state provided in the embodiment shown in fig. 6, which is not described herein again.
The embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by an electronic device including a plurality of application programs, enable the electronic device to perform a method performed by a detecting apparatus for a display state of a signal lamp in the embodiment shown in fig. 6, and specifically are configured to perform:
collecting image frames of a plurality of periods in an area where the signal lamp is positioned;
Generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames;
determining display variation degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, wherein the preset degree thresholds are related to the display change degree values of the display states.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
All embodiments in the application are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred, so that each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method for detecting a display state of a signal lamp, comprising:
collecting image frames of a plurality of periods in an area where the signal lamp is positioned;
generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames;
determining display variation degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, wherein the preset degree thresholds are related to the display change degree values of the display states.
2. The method of claim 1, wherein determining a display variation level value over a plurality of periods from the sequence of features over the plurality of periods comprises:
Determining the position dispersion in a plurality of periods according to the display characteristic parameters related to the display positions of the signal lamps in the characteristic sequences in the plurality of periods;
according to the relation between the display change degree values in the periods and the preset degree threshold value, detecting the current display state of the signal lamp comprises the following steps:
and detecting the current display state of the signal lamp according to the relation between the position dispersion in the periods and the preset position dispersion threshold value.
3. The method of claim 1, wherein determining a display variation level value over a plurality of periods from the sequence of features over the plurality of periods comprises:
determining color discrete degrees in a plurality of periods according to display characteristic parameters related to the display colors of the signal lamps in the characteristic sequences in the plurality of periods;
according to the relation between the display change degree values in the periods and the preset degree threshold value, detecting the current display state of the signal lamp comprises the following steps:
and detecting the current display state of the signal lamp according to the relation between the color discrete degree in the periods and the preset color discrete degree threshold value.
4. The method of claim 1, wherein determining a display variation level value over a plurality of periods from the sequence of features over the plurality of periods comprises:
according to the display characteristic parameters related to the signal lamp state switching in the characteristic sequences in the periods, determining state switching rates in the periods;
according to the relation between the display change degree values in the periods and the preset degree threshold value, detecting the current display state of the signal lamp comprises the following steps:
and detecting the current display state of the signal lamp according to the relation between the state switching rates in the periods and the preset state switching rate threshold value.
5. The method of claim 1, wherein generating a signature sequence of the signal lamp over a plurality of cycles from the image frames over the plurality of cycles comprises:
generating a characteristic sequence of the signal lamp in a plurality of different accumulation periods according to the image frames in the periods, wherein the accumulation period comprises one period or at least two adjacent continuous periods;
determining a display variation degree value in a plurality of periods according to the characteristic sequence in the plurality of periods, wherein the method comprises the following steps of: determining display variation degree values in a plurality of different accumulation periods according to the characteristic sequences in the plurality of different accumulation periods;
According to the relation between the display change degree values in the periods and the preset degree threshold value, detecting the current display state of the signal lamp comprises the following steps: and detecting the current display state of the signal lamp according to the relation between the display change degree values in the different accumulation periods and the preset degree threshold value.
6. The method of any one of claims 1-5, wherein detecting a current display state of the signal lamp based on a relationship between the display variation level values and preset level thresholds, respectively, over the plurality of periods comprises:
performing average filtering on the display change degree values in the periods to generate display change degree values after the average value in the periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree value after the average value in the periods and the preset degree threshold value.
7. The method of claim 1, wherein detecting the current display state of the signal lamp based on the relationship between the display variation degree values in the plurality of periods and the preset degree threshold values, respectively, comprises:
And detecting whether the signal lamp is in a yellow flashing display state or not according to the relation between the display change degree values in the periods and the preset yellow flashing display state degree threshold value.
8. A signal lamp display state detection device, characterized by comprising: an image frame acquisition unit, a feature sequence generation unit, a degree value determination unit, and a state detection unit, wherein,
the image frame acquisition unit is used for acquiring image frames of a plurality of periods in the area where the signal lamp is positioned;
the characteristic sequence generating unit is used for generating characteristic sequences of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequences comprise display characteristic parameters respectively corresponding to different image frames;
the degree value determining unit is used for determining display change degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
the state detection unit is used for detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, and the preset degree thresholds are related to the display change degree values of the display states.
9. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
collecting image frames of a plurality of periods in an area where the signal lamp is positioned;
generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames;
determining display variation degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, wherein the preset degree thresholds are related to the display change degree values of the display states.
10. A computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to:
collecting image frames of a plurality of periods in an area where the signal lamp is positioned;
Generating a characteristic sequence of the signal lamp in a plurality of periods according to the image frames in the plurality of periods, wherein the characteristic sequence comprises display characteristic parameters respectively corresponding to different image frames;
determining display variation degree values in a plurality of periods according to the characteristic sequences in the plurality of periods;
and detecting the current display state of the signal lamp according to the relation between the display change degree values in the periods and preset degree thresholds, wherein the preset degree thresholds are related to the display change degree values of the display states.
CN201911302907.2A 2019-12-17 2019-12-17 Signal lamp display state detection method and device Active CN112989891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911302907.2A CN112989891B (en) 2019-12-17 2019-12-17 Signal lamp display state detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911302907.2A CN112989891B (en) 2019-12-17 2019-12-17 Signal lamp display state detection method and device

Publications (2)

Publication Number Publication Date
CN112989891A CN112989891A (en) 2021-06-18
CN112989891B true CN112989891B (en) 2024-03-08

Family

ID=76342336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911302907.2A Active CN112989891B (en) 2019-12-17 2019-12-17 Signal lamp display state detection method and device

Country Status (1)

Country Link
CN (1) CN112989891B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113723229A (en) * 2021-08-16 2021-11-30 浙江大华技术股份有限公司 Signal lamp detection method and device and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102142197A (en) * 2011-03-31 2011-08-03 汤一平 Intelligent traffic signal lamp control device based on comprehensive computer vision
CN102354457A (en) * 2011-10-24 2012-02-15 复旦大学 General Hough transformation-based method for detecting position of traffic signal lamp
CN106507079A (en) * 2016-11-03 2017-03-15 浙江宇视科技有限公司 A kind of color rendition method and device
CN107644538A (en) * 2017-11-01 2018-01-30 广州汽车集团股份有限公司 The recognition methods of traffic lights and device
CN110533940A (en) * 2019-08-15 2019-12-03 北京百度网讯科技有限公司 Method, apparatus, equipment and the computer storage medium of abnormal traffic signal lamp identification
CN110543818A (en) * 2019-07-25 2019-12-06 长沙行深智能科技有限公司 Traffic light tracking method, device, medium and equipment based on weight graph matching

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034735A1 (en) * 2017-07-25 2019-01-31 Motionloft, Inc. Object detection sensors and systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102142197A (en) * 2011-03-31 2011-08-03 汤一平 Intelligent traffic signal lamp control device based on comprehensive computer vision
CN102354457A (en) * 2011-10-24 2012-02-15 复旦大学 General Hough transformation-based method for detecting position of traffic signal lamp
CN106507079A (en) * 2016-11-03 2017-03-15 浙江宇视科技有限公司 A kind of color rendition method and device
CN107644538A (en) * 2017-11-01 2018-01-30 广州汽车集团股份有限公司 The recognition methods of traffic lights and device
CN110543818A (en) * 2019-07-25 2019-12-06 长沙行深智能科技有限公司 Traffic light tracking method, device, medium and equipment based on weight graph matching
CN110533940A (en) * 2019-08-15 2019-12-03 北京百度网讯科技有限公司 Method, apparatus, equipment and the computer storage medium of abnormal traffic signal lamp identification

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《Evolutionary feature and instance selection for traffic sign recognition》;Zong-Yao Chen等;《Computers in Industry》;全文 *
《基于视频图像的道路交通事故信号灯状态鉴定》;张泽枫 等;《中国司法鉴定》;全文 *

Also Published As

Publication number Publication date
CN112989891A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
JP6923754B2 (en) Image capture method and equipment
US11700457B2 (en) Flicker mitigation via image signal processing
CN105812674B (en) A kind of color correct method, monitoring method and the device of signal lamp
CN109146855A (en) A kind of image mole marks detection method, terminal device and storage medium
CN110533955B (en) Method for determining parking space, terminal equipment and computer readable storage medium
CN109816621B (en) Abnormal light spot detection device and method and electronic equipment
CN112235512B (en) Image exposure parameter adjusting method, equipment and device
CN111383189B (en) Method and device for removing moire and image display
JP2020113274A (en) Training method of object recognition neural network, apparatus and computing device
CN109145678A (en) Signal lamp detection method and device and computer equipment and readable storage medium storing program for executing
CN112989891B (en) Signal lamp display state detection method and device
CN111937497B (en) Control method, control device and infrared camera
CN105554380A (en) Day and night switching method and day and night switching device
CN111738161B (en) Living body detection method and device and electronic equipment
US11416707B2 (en) Information processing method, information processing system, and information processing apparatus
CN109286758A (en) A kind of generation method of high dynamic range images, mobile terminal and storage medium
JP2020061127A (en) Lane change vehicle detection device, method, and video monitoring device
JP2015173810A (en) Detector, detection program, and detection method
CN114727024A (en) Automatic exposure parameter adjusting method and device, storage medium and shooting equipment
CN111797726A (en) Flame detection method and device, electronic equipment and storage medium
CN113747008B (en) Camera and light supplementing method
CN111447405A (en) Exposure method and device for video monitoring
EP3265765A1 (en) Sensing images and light sources
CN105430352B (en) A kind of processing method of video monitoring image
JP2020504383A (en) Image foreground detection device, detection method, and electronic apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant