CN113011251A - Pedestrian traffic light identification method based on traffic light geometric attributes - Google Patents

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

Info

Publication number
CN113011251A
CN113011251A CN202110147603.4A CN202110147603A CN113011251A CN 113011251 A CN113011251 A CN 113011251A CN 202110147603 A CN202110147603 A CN 202110147603A CN 113011251 A CN113011251 A CN 113011251A
Authority
CN
China
Prior art keywords
traffic light
traffic
shape
dynamic state
frame image
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.)
Granted
Application number
CN202110147603.4A
Other languages
Chinese (zh)
Other versions
CN113011251B (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

Images

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 traffic light geometric attributes, 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. According to the invention, the dynamic state of the traffic light is identified through the traffic light frame image and the identified shape of the traffic light, so that more accurate guidance is provided for visually impaired people.

Description

Pedestrian traffic light identification method based on traffic light geometric attributes
Technical Field
The invention relates to the technical field of image processing, in particular to a pedestrian traffic light identification method based on traffic light geometric attributes.
Background
The traffic light detection aims at identifying the traffic light state of the intersection, and is mainly and widely applied to the fields of vision-based automatic driving, blind navigation and the like. Traffic lights can be divided into vehicular traffic lights and pedestrian traffic lights, where vehicular traffic light identification is mainly applied to autopilot and pedestrian traffic lights are mainly applied to assist visually impaired people. The traffic light identification method in the prior art is greatly influenced by background colors, the accuracy rate needs to be improved, and a traffic light identification algorithm based on machine learning lacks an algorithm for effectively distinguishing pedestrian traffic lights, vehicle traffic lights and extinguished traffic lights, and lacks reasonable analysis on the dynamic state change of the traffic lights.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The invention aims to solve the technical problems that the traffic light identification method in the prior art is greatly influenced by background colors and the accuracy rate needs to be improved, and a traffic light identification algorithm based on machine learning lacks an algorithm for effectively distinguishing pedestrian traffic lights, vehicle traffic lights and extinguished traffic lights and lacks reasonable analysis on the dynamic state change of the traffic lights.
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 traffic light geometric attributes, 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 a shape of a traffic light from the traffic light frame image includes:
carrying out 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-scale image and the mask area.
In one implementation, the obtaining a masked region according to the traffic light frame image includes:
extracting a red area and a green area in the traffic light frame image based on the HSV color space;
and carrying out OR operation on the red area and the green area to obtain a mask area.
In one implementation, the deriving the shape of the traffic light according to the gray-scale map and the mask region includes:
and multiplying the gray-scale image by the mask area to obtain the shape of the traffic light.
In one implementation, the identifying a shape of a traffic light from the traffic light frame image further comprises:
acquiring the height and 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.
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 the traffic light state identification in each frame of the traffic light frame image;
calculating the average value of the traffic light state identification of the current frame and the traffic light state identifications 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, 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 green light to 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 no traffic light;
when the mean values are not-1, 1, 0.6, and 0 as described above, 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 a 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 traffic light geometric attributes, where the device includes:
the frame image acquisition unit is used for acquiring a traffic light frame image;
the shape recognition unit of the traffic light is used for recognizing the shape of the traffic light according to the traffic light frame image;
and the dynamic state identification unit of the traffic light 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 one or more processors includes a processor configured to execute the method for identifying a pedestrian traffic light based on a geometric attribute of a traffic light as described in any one of the above.
In a fourth aspect, embodiments of the present invention also provide a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a pedestrian traffic light identification method based on traffic light geometric attributes as described in any one of the above.
The invention has the beneficial effects that: the embodiment of the invention firstly obtains 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, the dynamic state of the traffic light is identified through the traffic light frame image and the identified shape of the traffic light in the embodiment of the invention, so that more accurate guidance is provided 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 used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a pedestrian traffic light identification method based on traffic light geometric attributes according to an embodiment of the present invention.
Fig. 2 is an overall framework diagram of traffic light identification according to an embodiment of the present invention.
Fig. 3 is a schematic view of the geometric properties of different traffic lights according to an embodiment of the present invention.
Fig. 4 is a schematic diagram illustrating changes in different states 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 provided in the embodiment of the present invention.
Fig. 6 is a schematic block diagram of a pedestrian traffic light recognition device based on traffic light geometric attributes 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 the geometric attributes of traffic lights, and in order to make the purposes, technical schemes and effects of the invention clearer and clearer, the invention is further described in detail by referring to the attached drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. 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. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, 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. 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 the intersection, and is mainly and widely applied to the fields of vision-based automatic driving, blind navigation and the like. Traffic lights can be divided into vehicular traffic lights and pedestrian traffic lights, where vehicular traffic light identification is mainly applied to autopilot and pedestrian traffic lights are mainly applied to assist visually impaired people. The current traffic light identification method is mainly based on the characteristics of the traffic light such as color, size, shape and the like. The method is mainly based on methods such as horizon line search, image matching, color filtering, similarity estimation, machine learning and the like.
The method is based on ground plane search and image matching, after the gravity direction is estimated according to the built-in acceleration of the mobile phone and the position of the horizon is calculated, a preset traffic light template is used for carrying out convolution operation near the horizon to obtain a candidate region with a high score, and finally the traffic light region is extracted by analyzing the shape of the candidate region. The method based on color filtering performs color filtering on an input image, extracts a red and green connected region in the image, and then extracts a pedestrian traffic light region through characteristics such as area, position, shape and the like. The basic idea of the algorithm is to extract a candidate region from an image by using the remarkable characteristics of the traffic light, and then extract the traffic light region by using methods such as image matching, similarity estimation and the like. The algorithm is greatly influenced by the background color, and the accuracy rate needs to be improved. With the rapid development of machine learning algorithms, more and more learners propose traffic light recognition algorithms based on machine learning. Common machine learning algorithms include Adaboost, Faster R-CNN, SSD, and Yolov 2. The algorithms fit the positions and the types of the traffic lights through data training, and have good effect under the condition that 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 the geometric attributes of traffic lights, and the dynamic state of the traffic lights can be identified by the traffic light frame images and the identified shapes of the traffic lights through the method, so that more accurate guidance is provided for visually impaired people. When the method is specifically implemented, firstly, a traffic light frame image is obtained, and preparation is made for subsequently identifying the shape of the traffic light; then according to the traffic light frame image, identifying the shape of the traffic light, and 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. Like this, after the dynamic state of traffic light was discerned, the mode of rethread voice broadcast provides more accurate guide for looking the barrier personage.
Illustrate by way of example
The method comprises the steps that a visually impaired person walks to a crossroad, the crossroad is provided with a pedestrian channel and a vehicle channel, the visually impaired person cannot see the actual situation of a traffic light and is dangerous, and therefore, the problem is solved, the visually impaired person can determine that the traffic light is the vehicle channel by identifying whether the traffic light is the pedestrian channel or the vehicle channel, for example, the traffic light lighting area is round, the pedestrian channel can be determined according to the figure of the traffic light lighting area, the visually impaired person can pass along the pedestrian channel, then the shape of the traffic light and the dynamic state of the traffic light are identified according to the characteristics of the traffic light of the pedestrian channel, for example, the visually impaired person can be informed that the visually impaired person passes through the pedestrian channel in a voice broadcast mode by identifying that the traffic light of a trip is a continuous green light or a red; identifying that the traffic light of the traveling person is a red light or a red light is changed from a green light to a red light, and informing the visually impaired to wait; if the traffic light of the trip people is identified to be the green light flashing, the visually impaired people is informed that the green light is about to end, and the waiting is recommended; if no traffic light is identified, no notification prompt tone is sent.
Exemplary method
The embodiment provides a pedestrian traffic light identification method based on traffic light geometric attributes, and the method can be applied to intelligent terminals in the field of intelligent traffic. As shown in fig. 1 in detail, the method includes:
s100, acquiring a traffic light frame image;
specifically, a traffic light frame image shot by a camera can be acquired, or the traffic light frame image is downloaded from a network, so as to prepare for 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 the traffic lights are classified into pedestrian traffic lights and vehicle traffic lights, the shape of the pedestrian traffic lights is a human shape, and the shape of the vehicle traffic lights is a circular shape, it can be determined whether it is a pedestrian passage or a vehicle passage by analyzing the shape of the vehicle traffic lights. In addition, there is a case where a pedestrian traffic light and a vehicle traffic light are turned off, 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 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 S203, obtaining the shape of the traffic light according to the gray-scale image and the mask area.
Specifically, the traffic light frame image may be subjected to gray scale conversion by a detection method to obtain a gray scale map, for example, the input frame image is detected by using a target detection model, the detection result is used as a candidate region, for example, fig. 2(b) is a colored map, the color of the traffic light in the candidate region is the actual color, and the candidate regions are subjected to gray scale conversion respectively to obtain the gray scale map. FIG. 2(d) is an HSV map, also a color map, in which the color of the traffic light is distinguished from the color of the remainder of the traffic light in FIG. 2 (d). And then obtaining a mask area according to the traffic light frame image. Correspondingly, in order to obtain a film region, the obtaining of a 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 the 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, mask regions are denoted by masks, and based on the HSV color space, HSV color space transformation is performed to extract red regions and green regions in the traffic light frame image by first setting ranges of three channels of HSV to [0,34], [20,255], [200,255] and [156,180], [20,255], [200,255] respectively according to an HSV color space table in an HSV color map, and using the ranges, red regions of the HSV color space can be extracted. The ranges of the three channels of HSV are 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 regions are then ORed and the result is indicated by a mask, which also results in the mask region.
After the gray-scale image and the mask area are obtained, the shape of the traffic light can be obtained according to the gray-scale image and the mask area. Correspondingly, the step of obtaining the shape of the traffic light according to the gray-scale map and the mask area comprises the following steps: and multiplying the gray-scale image by the mask area to obtain the shape of the traffic light. Specifically, the shape of the traffic light in the input frame image is obtained using the mask multiplied by the grayscale map.
In addition, the recognizing the shape of the traffic light according to the traffic light frame image further includes: acquiring the height and 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. In the present embodiment, fig. 2(a) is an input frame; FIG. 2(b) shows candidate regions; FIG. 2(c) is a grayscale image; FIG. 2(d) is an HSV map; FIG. 2(e) is a mask; fig. 2(f) shows a traffic light shape, and according to the aspect ratio aspectrratio of the minimum bounding rectangle of the traffic light shape shown in fig. 2 (f):
Figure BDA0002931228820000091
because the manufacturing standards of the traffic lights are not very different, according to the result of fig. 3, the threshold value of the aspect ratio is set to 1.35, the traffic light higher than the threshold value is a pedestrian traffic light, the traffic light lower than or equal to the threshold value is a vehicle traffic light, under special conditions, if the aspect ratio of the traffic light is 0, the traffic light is an extinguished traffic light, and the extinguished traffic light can determine whether the traffic light is an extinguished pedestrian traffic light or an extinguished vehicle traffic light according to whether the traffic light is a pedestrian traffic light or a vehicle traffic light is identified, so that the pedestrian traffic light, the extinguished vehicle traffic light, the extinguished pedestrian traffic light and the extinguished vehicle traffic light can be determined according to the aspect ratio finally.
Having obtained the traffic light frame image and the shape of the traffic light, the dynamic state of the traffic light may be identified according to the traffic light frame image and the shape as shown in step S300 of fig. 1.
Specifically, at this time, continuous traffic light frame images are acquired, 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 identifying the dynamic state of the traffic light according to the traffic light frame image and the shape comprises the following steps:
step S301, when the traffic light is determined to be a pedestrian traffic light or a extinguished pedestrian traffic light according to the shape, recording the traffic light state identification in each frame of traffic light frame image;
step S302, calculating the average value of the traffic light state identification of the current frame and the traffic light state identifications of a plurality of frames before the current frame;
and 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 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 the frame images of each frame of traffic light in the continuous frame images, wherein the traffic light state identifier is a traffic light of a red light, a green light or a state value represented when the traffic light is extinguished, for example, when the traffic light state is a red light, the flag is-1; when the lamp is green, flag is 1; when the traffic light is not available (or the traffic light is in a extinguished state), the flag is 0, wherein the flag is a state identifier.
Then, an average value of the traffic light status flags of the current frame and the traffic light status flags of several previous frames of the current frame is calculated, in this embodiment, fig. 4 exemplifies some possible status transformations of the traffic lights, and in order to ensure accuracy of the analysis result, it is assumed that a detection result of a plurality of traffic lights appears in one frame of image, where the detection result includes edge frame coordinates x, y, w, h (bounding box) of the target, a classification (label) of the target, and a confidence (score) of each classification, and only a result with the highest confidence is taken to ensure that there is one and only one flag in one frame of image. Based on the flag variation diagram shown in fig. 4(a), the present invention proposes a traffic light state analysis algorithm based on the mean value. That is, the average value avg of the flag in the current frame and the previous N-1 frame is calculated, and the result is shown in FIG. 4 (b). Based on the flag variation diagram shown in fig. 4(a), the present invention proposes a traffic light state analysis algorithm based on the mean value. That is, the average value avg of the flag in the current frame and the previous N-1 frame is calculated, and the result is shown in FIG. 4 (b). The 4 values of avg in the graph (1, 0, 0.6, 1, respectively) where avg is within a tolerance of 0.05. Namely, the intersection points of the 4 green dotted lines and the 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 green light to 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 no traffic light; when the mean values are not-1, 1, 0.6, and 0 as described above, the dynamic state of the traffic light is waiting. As shown in fig. 5, a specific analysis algorithm can identify seven states in total: continuous red light, continuous green light, red to green light, green to red light, no traffic light, flashing and waiting. The N frame data are utilized, so that the influence caused by false detection or missing detection of a certain frame can be effectively reduced, but the analysis result and the actual result have time delay, and in a certain range, the smaller the N is, the smaller the time delay is, and the larger the fluctuation of the avg is when the traffic light flickers; the larger N is, the larger the time delay is, and the smaller the fluctuation of avg when the traffic light flickers. Wherein N is a time threshold. For a camera with a frame rate of 30, if avg is-1 in the case of N being 60, the state of the traffic light is maintained in the red light state for two seconds. According to the experimental result, N is equal to 60 compared with N-30 and N-90, and the time delay is within 1 second (the time delay is only when the traffic light state changes).
Since the visually impaired people need a voice prompt to guide the visually impaired people to pass through the pedestrian passageway, the 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 a 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 prompt tones are given: and (3) continuous red light: "red light, please wait"; and (3) continuously turning on green light: "green light, please go straight"; turning the red light to the green light: "green light, please pass"; turning green light to red light: "red light, please wait"; in the scintillation: "green light is about to end, advise to wait"; no traffic lights or waiting: there is no alert tone.
In another embodiment, the method may be modified according to the present disclosure, for example, when the traffic lights and the extinguished traffic lights are identified, the value of the traffic light status may be determined according to the colors of the traffic lights, such as red, yellow, green and extinguished states, and the status identifiers of the traffic lights of the frame images of the traffic lights of the consecutive frames are recorded, the average value of the status identifiers of the current frame and a plurality of frames before the current frame is calculated, and the dynamic state of the traffic lights 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 state.
Exemplary device
As shown in fig. 6, an embodiment of the present invention provides a pedestrian traffic light recognition device based on traffic light geometric attributes, the device 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, configured to acquire a traffic light frame image;
a traffic light shape recognition unit 402, configured to recognize a shape of a traffic light according to the traffic light frame image;
and a traffic light dynamic state identification unit 403, 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 schematic block diagram thereof may be as 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. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to implement a pedestrian traffic light identification method based on traffic light geometric attributes. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the intelligent terminal is arranged inside the intelligent terminal in advance and used for detecting the operating temperature of internal equipment.
It will be understood by those skilled in the art that the schematic diagram of fig. 7 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have different arrangements of components.
In one embodiment, an intelligent 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 the one or more processors, the one or more programs including 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.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile 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 DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the invention discloses a pedestrian traffic light identification method based on traffic light geometric attributes, 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. According to the invention, the dynamic state of the traffic light is identified through the traffic light frame image and the identified shape of the traffic light, so that more accurate guidance is provided for visually impaired people.
It is to be understood that the present invention discloses a pedestrian traffic light identification method based on traffic light geometric properties, it is to be understood that the application of the present invention is not limited to the above examples, and that modifications and variations can be made by those skilled in the art in light of the above description, and all such modifications and variations are intended to fall within the scope of the appended claims.

Claims (10)

1. A pedestrian traffic light identification method based on traffic light geometric attributes, the method comprising:
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.
2. The pedestrian traffic light recognition method based on the traffic light geometric attributes of claim 1, wherein the recognizing the shape of the traffic light according to the traffic light frame image comprises:
carrying out 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-scale image and the mask area.
3. The pedestrian traffic light recognition method based on the traffic light geometric attributes of claim 2, wherein the obtaining of masked areas according to the traffic light frame images comprises:
extracting a red area and a green area in the traffic light frame image based on the HSV color space;
and carrying out OR operation on the red area and the green area to obtain a mask area.
4. The method of claim 2, wherein the obtaining the shape of the traffic light according to the gray-scale map and the mask area comprises:
and multiplying the gray-scale image by the mask area to obtain the shape of the traffic light.
5. The method of claim 1, wherein the identifying the shape of the traffic light according to the traffic light frame image further comprises:
acquiring the height and 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.
6. The pedestrian traffic light identification method based on traffic light geometric attributes of claim 5, wherein the identifying the dynamic state of a 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 the traffic light state identification in each frame of the traffic light frame image;
calculating the average value of the traffic light state identification of the current frame and the traffic light state identifications 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.
7. The method of claim 6, wherein the obtaining the dynamic state of the traffic light according to the average value and the traffic light state identifier of the current frame comprises:
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 green light to 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 no traffic light;
when the mean values are not-1, 1, 0.6, and 0 as described above, the dynamic state of the traffic light is waiting.
8. The method of claim 7, wherein identifying the dynamic state of the traffic light according to the traffic light frame image and the shape further comprises:
and determining a prompt voice corresponding to the dynamic state of the traffic light according to the dynamic state of the traffic light.
9. An intelligent terminal comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs being configured to be executed by the one or more processors comprises instructions for performing the method of any of claims 1-8.
10. 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 of claims 1-8.
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 true CN113011251A (en) 2021-06-22
CN113011251B 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
宋永超;巨永锋;杜凯;韩宜轩;: "基于色度方向角的离线城市红绿灯识别算法", 北京交通大学学报, no. 02, 15 April 2019 (2019-04-15) *
武莹;张小宁;何斌;: "基于图像处理的交通信号灯识别方法", 交通信息与安全, no. 03, 20 June 2011 (2011-06-20) *

Also Published As

Publication number Publication date
CN113011251B (en) 2024-06-04

Similar Documents

Publication Publication Date Title
CN108830199B (en) Method and device for identifying traffic light signal, readable medium and electronic equipment
CN109284674B (en) Method and device for determining lane line
EP3806064B1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
CN107506760B (en) Traffic signal detection method and system based on GPS positioning and visual image processing
US10133941B2 (en) Method, apparatus and device for detecting lane boundary
CN110197589B (en) Deep learning-based red light violation detection method
US10025998B1 (en) Object detection using candidate object alignment
WO2017171659A1 (en) Signal light detection
CN101599175B (en) Detection method for determining alteration of shooting background and image processing device
CN111553214B (en) Method and system for detecting smoking behavior of driver
CN109711322A (en) A kind of people's vehicle separation method based on RFCN
CN109215364B (en) Traffic signal recognition method, system, device and storage medium
CN112396044B (en) Method for training lane line attribute information detection model and detecting lane line attribute information
CN112818853B (en) Traffic element identification method, device, equipment and storage medium
CN111401188A (en) Traffic police gesture recognition method based on human body key point features
CN111435437A (en) PCB pedestrian re-recognition model training method and PCB pedestrian re-recognition method
CN112863194B (en) Image processing method, device, terminal and medium
Moizumi et al. Traffic light detection considering color saturation using in-vehicle stereo camera
CN113361299B (en) Abnormal parking detection method and device, storage medium and electronic equipment
CN113011251B (en) Pedestrian traffic light identification method based on geometric attributes of traffic lights
Wu et al. Example-based clear path detection assisted by vanishing point estimation
CN108960181A (en) Black smoke vehicle detection method based on multiple dimensioned piecemeal LBP and Hidden Markov Model
KR102141781B1 (en) Object Re-IdentificatioApparatus Using Locally Matching Method and Its Method
CN106920398A (en) A kind of intelligent vehicle license plate recognition system
CN113989774A (en) Traffic light detection method and device, vehicle and readable storage medium

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