CN113011251B - Pedestrian traffic light identification method based on geometric attributes of traffic lights - Google Patents

Pedestrian traffic light identification method based on geometric attributes of traffic lights Download PDF

Info

Publication number
CN113011251B
CN113011251B CN202110147603.4A CN202110147603A CN113011251B CN 113011251 B CN113011251 B CN 113011251B CN 202110147603 A CN202110147603 A CN 202110147603A CN 113011251 B CN113011251 B CN 113011251B
Authority
CN
China
Prior art keywords
traffic light
traffic
shape
frame image
dynamic 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
CN202110147603.4A
Other languages
Chinese (zh)
Other versions
CN113011251A (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.)
Huishi Innovation Shenzhen Co ltd
Shenzhen University
Original Assignee
Huishi Innovation Shenzhen Co ltd
Shenzhen University
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 Huishi Innovation Shenzhen Co ltd, Shenzhen University filed Critical Huishi Innovation Shenzhen Co ltd
Priority to CN202110147603.4A priority Critical patent/CN113011251B/en
Publication of CN113011251A publication Critical patent/CN113011251A/en
Application granted granted Critical
Publication of CN113011251B publication Critical patent/CN113011251B/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
    • 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
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/005Traffic control systems for road vehicles including pedestrian guidance indicator
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/04Detecting movement of traffic to be counted or controlled using optical or ultrasonic detectors

Landscapes

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

Abstract

The invention discloses a pedestrian traffic light identification method based on geometric attributes of traffic lights, which comprises the following steps: acquiring a traffic light frame image; identifying the shape of the traffic light according to the traffic light frame image; and identifying the dynamic state of the traffic light according to the traffic light frame image and the shape. The invention recognizes the dynamic state of the traffic light through the traffic light frame image and the recognized shape of the traffic light, so as to provide more accurate guidance for visually impaired people.

Description

Pedestrian traffic light identification method based on geometric attributes of traffic lights
Technical Field
The invention relates to the technical field of image processing, in particular to a pedestrian traffic light identification method based on geometric attributes of traffic lights.
Background
The traffic light detection aims at identifying the traffic light state of an intersection, and is mainly widely applied to the fields of vision-based automatic driving, blind navigation and the like. Traffic lights can be classified into vehicle traffic lights and pedestrian traffic lights, wherein vehicle traffic light identification is mainly applied to automatic driving and pedestrian traffic lights are mainly applied to the assistance of visually impaired people. The traffic light identification method in the prior art is greatly influenced by background color, the accuracy is to be improved, but a traffic light identification algorithm based on machine learning is lack of an algorithm for effectively distinguishing pedestrian traffic lights, vehicle traffic lights and extinguished traffic lights, and the dynamic state change of the traffic lights is lack of reasonable analysis.
Accordingly, there is a need for improvement and development in the art.
Disclosure of Invention
The invention aims to solve the technical problems that the prior art is overcome by providing a pedestrian traffic light identification method based on geometric attributes of traffic lights, and aims to solve the problems that the prior art is greatly influenced by background colors, the accuracy is to be improved, a machine learning-based traffic light identification algorithm is lack of an algorithm for effectively distinguishing pedestrian traffic lights, vehicle traffic lights and extinguished traffic lights, and the dynamic state change of the traffic lights is lack of reasonable analysis.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a pedestrian traffic light identification method based on geometric attributes of traffic lights, where the method includes:
Acquiring a traffic light frame image;
identifying the shape of the traffic light according to the traffic light frame image;
and identifying the dynamic state of the traffic light according to the traffic light frame image and the shape.
In one implementation, the identifying the shape of the traffic light according to the traffic light frame image includes:
Performing gray level conversion on the traffic light frame image to obtain a gray level image;
obtaining a mask area according to the traffic light frame image;
And obtaining the shape of the traffic light according to the gray level map and the mask area.
In one implementation manner, the obtaining a mask area according to the traffic light frame image includes:
extracting a red area and a green area in the traffic light frame image based on an HSV color space;
And carrying out OR operation on the red area and the green area to obtain a mask area.
In one implementation manner, the obtaining the shape of the traffic light according to the gray scale map and the mask area includes:
multiplying the gray scale image by the mask area to obtain the shape of the traffic light.
In one implementation, the identifying the shape of the traffic light according to the traffic light frame image further includes:
acquiring the height and the width of the shape;
Obtaining the aspect ratio of the shape according to the height and the width;
And distinguishing the pedestrian traffic light, the vehicle traffic light, the extinguished pedestrian traffic light and the extinguished vehicle traffic light according to the aspect ratio so as to realize the shape identification of the traffic light.
In one implementation, the identifying the dynamic state of the traffic light according to the traffic light frame image and the shape includes:
when the traffic light is determined to be a pedestrian traffic light or a extinguished pedestrian traffic light according to the shape, recording a traffic light state identifier in each frame of traffic light frame image;
Calculating the average value of the traffic light state identifiers of the current frame and the traffic light state identifiers of a plurality of frames before the current frame;
and obtaining the dynamic state of the traffic light according to the average value and the traffic light state identification of the current frame.
In one implementation manner, the obtaining the dynamic state of the traffic light according to the average value and the traffic light state identifier of the current frame includes:
when the average value is-1, the dynamic state of the traffic light is a continuous red light;
when the average value is 1, the dynamic state of the traffic light is a continuous green light;
when the average value is 0.6, the dynamic state of the traffic light is in flickering;
when the average value is 0 and the traffic light state identification of the current frame is 1, the dynamic state of the traffic light is changed from red light to green light;
when the average value is 0 and the traffic light state identification of the current frame is-1, the dynamic state of the traffic light is changed from a green light to a red light;
when the average value is 0 and the traffic light state identification of the current frame is 0, the dynamic state of the traffic light is that no traffic light exists;
When the mean value is not-1,1,0.6 and 0, the dynamic state of the traffic light is waiting.
In one implementation, the identifying the dynamic state of the traffic light according to the traffic light frame image and the shape further includes:
and determining prompt voice corresponding to the dynamic state of the traffic light according to the dynamic state of the traffic light.
In a second aspect, an embodiment of the present invention further provides a pedestrian traffic light identification device based on geometric attributes of a traffic light, where the device includes:
the frame image acquisition unit is used for acquiring traffic light frame images;
the traffic light shape recognition unit is used for recognizing the shape of the traffic light according to the traffic light frame image;
And the dynamic state identification unit is used for identifying the dynamic state of the traffic light according to the traffic light frame image and the shape.
In a third aspect, an embodiment of the present invention further provides an intelligent terminal, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by the one or more processors, where the one or more programs include a method for identifying a pedestrian traffic light based on geometric attributes of the traffic light according to any one of the above.
In a fourth aspect, embodiments of the present invention also provide a non-transitory computer-readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the pedestrian traffic light identification method based on the geometric attributes of a traffic light as described in any one of the above.
The invention has the beneficial effects that: firstly, acquiring a traffic light frame image; then, according to the traffic light frame image, the shape of the traffic light is identified; and finally, identifying the dynamic state of the traffic light according to the traffic light frame image and the shape. Therefore, in the embodiment of the invention, the dynamic state of the traffic light is identified through the traffic light frame image and the identified traffic light shape, so as to provide more accurate guidance for visually impaired people.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings may be obtained according to the drawings without inventive effort to those skilled in the art.
Fig. 1 is a schematic flow chart of a pedestrian traffic light recognition method based on geometric attributes of traffic lights according to an embodiment of the present invention.
Fig. 2 is a diagram of an overall frame of traffic light recognition according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of geometric properties of different traffic lights according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of different state changes of a traffic light according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a traffic light dynamic state analysis algorithm according to an embodiment of the present invention.
Fig. 6 is a schematic block diagram of a pedestrian traffic light recognition device based on geometric attributes of traffic lights according to an embodiment of the present invention.
Fig. 7 is a schematic block diagram of an internal structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
The invention discloses a pedestrian traffic light identification method based on geometric attributes of traffic lights, which is used for making the purposes, technical schemes and effects of the invention clearer and more definite, and the invention is further described in detail below by referring to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In the prior art, the traffic light detection aims at identifying the traffic light state of an intersection, and is mainly widely applied to the fields of vision-based automatic driving, blind navigation and the like. Traffic lights can be classified into vehicle traffic lights and pedestrian traffic lights, wherein vehicle traffic light identification is mainly applied to automatic driving and pedestrian traffic lights are mainly applied to the assistance of visually impaired people. The current traffic light identification method is mainly based on the characteristics of color, size, shape and the like of traffic lights. The method is mainly based on the methods of horizon searching, image matching, color filtering, similarity estimation, machine learning and the like.
And estimating the gravity direction according to the built-in acceleration of the mobile phone, calculating the position of the horizon, performing convolution operation near the horizon by using a preset traffic light template to obtain a candidate region with higher score, and finally analyzing the shape of the candidate region to extract the traffic light region. Based on a color filtering method, color filtering is carried out on an input image, red and green connected areas in the image are extracted, and then pedestrian traffic light areas are extracted through the characteristics of area, position, shape and the like. The basic idea of the algorithm is to extract candidate areas from images by using the obvious characteristics of the traffic lights, and then extract the traffic light areas by methods such as image matching, similarity estimation and the like. The algorithm is greatly influenced by the background color, and the accuracy is required to be improved. With the rapid development of machine learning algorithms, more and more students propose traffic light recognition algorithms based on machine learning. Common machine learning algorithms include Adaboost, faster R-CNN, SSD, YOLOv and the like. The algorithms fit the positions and the categories of the traffic lights through data training, and have good effects when the traffic lights exist in a scene, but the existing algorithms lack algorithms for effectively distinguishing pedestrian traffic lights, vehicle traffic lights and extinguished traffic lights, and lack reasonable analysis on the dynamic state change of the traffic lights. In order to solve the problems in the prior art, the embodiment provides a pedestrian traffic light identification method based on geometric attributes of traffic lights, and by the method, the dynamic state of the traffic lights can be identified by traffic light frame images and the identified shapes of the traffic lights, so that more accurate guidance is provided for visually impaired people. When the method is implemented, firstly, a traffic light frame image is acquired, and preparation is made for the follow-up recognition of the shape of the traffic light; then, according to the traffic light frame image, the shape of the traffic light is identified and used for identifying the dynamic state of the traffic light; and finally, identifying the dynamic state of the traffic light according to the traffic light frame image and the shape. Therefore, after the dynamic state of the traffic light is identified, more accurate guidance is provided for visually impaired people in a voice broadcasting mode.
Illustrative examples
The invention aims to solve the problems, by identifying whether the traffic light is a pedestrian passage or a vehicle passage, for example, the traffic light is round, the traffic light can be identified as a pedestrian passage according to the fact that the traffic light is round, the visually impaired person can pass along the pedestrian passage, the shape of the traffic light and the dynamic state of the traffic light are identified according to the traffic light characteristics of the pedestrian passage, for example, the visually impaired person is informed of the pedestrian passage by voice broadcasting by identifying whether the traffic light is a continuous green light or a red light to a green light; identifying that the traffic light of the traveler is red light or the green light is changed into red light, and informing the visually impaired person to wait; identifying that the traffic lights of the travelers flash on green light, informing visually impaired people that the green light is about to end, and suggesting waiting; and if no traffic light exists in the identifying pedestrian traffic light, no notification prompt tone is sent.
Exemplary method
The embodiment provides a pedestrian traffic light identification method based on geometric attributes of traffic lights, which can be applied to intelligent terminals in the field of intelligent traffic. As shown in fig. 1, the method includes:
Step S100, acquiring a traffic light frame image;
Specifically, the traffic light frame image shot by the camera can be acquired, or the traffic light frame image can be downloaded from the network, so that preparation is made for the subsequent identification of the shape of the traffic light and the dynamic state of the traffic light.
After the traffic light frame image is obtained, executing step S200 shown in fig. 1, and identifying the shape of the traffic light according to the traffic light frame image;
in practice, since traffic lights are classified into pedestrian traffic lights and vehicle traffic lights, the pedestrian traffic lights are shaped like a human, and the vehicle traffic lights are shaped like a circle, whether it is a pedestrian passage or a vehicle passage can be judged by analyzing the shape of the vehicle traffic lights. In addition, there is a case where the pedestrian traffic light and the vehicle traffic light are extinguished, and this special case needs to be classified into the shape of the traffic light.
In order to obtain the shape of the traffic light, the step of identifying the shape of the traffic light according to the traffic light frame image comprises the following steps:
Step S201, carrying out gray level conversion on the traffic light frame image to obtain a gray level image;
step S202, obtaining a mask area according to the traffic light frame image;
and step 203, obtaining the shape of the traffic light according to the gray level diagram and the mask area.
Specifically, the traffic light frame image may be subjected to gray level conversion by a detection method to obtain a gray level image, for example, an input frame image is detected by using a target detection model, a detection result is used as a candidate region, for example, fig. 2 (b) is a colored image, the color of the traffic light in the candidate region is an actual color, and gray level conversion is performed on the candidate regions to obtain the gray level image. Fig. 2 (d) is an HSV diagram, also a colored diagram, with the colors of the traffic light in fig. 2 (d) being distinguished from the colors of the remaining areas of the traffic light. And then obtaining a mask area according to the traffic light frame image. Correspondingly, in order to obtain the film region, the step of obtaining the mask region according to the traffic light frame image comprises the following steps: extracting a red area and a green area in the traffic light frame image based on an HSV color space; and carrying out OR operation on the red area and the green area to obtain a mask area. Specifically, in the present embodiment, the mask area is denoted by mask, the HSV color space conversion is performed based on the HSV color space, and the process of extracting the red area and the green area in the traffic light frame image is to set the ranges of the three HSV channels to [0,34], [20,255], [200,255] and [156,180], [20,255], [200,255] respectively according to the HSV color space table in the HSV color map, and the red area of the HSV color space can be extracted using the ranges. The range of the three HSV channels is then set to [35,99], [20,255], [180,255], respectively, with which the green region of the HSV color space can be extracted. The red and green areas are then or-treated, the result being represented by mask, and the masked areas are obtained.
After the gray level map and the mask area are obtained, the shape of the traffic light can be obtained according to the gray level map and the mask area. Correspondingly, the step of obtaining the shape of the traffic light according to the gray level diagram and the mask area comprises the following steps: multiplying the gray scale image by the mask area to obtain the shape of the traffic light. Specifically, the mask is used to multiply the gray scale map to obtain the shape of the traffic light in the input frame image.
In addition, the identifying the shape of the traffic light according to the traffic light frame image further comprises: acquiring the height and the width of the shape; obtaining the aspect ratio of the shape according to the height and the width; and distinguishing the pedestrian traffic light, the vehicle traffic light, the extinguished pedestrian traffic light and the extinguished vehicle traffic light according to the aspect ratio so as to realize the shape identification of the traffic light. In this embodiment, fig. 2 (a) is an input frame; FIG. 2 (b) is a candidate region; FIG. 2 (c) is a gray scale; FIG. 2 (d) is an HSV diagram; FIG. 2 (e) is a mask; fig. 2 (f) is a traffic light shape, and the aspect ratio AspectRatio of the smallest circumscribed rectangular frame of the traffic light shape is calculated from fig. 2 (f):
Because the manufacturing standards of the traffic lights are not different, according to the result of fig. 3, the invention sets the height-width ratio threshold to be 1.35, the traffic lights higher than the threshold are pedestrian traffic lights, the traffic lights lower than or equal to the threshold are vehicle traffic lights, in special cases, if the height-width ratio of the traffic lights is 0, the traffic lights are extinguished traffic lights, and the extinguished traffic lights can determine whether the extinguished pedestrian traffic lights or the extinguished vehicle traffic lights according to the identified pedestrian traffic lights or the vehicle traffic lights, so that finally, the pedestrian traffic lights, the vehicle traffic lights, the extinguished pedestrian traffic lights and the extinguished vehicle traffic lights can be determined according to the height-width ratio.
After the traffic light frame image and the shape of the traffic light are obtained, step S300 shown in fig. 1 may be performed to identify the dynamic state of the traffic light according to the traffic light frame image and the shape.
Specifically, continuous traffic light frame images are acquired at this time, and the dynamic state of the traffic light can be determined by analyzing the continuous multi-frame images of the traffic light and according to the shape of the traffic light.
In order to identify the dynamic state of the traffic light, the step of identifying the dynamic state of the traffic light according to the traffic light frame image and the shape comprises the following steps:
Step 301, when the traffic light is determined to be a pedestrian traffic light or a extinguished pedestrian traffic light according to the shape, recording a traffic light state identifier in each frame of traffic light frame image;
Step S302, calculating the average value of the traffic light state identifiers of the current frame and the traffic light state identifiers of a plurality of frames before the current frame;
Step S303, obtaining the dynamic state of the traffic light according to the average value and the traffic light state identification of the current frame.
In this embodiment, when it is determined that the traffic light is a pedestrian traffic light or a extinguished pedestrian traffic light according to the shape, a traffic light status identifier in a frame image of each of the continuous frame images is recorded, where the traffic light status identifier is a status value represented when the traffic light is a red light, a green light or is extinguished, for example, when the traffic light status is a red light, flag is-1; when the lamp is green, the flag is 1; when no traffic light exists (or the traffic light is in an off state), the flag is 0, wherein the flag is a state identifier.
Then, the mean value of the traffic light status identifier of the current frame and the traffic light status identifiers of the previous frames of the current frame is calculated, in this embodiment, fig. 4 illustrates possible status transitions of some traffic lights, and in order to ensure the accuracy of analysis results, it is assumed that detection results of a plurality of traffic lights appear in one frame of image, where the detection results include the edge frame coordinates x, y, w, h (bounding box) of the object, the classification (label) of the object, and the confidence (score) of each class, and only the result with the highest confidence is taken to ensure that there is and only one flag in one frame of image. Based on the flag change diagram shown in fig. 4 (a), the invention provides a traffic light state analysis algorithm based on the mean value. That is, the average avg of the flag in the current frame and the previous N-1 frames is calculated, and the result is shown in FIG. 4 (b). Based on the flag change diagram shown in fig. 4 (a), the invention provides a traffic light state analysis algorithm based on the mean value. That is, the average avg of the flag in the current frame and the previous N-1 frames is calculated, and the result is shown in FIG. 4 (b). According to 4 values of avg in the graph (respectively, -1, 0, 0.6, 1), wherein avg is within an error range of + -0.05. I.e. the intersection of the 4 green dashed lines with avg, the dynamic state of the traffic light of the current frame can be analyzed.
After the average value and the traffic light state identification of the current frame are obtained, the dynamic state of the traffic light can be obtained according to the average value and the traffic light state identification of the current frame. Correspondingly, in order to obtain the dynamic state of the traffic light, the step of obtaining the dynamic state of the traffic light according to the average value and the traffic light state identifier of the current frame includes the following steps: when the average value is-1, the dynamic state of the traffic light is a continuous red light; when the average value is 1, the dynamic state of the traffic light is a continuous green light; when the average value is 0.6, the dynamic state of the traffic light is in flickering; when the average value is 0 and the traffic light state identification of the current frame is 1, the dynamic state of the traffic light is changed from red light to green light; when the average value is 0 and the traffic light state identification of the current frame is-1, the dynamic state of the traffic light is changed from a green light to a red light; when the average value is 0 and the traffic light state identification of the current frame is 0, the dynamic state of the traffic light is that no traffic light exists; when the mean value is not-1,1,0.6 and 0, the dynamic state of the traffic light is waiting. The specific analysis algorithm is shown in fig. 5, and can identify seven states in total: continuous red light, continuous green light, red light to green light, green light to red light, no red green light, blinking neutralization and waiting. Because N frames of data are utilized, the influence caused by false detection or omission of a certain frame can be effectively reduced, but the analysis result and the actual result have time delay, and within a certain range, the smaller N is, the smaller the time delay is, the larger the fluctuation of avg is when a traffic light flickers; the larger N is, the larger the time delay is, and the smaller the fluctuation of avg is when the traffic light blinks. Where N is a time threshold. For a 30 frame rate camera, n=60, if avg= -1, it is indicated that the traffic light state remains in the red light state for two seconds. According to experimental results, compared with n=30 and n=90, N is 60, and the time delay is less than 1 second (the time delay is only when the traffic light state changes).
Since the visually impaired person needs a voice prompt to guide the person to pass through the pedestrian, the step of identifying the dynamic state of the traffic light according to the traffic light frame image and the shape further comprises the following steps: and determining prompt voice corresponding to the dynamic state of the traffic light according to the dynamic state of the traffic light. Specifically, according to the seven states obtained by recognition, different prompting tones are given: continuous red light: "red light, please wait"; continuous green light: "green light, please go straight"; red light changes to green light: green light, please pass; the green light is changed into a red light: "red light, please wait"; in the flicker: "green light is about to end, suggest waiting"; no traffic light or waiting: there is no alert tone.
In another embodiment, the method may be modified according to the present embodiment, for example, when identifying a vehicle traffic light and a turned-off vehicle traffic light, the value of the traffic light status may be determined according to the color of the traffic light, such as red, yellow, green and turned-off status, and thus the status identifications of the traffic lights of the frame images of the vehicle traffic lights of consecutive frames are recorded, the average value of the status identifications of the current frame and several frames preceding the current frame is calculated, and the dynamic status of the vehicle traffic light is obtained according to the average value, so that the automatic driving traffic of the vision-based automatic driving vehicle may be guided according to the dynamic status.
Exemplary apparatus
As shown in fig. 6, an embodiment of the present invention provides a pedestrian traffic light recognition apparatus based on geometric attributes of traffic lights, the apparatus including: a frame image acquisition unit 401, a traffic light shape recognition unit 402, a traffic light dynamic state recognition unit 403, wherein:
A frame image acquisition unit 401 for acquiring a traffic light frame image;
a traffic light shape recognition unit 402 for recognizing a shape of a traffic light based on the traffic light frame image;
and a dynamic state identifying unit 403 of the traffic light, configured to identify a dynamic state of the traffic light according to the traffic light frame image and the shape.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a functional block diagram thereof may be shown in fig. 7. The intelligent terminal comprises a processor, a memory, a network interface, a display screen and a temperature sensor which are connected through a system bus. The processor of the intelligent terminal is used for providing computing and control capabilities. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the intelligent terminal is used for communicating with an external terminal through network connection. The computer program is executed by a processor to implement a pedestrian traffic light identification method based on geometric properties of the traffic light. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and a temperature sensor of the intelligent terminal is arranged in the intelligent terminal in advance and used for detecting the running temperature of internal equipment.
It will be appreciated by those skilled in the art that the schematic diagram of fig. 7 is merely a block diagram of a portion of the structure related to the present invention, and does not constitute a limitation of the smart terminal to which the present invention is applied, and a specific smart terminal may include more or less components than those shown in the drawings, or may combine some components, or have different arrangements of components.
In one embodiment, a smart terminal is provided that includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for:
Acquiring a traffic light frame image;
identifying the shape of the traffic light according to the traffic light frame image;
and identifying the dynamic state of the traffic light according to the traffic light frame image and the shape.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
In summary, the invention discloses a pedestrian traffic light identification method based on geometric attributes of traffic lights, which comprises the following steps: acquiring a traffic light frame image; identifying the shape of the traffic light according to the traffic light frame image; and identifying the dynamic state of the traffic light according to the traffic light frame image and the shape. The invention recognizes the dynamic state of the traffic light through the traffic light frame image and the recognized shape of the traffic light, so as to provide more accurate guidance for visually impaired people.
It is to be understood that the invention discloses a method for identifying pedestrian traffic lights based on geometric properties of the traffic lights, and that the application of the invention is not limited to the examples described above, but may be modified or altered by those skilled in the art in light of the above description, all of which are intended to fall within the scope of the appended claims.

Claims (6)

1. A pedestrian traffic light identification method based on geometric attributes of traffic lights, the method comprising:
Acquiring a traffic light frame image;
identifying the shape of the traffic light according to the traffic light frame image;
Identifying the dynamic state of the traffic light according to the traffic light frame image and the shape;
the identifying the shape of the traffic light according to the traffic light frame image comprises:
Performing gray level conversion on the traffic light frame image to obtain a gray level image;
obtaining a mask area according to the traffic light frame image;
obtaining the shape of the traffic light according to the gray level map and the mask area;
The identifying the shape of the traffic light according to the traffic light frame image further comprises:
acquiring the height and the width of the shape;
Obtaining the aspect ratio of the shape according to the height and the width;
Distinguishing pedestrian traffic lights, vehicle traffic lights, extinguished pedestrian traffic lights and extinguished vehicle traffic lights according to the aspect ratio to realize shape recognition of the traffic lights;
the identifying the dynamic state of the traffic light according to the traffic light frame image and the shape comprises:
when the traffic light is determined to be a pedestrian traffic light or a extinguished pedestrian traffic light according to the shape, recording a traffic light state identifier in each frame of traffic light frame image;
Calculating the average value of the traffic light state identifiers of the current frame and the traffic light state identifiers of a plurality of frames before the current frame;
obtaining the dynamic state of the traffic light according to the average value and the traffic light state identification of the current frame;
The step of obtaining the dynamic state of the traffic light according to the average value and the traffic light state identifier of the current frame comprises the following steps:
when the average value is-1, the dynamic state of the traffic light is a continuous red light;
when the average value is 1, the dynamic state of the traffic light is a continuous green light;
when the average value is 0.6, the dynamic state of the traffic light is in flickering;
when the average value is 0 and the traffic light state identification of the current frame is 1, the dynamic state of the traffic light is changed from red light to green light;
when the average value is 0 and the traffic light state identification of the current frame is-1, the dynamic state of the traffic light is changed from a green light to a red light;
when the average value is 0 and the traffic light state identification of the current frame is 0, the dynamic state of the traffic light is that no traffic light exists;
When the mean value is not-1,1,0.6 and 0, the dynamic state of the traffic light is waiting.
2. The pedestrian traffic light identification method based on the geometric attributes of the traffic light according to claim 1, wherein the obtaining a mask area according to the traffic light frame image comprises:
extracting a red area and a green area in the traffic light frame image based on an HSV color space;
And carrying out OR operation on the red area and the green area to obtain a mask area.
3. The pedestrian traffic light identification method based on the geometric attributes of the traffic light according to claim 1, wherein the obtaining the shape of the traffic light according to the gray scale map and the mask area comprises:
multiplying the gray scale image by the mask area to obtain the shape of the traffic light.
4. The pedestrian traffic light identification method based on the geometric attributes of the traffic light according to claim 1, wherein the identifying the dynamic state of the traffic light based on the traffic light frame image and the shape further comprises:
and determining prompt voice corresponding to the dynamic state of the traffic light according to the dynamic state of the traffic light.
5. An intelligent terminal comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for performing the method of any of claims 1-4.
6. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1-4.
CN202110147603.4A 2021-02-03 2021-02-03 Pedestrian traffic light identification method based on geometric attributes of traffic lights Active CN113011251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110147603.4A CN113011251B (en) 2021-02-03 2021-02-03 Pedestrian traffic light identification method based on geometric attributes of traffic lights

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110147603.4A CN113011251B (en) 2021-02-03 2021-02-03 Pedestrian traffic light identification method based on geometric attributes of traffic lights

Publications (2)

Publication Number Publication Date
CN113011251A CN113011251A (en) 2021-06-22
CN113011251B true CN113011251B (en) 2024-06-04

Family

ID=76384978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110147603.4A Active CN113011251B (en) 2021-02-03 2021-02-03 Pedestrian traffic light identification method based on geometric attributes of traffic lights

Country Status (1)

Country Link
CN (1) CN113011251B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542260A (en) * 2011-12-30 2012-07-04 中南大学 Method for recognizing road traffic sign for unmanned vehicle
CN106874945A (en) * 2017-01-25 2017-06-20 杭州视氪科技有限公司 A kind of pavement traffic lights detecting system and method for visually impaired people
CN107679508A (en) * 2017-10-17 2018-02-09 广州汽车集团股份有限公司 Road traffic sign detection recognition methods, apparatus and system
CN108304813A (en) * 2018-02-08 2018-07-20 长安大学 A kind of method of intelligent recognition circle traffic signal light condition
CN110660254A (en) * 2018-06-29 2020-01-07 北京市商汤科技开发有限公司 Traffic signal lamp detection and intelligent driving method and device, vehicle and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542260A (en) * 2011-12-30 2012-07-04 中南大学 Method for recognizing road traffic sign for unmanned vehicle
CN106874945A (en) * 2017-01-25 2017-06-20 杭州视氪科技有限公司 A kind of pavement traffic lights detecting system and method for visually impaired people
CN107679508A (en) * 2017-10-17 2018-02-09 广州汽车集团股份有限公司 Road traffic sign detection recognition methods, apparatus and system
CN108304813A (en) * 2018-02-08 2018-07-20 长安大学 A kind of method of intelligent recognition circle traffic signal light condition
CN110660254A (en) * 2018-06-29 2020-01-07 北京市商汤科技开发有限公司 Traffic signal lamp detection and intelligent driving method and device, vehicle and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于图像处理的交通信号灯识别方法;武莹;张小宁;何斌;;交通信息与安全;20110620(第03期);全文 *
基于色度方向角的离线城市红绿灯识别算法;宋永超;巨永锋;杜凯;韩宜轩;;北京交通大学学报;20190415(第02期);全文 *

Also Published As

Publication number Publication date
CN113011251A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
EP3806064B1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
US11003941B2 (en) Character identification method and device
CN108765443B (en) Sign enhancement processing method for self-adaptive color threshold segmentation
CN108268867B (en) License plate positioning method and device
CN110222764A (en) Shelter target detection method, system, equipment and storage medium
CN101599175B (en) Detection method for determining alteration of shooting background and image processing device
WO2017171659A1 (en) Signal light detection
CN109033955B (en) Face tracking method and system
CN108205649B (en) Method and device for recognizing state of driver for calling and answering
CN111553214B (en) Method and system for detecting smoking behavior of driver
CN109344864B (en) Image processing method and device for dense object
CN106570439B (en) Vehicle detection method and device
CN103093212A (en) Method and device for clipping facial images based on face detection and face tracking
CN111507324B (en) Card frame recognition method, device, equipment and computer storage medium
CN112396044B (en) Method for training lane line attribute information detection model and detecting lane line attribute information
CN111435437A (en) PCB pedestrian re-recognition model training method and PCB pedestrian re-recognition method
CN112232368A (en) Target recognition model training method, target recognition method and related device thereof
KR101343623B1 (en) adaptive color detection method, face detection method and apparatus
CN113011251B (en) Pedestrian traffic light identification method based on geometric attributes of traffic lights
CN117475353A (en) Video-based abnormal smoke identification method and system
CN110334703B (en) Ship detection and identification method in day and night image
CN111723695A (en) Improved Yolov 3-based driver key sub-area identification and positioning method
CN116259021A (en) Lane line detection method, storage medium and electronic equipment
CN106920398A (en) A kind of intelligent vehicle license plate recognition system
CN111402185A (en) Image detection method and device

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