CN109684900B - Method and apparatus for outputting color information - Google Patents

Method and apparatus for outputting color information Download PDF

Info

Publication number
CN109684900B
CN109684900B CN201710972792.2A CN201710972792A CN109684900B CN 109684900 B CN109684900 B CN 109684900B CN 201710972792 A CN201710972792 A CN 201710972792A CN 109684900 B CN109684900 B CN 109684900B
Authority
CN
China
Prior art keywords
color information
determining
signal light
color
signal lamp
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
CN201710972792.2A
Other languages
Chinese (zh)
Other versions
CN109684900A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710972792.2A priority Critical patent/CN109684900B/en
Publication of CN109684900A publication Critical patent/CN109684900A/en
Application granted granted Critical
Publication of CN109684900B publication Critical patent/CN109684900B/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
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/584Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of vehicle lights or traffic lights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the application discloses a method and a device for outputting color information. One embodiment of the method comprises: acquiring a target image; in response to determining that the target image contains a signal light image, identifying signal light color information in the target image; in response to determining that the color characterized by the signal light color information is the first color, determining whether signal light color information and a color information identification time associated with the stored signal light color information have been stored; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information. This embodiment improves the flexibility of identifying the color information of the signal lamp.

Description

Method and apparatus for outputting color information
Technical Field
The embodiment of the application relates to the technical field of image processing, in particular to the technical field of image processing applied to automatic driving, and particularly relates to a method and a device for outputting color information.
Background
In order to ensure the safety of the automatic driving vehicle running on the road and smoothly pass through the intersection, the automatic driving vehicle needs to monitor the color of a signal lamp at the intersection in real time and feed the color back to a planning control system for decision control. For an autonomous vehicle, it is necessary to recognize the color of a traffic light with stability and reliability so as to pass through the intersection safely.
In an actual road test, two situations are encountered: the traffic lights are in a plurality of seconds before the switching state, count-down and flicker are carried out simultaneously to warn a driver, and the color of the green light is alternatively changed between green and black when the green light is reflected on the collected signal light image; due to the quality problems of power supply or lamps, high-frequency flicker of the signal lamp can occur in the signal lamp video shot by the high-speed camera, the signal lamp is reflected in the collected signal lamp image in continuous image frames, and the color of the signal lamp repeatedly and alternately changes between the color when the signal lamp is lighted and black (or becomes dark).
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and apparatus for outputting color information.
In a first aspect, an embodiment of the present application provides a method for outputting color information, where the method includes: acquiring a target image; in response to determining that the target image contains a signal light image, identifying signal light color information in the target image; in response to determining that the color characterized by the signal light color information is the first color, determining whether signal light color information and a color information identification time associated with the stored signal light color information have been stored; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information.
In some embodiments, determining the output color information based on a difference between the current time and a most recently stored color information identification time includes: in response to determining that the difference between the current time and the last stored color information identification time is greater than a preset time threshold, determining signal lamp color information with the characterized color as the second color as output color information; in response to determining that the difference between the current time and the most recently stored color information identification time is not greater than the time threshold, the most recently stored signal light color information is determined to be output color information.
In some embodiments, after identifying the signal light color information in the target image, the method further comprises: in response to determining that the color characterized by the signal light color information is not the first color, determining the signal light color information as output color information and storing the signal light color information in association with a color information identification time at which the signal light color information is identified; outputting the determined output color information.
In some embodiments, after acquiring the target image, the method further comprises: in response to determining that the target image does not contain the signal light image, it is determined whether signal light color information and a color information identification time associated with the stored signal light color information have been stored, and in response to determining that they have been stored, the stored signal light color information and the color information identification time are deleted.
In some embodiments, identifying signal light color information in the target image comprises: extracting a signal lamp image in a target image; inputting the signal lamp image into a pre-trained convolutional neural network to obtain at least one signal lamp color information to be determined, wherein the signal lamp color information to be determined comprises a probability value of a color represented by the signal lamp color information to be determined, and the convolutional neural network is used for representing a corresponding relation between the signal lamp image and the at least one signal lamp color information to be determined; in response to the fact that the maximum value of the probability values is larger than a preset probability threshold value, determining the color information of the signal lamp to be determined corresponding to the maximum value as the identified color information of the signal lamp; in response to determining that the maximum value is not greater than the probability threshold, signal light color information that characterizes the color as the first color is determined as the identified signal light color information.
In a second aspect, an embodiment of the present application provides an apparatus for outputting color information, including: an acquisition unit configured to acquire a target image; an identification unit configured to identify signal light color information in the target image in response to determining that the target image contains a signal light image; a first determination unit configured to determine whether the signal light color information and the color information identification time associated with the stored signal light color information have been stored in response to determining that the color represented by the signal light color information is the first color; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information.
In some embodiments, the first determining unit is further configured to: in response to determining that the difference between the current time and the last stored color information identification time is greater than a preset time threshold, determining signal lamp color information with the characterized color as the second color as output color information; in response to determining that the difference between the current time and the most recently stored color information identification time is not greater than the time threshold, the most recently stored signal light color information is determined to be output color information.
In some embodiments, the first determining unit is further configured to: in response to determining that the color characterized by the signal light color information is not the first color, determining the signal light color information as output color information and storing the signal light color information in association with a color information identification time at which the signal light color information is identified; outputting the determined output color information.
In some embodiments, the apparatus further comprises: a second determination unit configured to determine whether the signal light color information and the color information identification time associated with the stored signal light color information have been stored in response to a determination that the target image does not contain the signal light image, and delete the stored signal light color information and the color information identification time in response to a determination that the stored signal light color information and the color information identification time have been stored.
In some embodiments, the identification unit comprises: the extraction module is configured to extract a signal lamp image in the target image; the system comprises an obtaining module and a judging module, wherein the obtaining module is configured to input a signal lamp image into a pre-trained convolutional neural network to obtain at least one signal lamp color information to be determined, the signal lamp color information to be determined comprises a probability value of a color represented by the signal lamp color information to be determined, and the convolutional neural network is used for representing a corresponding relation between the signal lamp image and the at least one signal lamp color information to be determined; the determining module is configured to determine the color information of the signal lamp to be determined corresponding to the maximum value as the identified color information of the signal lamp in response to the fact that the maximum value of the probability values is larger than a preset probability threshold value; in response to determining that the maximum value is not greater than the probability threshold, signal light color information that characterizes the color as the first color is determined as the identified signal light color information.
In a third aspect, an embodiment of the present application provides an information processing apparatus, including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as described in any of the implementations of the first aspect above.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
According to the method and the device for outputting the color information, the collected signal lamp image is identified, the output color information is determined and the determined output color information is output based on the fact that whether the signal lamp color information is stored or not and the color information identification time associated with the stored signal lamp color information is determined, the identification of the signal lamp flicker state is increased, and the flexibility of identifying the signal lamp color information is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for outputting color information according to the present application;
FIG. 3 is a schematic illustration of an application scenario of a method for outputting color information according to the present application;
FIG. 4 is a flow diagram of yet another embodiment of a method for outputting color information according to the present application;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for outputting color information according to the present application;
fig. 6 is a schematic structural diagram of a computer system suitable for implementing the information processing apparatus of the embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the present method for outputting color information or apparatus for outputting color information may be applied.
As shown in fig. 1, a system architecture 100 may be provided on an autonomous vehicle, including an information processing device 101, a network 102, and a camera 103. The network 102 is a medium for providing a communication link between the information processing apparatus 101 and the camera 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The camera 103 interacts with the information processing apparatus 101 through the network 102 to receive messages or send images or the like. For example, the information processing apparatus 101 may transmit a control instruction to the camera 103 via the network 102, and the camera 103 may capture a target image and transmit the target image to the information processing apparatus 101 via the network 102. Various applications may be installed on the information processing apparatus 101. Such as image processing type applications, autonomous vehicle control type applications, and the like.
It should be noted that the method for outputting color information provided in the embodiment of the present application is generally executed by the information processing apparatus 101, and accordingly, the means for outputting color information is generally provided in the information processing apparatus 101.
It should be understood that the number of information processing apparatuses, networks, and cameras in fig. 1 is merely illustrative. There may be any number of information processing devices, networks, and cameras, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for outputting color information in accordance with the present application is shown. The method for outputting color information includes the steps of:
step 201, acquiring a target image.
In the present embodiment, an electronic apparatus (for example, the information processing apparatus 101 shown in fig. 1) on which the method for outputting color information is executed may acquire a target image. The target image may be an image acquired by an image acquiring device (e.g., the camera 103 shown in fig. 1) on the autonomous vehicle and transmitted to the electronic device.
In response to determining that the target image contains a signal light image, signal light color information in the target image is identified, step 202.
In this embodiment, based on the target image obtained in step 201, the electronic device may first determine whether the obtained target image includes a signal light image, and then perform further steps according to the determined result. The signal light image may be recognized by the electronic device using various existing image recognition methods (e.g., hough transform based method, fourier operator based pattern recognition algorithm, machine learning based method, etc.).
The electronic device may identify signal light color information in the target image in response to determining that the target image contains a signal light image. The electronic equipment can identify the signal lamp color information in the target image by adopting various existing color identification methods. For example, a rule-based method (the method may first extract circles and straight lines in an image by hough transform or the like, reserve rectangles and circles conforming to the structure of a traffic light according to the topological structure of the traffic light, and determine which color the current traffic light belongs to by judging which type of template the current traffic light image has a higher similarity to by means of a color template), a machine learning-based method (the method may extract color histogram features in the traffic light image, train a color classifier by using the histogram features as input, to classify colors.
In some optional implementations of the present embodiment, the electronic device may identify the signal light color information in the target image using a pre-trained convolutional neural network. The step of identifying the color information of the signal lamp in the target image may be as follows:
first, the electronic device extracts a signal light image in a target image.
Secondly, the electronic equipment inputs the signal lamp image into a pre-trained convolutional neural network to obtain at least one signal lamp color information to be determined. The color information of the signal lamp to be determined comprises probability values of colors represented by the color information of the signal lamp to be determined. The convolutional neural network is used for representing the corresponding relation between the signal lamp image and at least one signal lamp color information to be determined. The probability value is used for representing the probability of the color represented by the color information of each identified signal lamp to be determined. For example, the color information of each signal lamp to be determined output by the convolutional neural network may be: "Green: 99%, red: 0.1%, yellow: 0.9% ".
Finally, the electronic equipment determines the color information of the signal lamp to be determined corresponding to the maximum value as the identified color information of the signal lamp in response to the fact that the maximum value of the probability values is larger than a preset probability threshold value; the electronic device determines signal light color information characterizing a color as a first color (e.g., black) as the identified signal light color information in response to determining that the maximum value is not greater than the probability threshold.
For example, if the preset probability threshold is 80%, and the probability value (e.g., 99%) of green in the color information of each to-be-determined signal lamp output by the convolutional neural network is the maximum and is greater than the probability threshold, determining the color information of the signal lamp with the characteristic color of green as the identified color information of the signal lamp; if the maximum probability value in the color information of each signal lamp to be determined, which is output by the convolutional neural network, is not more than 80%, the color of the signal lamp at the moment is in an uncertain state, and the signal lamp color information with the represented color being the first color (for example, black) is determined as the identified signal lamp color information.
In some optional implementations of the present embodiment, the convolutional neural network may be obtained by training as follows: first, the electronic device may obtain a set of training samples. Each training sample in the training sample set comprises a target signal lamp image and color information of a pre-labeled target signal lamp image. Secondly, for each training sample in the training sample set, the electronic device may use a machine learning method to train the training sample as an input and the signal light color information as an output to obtain a convolutional neural network. In the process of training the convolutional neural network, all parameters of the convolutional neural network can be adjusted so that the color of the output signal lamp is consistent with the color information of the pre-labeled target signal lamp image.
It should be noted that the above method for training the convolutional neural network is a well-known technique widely studied and applied at present, and is not described herein again.
Step 203, in response to determining that the color represented by the signal lamp color information is the first color, determining whether the signal lamp color information and the color information identification time associated with the stored signal lamp color information are stored; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information.
In this embodiment, based on the signal light color information in the target image identified in step 202, the electronic device may first determine whether the color represented by the identified signal light color information is the first color, and then perform further steps according to the determined result.
In this embodiment, the electronic device may determine whether the signal light color information and the color information identification time associated with the stored signal light color information have been stored in response to determining that the color represented by the identified signal light color information is the first color. For example, when all of the signal lights of the respective colors are in the extinguished state or in the indeterminate state in which the color of the signal light cannot be determined, the color of the signal light represented by the signal light color information at this time is the first color (for example, black).
In this embodiment, the electronic device may determine the output color information and output the determined output color information based on a difference between the current time and the most recently stored color information identification time in response to determining that the signal light color information and the color information identification time associated with the stored signal light color information are stored. The electronic device may further determine signal light color information, which represents that the color is the second color, as output color information and output the determined output color information in response to determining that the signal light color information and the color information identification time are not stored.
Illustratively, the second color is set to red. When the electronic equipment determines that the signal lamp color information and the color information identification time are not stored, the electronic equipment indicates that the signal lamps with various colors are in a turned-off state or an uncertain state at the moment, and the signal lamp color information with the represented color being red is output at the moment.
In some optional implementations of this embodiment, the determining the output color information based on the difference between the current time and the last stored color information identification time may include the following two processing manners:
in a first mode, the electronic device determines, as the output color information, the color information of the signal lamp, which is characterized by the second color, in response to determining that a difference between the current time and the most recently stored color information identification time is greater than a preset time threshold.
For example, in an actual road, some traffic lights may appear to flicker when changing colors, and at this time, the electronic device may compare the difference between the current time and the last stored color information identification time with the time threshold, and when the difference is greater than the time threshold, it indicates that the traffic lights do not flicker and the time for not flickering is long enough to be compared with the time interval for which the normal traffic lights flicker, and at this time, the traffic lights may malfunction or the color of the traffic lights is in an indeterminate state for a long time, and at this time, the traffic light color information representing the second color (e.g., red) is determined as the output color information. The time threshold may be set according to the statistical flicker frequency of the signal, and for example, the time threshold may be set to 1.5 seconds.
In a second mode, the electronic device determines the signal light color information stored last time as the output color information in response to determining that the difference between the current time and the color information identification time stored last time is not greater than the time threshold. For example, when the difference between the above times is not greater than the above time threshold (e.g., 1.5 seconds), which indicates that the traffic light may be in a time interval of two off states of a blinking state at this time, the traffic light color information stored last time may be determined as the output color information.
In some optional implementations of the embodiment, in response to determining that a difference between the current time and the last stored color information identification time is not greater than a time threshold, the electronic device may determine the last stored color information of the traffic light as output color information, and output a blinking signal within a time interval representing two off states in which the traffic light may be in a blinking state at that time, so that the autonomous vehicle performs a corresponding operation according to the blinking signal. For example, a vehicle control system of an autonomous vehicle executes an operation of decelerating the autonomous vehicle upon receiving the blinking signal.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for outputting color information according to the present embodiment.
In the application scenario of fig. 3, the autonomous vehicle 301 includes a camera 3011, an information processing device 3012, and a vehicle control system 3013. When the autonomous driving vehicle 301 passes through an intersection having a traffic light 302, the image captured by the camera 3011 includes a signal light image, and the camera 3011 transmits the captured image to the information processing device 3012. Upon receiving the image captured by the camera 3011, the information processing apparatus 3012 first determines that the received image includes a traffic light image, and then identifies the color of a traffic light in the traffic light image. Outputting the identified signal light color information if the identified signal light color at this time is not black (e.g., red, yellow, or green); if the color of the signal lamp identified at this time is black, it indicates that the signal lamp at this time may have the following three situations:
in case one, the signal lamp is in a flashing state. When the signal processing device determines that the color information and the color information identification time have been stored and the difference between the current time and the stored color information identification time is not greater than a preset time threshold, it is determined that the signal lamp is in a blinking state at that time. When the traffic lights are in a state where all the traffic lights in the blinking state are turned off, the information processing apparatus 3012 determines the traffic light color information stored last time as the traffic light color information identified this time, and outputs the identified traffic light color information to the vehicle control system 3013. After receiving the signal light color information, the vehicle control system 3013 executes a corresponding operation. For example, when a green light blinks, the vehicle control system 3013 controls the vehicle to continue traveling during the green light being turned off.
In case two, the traffic light 302 is in a long-time extinguished state. When the signal processing device determines that the color information and the color information identification time are stored and the difference between the current time and the stored color information identification time is greater than a preset time threshold, it is determined that the signal lamp is in a long-time off state at the time. When the signal lamp is in a long-time off state, the signal lamp may malfunction, and the color information of the signal lamp output by the information processing apparatus 3012 represents that the color of the signal lamp is red. The vehicle control system 3013 receives the signal light color information and controls the autonomous vehicle 301 to stop.
In the third case, when the autonomous vehicle 301 travels to the intersection, the traffic light 302 is turned off. At this time, the information processing device 3012 determines that the traffic light color information and the color information identification time are not stored, outputs traffic light color information indicating that the color of the traffic light is red, and the vehicle control system 3013 controls the autonomous vehicle 301 to stop after receiving the traffic light color information.
According to the method provided by the embodiment of the application, the collected signal lamp image is identified, the output color information is determined and the determined output color information is output based on the fact that whether the signal lamp color information is stored or not and the color information identification time associated with the stored signal lamp color information is determined, the identification of the signal lamp flicker state is increased, and the flexibility of identifying the signal lamp color information is improved.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method for outputting color information is shown. The flow 400 of the method for outputting color information comprises the steps of:
step 401, a target image is acquired.
In this embodiment, step 401 is substantially the same as step 201 in the corresponding embodiment of fig. 2, and is not described here again.
Step 402, in response to determining that the target image contains a signal light image, identifying signal light color information in the target image.
In this embodiment, step 402 is substantially the same as step 202 in the corresponding embodiment of fig. 2, and is not described herein again.
Step 403, in response to determining that the color represented by the signal lamp color information is the first color, determining whether the signal lamp color information and the color information identification time associated with the stored signal lamp color information are stored; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information.
In this embodiment, step 403 is substantially the same as step 203 in the corresponding embodiment of fig. 2, and is not described herein again.
Step 404, in response to determining that the target image does not contain a signal light image, determines whether signal light color information and a color information identification time associated with the stored signal light color information have been stored, and in response to determining that they have been stored, deletes the stored signal light color information and the color information identification time.
In the present embodiment, based on the target image acquired in step 401, the electronic apparatus determines whether the signal light color information and the color information identification time associated with the stored signal light color information have been stored in response to determining that the target image does not contain the signal light image, and may delete the stored signal light color information and the color information identification time in response to determining that the signal light color information and the color information identification time have been stored.
In general, when the target image acquired by the image acquisition device received by the electronic device does not include a signal light image, it is described that the electronic device is not located at an intersection where a traffic signal is installed. In order to avoid that the color information of the signal lamp stored in the electronic device influences the recognition result when the target image including the image of the signal is collected and recognized next time (for example, the color of the signal lamp of the intersection passed last time is taken as the color of the signal lamp of the intersection passed this time), at this time, the electronic device should delete the color information of the signal lamp and the color information recognition time which are stored.
Step 405, in response to determining that the color represented by the signal lamp color information is not the first color, determining the signal lamp color information as output color information, and storing the signal lamp color information in association with the color information identification time at which the signal lamp color information is identified; outputting the determined output color information
In this embodiment, based on the signal light color information in the target image identified in step 402, in response to determining that the color represented by the signal light color information is not the first color, the electronic device may perform the following steps: firstly, determining signal lamp color information as output color information, and storing the signal lamp color information and color information identification time for identifying the signal lamp color information in an associated manner; next, the determined output color information is output.
For example, the first color may be set to black (indicating that the current signal lamp is in an off state or an indeterminate state), and when the electronic device recognizes that the signal lamp is not the first color, the color of the recognized signal lamp may be red, yellow or green. The electronic device may store the actually recognized color information of the signal lamp and the color information recognition time at which the color information of the signal lamp is recognized in association with each other, and then output the recognized color information of the signal lamp.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for outputting color information in the present embodiment highlights the processing step when the signal light image is not included in the target image, and the processing step when the recognized signal light color information is not the first color. Therefore, the scheme described in the embodiment can improve the processing of identifying and outputting the color information of the signal lamp, thereby further improving the flexibility of identifying the color information of the signal lamp.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present application provides an embodiment of an apparatus for outputting color information, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 5, the apparatus 500 for outputting color information of the present embodiment includes: an acquisition unit 501 configured to acquire a target image; an identifying unit 502 configured to identify signal light color information in the target image in response to determining that the target image contains a signal light image; a first determination unit 503 configured to determine whether the signal lamp color information and the color information identification time associated with the stored signal lamp color information have been stored in response to determining that the color represented by the signal lamp color information is the first color; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information.
In this implementation, the acquisition unit 501 may acquire a target image. The target image may be an image acquired by an image acquiring device (e.g., the camera 103 shown in fig. 1) on the autonomous vehicle and sent to the acquiring unit 501.
In this embodiment, based on the target image acquired by the acquisition unit 501, the identification unit 502 may first determine whether the acquired target image includes a signal light image, and then perform further steps according to the determined result. The above-described identifying unit 502 identifies signal light color information in the target image in response to determining that the target image contains a signal light image. The identifying unit 502 may identify the color information of the signal lamp in the target image by using various existing color identifying methods.
In some optional implementations of this embodiment, the apparatus further includes: a second determination unit (not shown in the figure) configured to determine whether the signal light color information and the color information identification time associated with the stored signal light color information have been stored in response to a determination that the target image does not contain the signal light image, and delete the stored signal light color information and the color information identification time in response to a determination that the stored signal light color information and the color information identification time have been stored.
In some optional implementations of this embodiment, the identifying unit 502 includes: an extraction module (not shown in the figure) configured to extract a signal lamp image in the target image; an obtaining module (not shown in the figure) configured to input the signal lamp image into a pre-trained convolutional neural network, and obtain at least one signal lamp color information to be determined, where the signal lamp color information to be determined includes a probability value of a color represented by the signal lamp color information to be determined, and the convolutional neural network is used for representing a corresponding relationship between the signal lamp image and the at least one signal lamp color information to be determined; a determining module (not shown in the figure) configured to determine, in response to determining that a maximum value of the probability values is greater than a preset probability threshold, the color information of the signal lamp to be determined corresponding to the maximum value as the identified color information of the signal lamp; in response to determining that the maximum value is not greater than the probability threshold, signal light color information that characterizes the color as the first color is determined as the identified signal light color information.
In this embodiment, the above-described first determination unit 503 may determine whether the signal light color information and the color information identification time associated with the stored signal light color information have been stored in response to determining that the color represented by the identified signal light color information is the first color. The above-described first determination unit 503 may determine output color information and output the determined output color information based on a difference between the current time and the most recently stored color information identification time, in response to determining that the signal light color information and the color information identification time associated with the stored signal light color information have been stored. The above-described first determination unit 503 may also determine signal lamp color information, which represents that the color is the second color, as output color information and output the determined output color information in response to determining that the signal lamp color information and the color information identifying time are not stored.
In some optional implementations of this embodiment, the first determining unit 503 is further configured to: in response to determining that the difference between the current time and the last stored color information identification time is greater than a preset time threshold, determining signal lamp color information with the characterized color as the second color as output color information; in response to determining that the difference between the current time and the most recently stored color information identification time is not greater than the time threshold, the most recently stored signal light color information is determined to be output color information.
In some optional implementations of this embodiment, the first determining unit 503 is further configured to: in response to determining that the color characterized by the signal light color information is not the first color, determining the signal light color information as output color information and storing the signal light color information in association with a color information identification time at which the signal light color information is identified; outputting the determined output color information.
The apparatus provided by the above embodiment of the present application identifies the signal light image acquired by the acquisition unit 501 through the identification unit 502, and the first determination unit 503 determines the output color information and outputs the determined output color information based on determining whether the signal light color information has been stored and the color information identification time associated with the stored signal light color information, thereby increasing the identification of the signal light blinking state and improving the flexibility of identifying the signal light color information.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing the information processing device of the present embodiment is shown. The information processing apparatus shown in fig. 6 is merely an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a recognition unit, and a first determination unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, the acquisition unit may also be described as a "unit that acquires a target image".
As another aspect, the present application also provides a computer-readable medium that may be contained in the information processing apparatus described in the above-described embodiments; or may exist separately without being assembled into the information processing apparatus. The above-mentioned computer-readable medium carries one or more programs which, when executed by the information processing apparatus, cause the information processing apparatus to: acquiring a target image; in response to determining that the target image contains a signal light image, identifying signal light color information in the target image; in response to determining that the color characterized by the signal light color information is a first color, determining whether signal light color information and a color information identification time associated with the stored signal light color information have been stored; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A method for outputting color information, the method comprising:
acquiring a target image in real time;
in response to determining that the target image includes a signal light image, identifying signal light color information in the target image;
in response to determining that the color characterized by the signal light color information is a first color, determining whether the identified signal light color information and a color information identification time associated with the stored signal light color information have been stored; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information;
in response to determining that the target image does not contain a signal light image, determining whether signal light color information and a color information identification time associated with the stored signal light color information have been stored;
in response to determining that the stored signal light color information and the color information identification time associated with the stored signal light color information, deleting the stored signal light color information and the color information identification time.
2. The method of claim 1, wherein determining output color information based on a difference between a current time and a most recently stored color information identification time comprises:
in response to determining that the difference between the current time and the last stored color information identification time is greater than a preset time threshold, determining signal lamp color information with the characterized color as the second color as output color information;
in response to determining that the difference between the current time and the most recently stored color information identification time is not greater than the time threshold, the most recently stored signal light color information is determined to be output color information.
3. The method of claim 1, wherein after the identifying signal light color information in the target image, the method further comprises:
in response to determining that the color characterized by the signal lamp color information is not the first color, determining the signal lamp color information as output color information, and storing the signal lamp color information in association with a color information identification time at which the signal lamp color information is identified; outputting the determined output color information.
4. The method according to one of claims 1 to 3, wherein the identifying signal light color information in the target image comprises:
extracting a signal lamp image in the target image;
inputting the signal lamp image into a pre-trained convolutional neural network to obtain at least one signal lamp color information to be determined, wherein the signal lamp color information to be determined comprises a probability value of a color represented by the signal lamp color information to be determined, and the convolutional neural network is used for representing a corresponding relation between the signal lamp image and the at least one signal lamp color information to be determined;
in response to the fact that the maximum value of the probability values is larger than a preset probability threshold value, determining the color information of the signal lamp to be determined corresponding to the maximum value as the identified color information of the signal lamp;
in response to determining that the maximum value is not greater than the probability threshold, signal light color information that characterizes the color as the first color is determined as the identified signal light color information.
5. An apparatus for outputting color information, the apparatus comprising:
an acquisition unit configured to acquire a target image in real time;
an identification unit configured to identify signal light color information in the target image in response to determining that the target image contains a signal light image;
a first determination unit configured to determine whether the identified signal lamp color information and the color information identification time associated with the stored signal lamp color information have been stored in response to determining that the color characterized by the signal lamp color information is a first color; in response to determining that the color information has been stored, determining output color information based on a difference between a current time and a most recently stored color information identification time; in response to determining not to store, determining signal light color information for which the characterized color is a second color as output color information; outputting the determined output color information;
a second determination unit configured to determine whether signal light color information and a color information identification time associated with the stored signal light color information have been stored in response to a determination that the target image does not contain a signal light image; in response to determining that the stored signal light color information and the color information identification time associated with the stored signal light color information, deleting the stored signal light color information and the color information identification time.
6. The apparatus of claim 5, wherein the first determining unit is further configured to:
in response to determining that the difference between the current time and the last stored color information identification time is greater than a preset time threshold, determining signal lamp color information with the characterized color as the second color as output color information;
in response to determining that the difference between the current time and the most recently stored color information identification time is not greater than the time threshold, the most recently stored signal light color information is determined to be output color information.
7. The apparatus of claim 5, wherein the first determining unit is further configured to:
in response to determining that the color characterized by the signal lamp color information is not the first color, determining the signal lamp color information as output color information, and storing the signal lamp color information in association with a color information identification time at which the signal lamp color information is identified; outputting the determined output color information.
8. The apparatus according to one of claims 5 to 7, wherein the identification unit comprises:
the extraction module is configured to extract a signal lamp image in the target image;
the obtaining module is configured to input the signal lamp image to a pre-trained convolutional neural network to obtain at least one signal lamp color information to be determined, wherein the signal lamp color information to be determined comprises a probability value of a color represented by the signal lamp color information to be determined, and the convolutional neural network is used for representing a corresponding relation between the signal lamp image and the at least one signal lamp color information to be determined;
the determining module is configured to determine the color information of the signal lamp to be determined corresponding to the maximum value as the identified color information of the signal lamp in response to the fact that the maximum value of the probability values is larger than a preset probability threshold value; in response to determining that the maximum value is not greater than the probability threshold, signal light color information that characterizes the color as the first color is determined as the identified signal light color information.
9. An information processing apparatus comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201710972792.2A 2017-10-18 2017-10-18 Method and apparatus for outputting color information Active CN109684900B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710972792.2A CN109684900B (en) 2017-10-18 2017-10-18 Method and apparatus for outputting color information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710972792.2A CN109684900B (en) 2017-10-18 2017-10-18 Method and apparatus for outputting color information

Publications (2)

Publication Number Publication Date
CN109684900A CN109684900A (en) 2019-04-26
CN109684900B true CN109684900B (en) 2021-03-02

Family

ID=66184053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710972792.2A Active CN109684900B (en) 2017-10-18 2017-10-18 Method and apparatus for outputting color information

Country Status (1)

Country Link
CN (1) CN109684900B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016344A (en) * 2019-05-28 2020-12-01 深圳市商汤科技有限公司 State detection method and device of signal indicator lamp and driving control method and device
CN110826456A (en) * 2019-10-31 2020-02-21 青岛海信网络科技股份有限公司 Countdown board fault detection method and system
CN113066153B (en) * 2021-04-28 2023-03-31 浙江中控技术股份有限公司 Method, device and equipment for generating pipeline flow chart and storage medium
CN113781778B (en) * 2021-09-03 2022-09-06 新奇点智能科技集团有限公司 Data processing method and device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070074913A (en) * 2006-01-11 2007-07-18 주식회사 현대오토넷 System and method for reporting change of signal lamp using image recognition
CN103383440A (en) * 2013-07-17 2013-11-06 黄忠 Signal lamp remote online monitoring method
CN106971581A (en) * 2017-04-26 2017-07-21 维沃移动通信有限公司 A kind of traffic signal light condition based reminding method and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070074913A (en) * 2006-01-11 2007-07-18 주식회사 현대오토넷 System and method for reporting change of signal lamp using image recognition
CN103383440A (en) * 2013-07-17 2013-11-06 黄忠 Signal lamp remote online monitoring method
CN106971581A (en) * 2017-04-26 2017-07-21 维沃移动通信有限公司 A kind of traffic signal light condition based reminding method and mobile terminal

Also Published As

Publication number Publication date
CN109684900A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN109684900B (en) Method and apparatus for outputting color information
CN110660254B (en) Traffic signal lamp detection and intelligent driving method and device, vehicle and electronic equipment
CN108773373B (en) Method and device for operating an autonomous vehicle
WO2019047656A1 (en) Method and apparatus for use in controlling driverless vehicle
US11508163B2 (en) Method and apparatus for training lane line identifying model, device, and storage medium
CN107832721B (en) Method and apparatus for outputting information
CN112101272B (en) Traffic light detection method, device, computer storage medium and road side equipment
CN111931726B (en) Traffic light detection method, device, computer storage medium and road side equipment
US11017270B2 (en) Method and apparatus for image processing for vehicle
CN110119725B (en) Method and device for detecting signal lamp
CN113283509B (en) Method for automatically labeling labels, electronic equipment and storage medium
CN111931715B (en) Method and device for recognizing state of vehicle lamp, computer equipment and storage medium
CN113392793A (en) Method, device, equipment, storage medium and unmanned vehicle for identifying lane line
CN113221878A (en) Detection frame adjusting method and device applied to signal lamp detection and road side equipment
KR20220151583A (en) Image processing method and device, electronic equipment and medium
CN113792106B (en) Road state updating method and device, electronic equipment and storage medium
CN110263622A (en) Train fire monitoring method, apparatus, terminal and storage medium
CN112509321A (en) Unmanned aerial vehicle-based driving control method and system for urban complex traffic situation and readable storage medium
KR102506222B1 (en) Method and system for collection of vision data, learning ,distribution and inference
KR101877809B1 (en) Method and Apparatus for Recognizing Traffic Light Using GPU
KR20220054258A (en) Method and apparatus for identifying traffic light, electronic device, road side device, cloud control platform, vehicle infrastructure cooperative system, storage medium and computer program
JP2020205036A (en) Image-based parking detection method, device, and electronic equipment
KR20210089044A (en) Method of selecting training data for object detection and object detection device for detecting object using object detection model trained using method
CN116229369B (en) Method, device and equipment for detecting people flow and computer readable storage medium
US20230342422A1 (en) Method, electronic device, and computer program product for evaluating samples

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