CN112990002B - Traffic signal lamp identification method and system on downhill road and computer readable medium - Google Patents

Traffic signal lamp identification method and system on downhill road and computer readable medium Download PDF

Info

Publication number
CN112990002B
CN112990002B CN202110267619.9A CN202110267619A CN112990002B CN 112990002 B CN112990002 B CN 112990002B CN 202110267619 A CN202110267619 A CN 202110267619A CN 112990002 B CN112990002 B CN 112990002B
Authority
CN
China
Prior art keywords
traffic signal
training
sample
signal lamp
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.)
Active
Application number
CN202110267619.9A
Other languages
Chinese (zh)
Other versions
CN112990002A (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.)
Jilin University
Original Assignee
Jilin 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 Jilin University filed Critical Jilin University
Priority to CN202110267619.9A priority Critical patent/CN112990002B/en
Publication of CN112990002A publication Critical patent/CN112990002A/en
Application granted granted Critical
Publication of CN112990002B publication Critical patent/CN112990002B/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
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B7/00Measuring arrangements characterised by the use of electric or magnetic techniques
    • G01B7/30Measuring arrangements characterised by the use of electric or magnetic techniques for measuring angles or tapers; for testing the alignment of axes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A30/00Adapting or protecting infrastructure or their operation
    • Y02A30/60Planning or developing urban green infrastructure

Abstract

The invention discloses a traffic signal lamp identification method, a system and a computer readable medium on a downhill road, which adjust the rotation angle of a camera orientation angle according to road gradient information fed back by a gradient sensor; the camera after the steering angle is adjusted shoots the front of the vehicle to form an image, the shot image is transmitted to the detector, the detector detects the image with the traffic signal lamp through the classifier, and further detects the area of the traffic signal lamp in the image; the detector transmits the identified image of the area with the traffic signal lamp to the identifier, and the identifier identifies the state of the traffic signal lamp in the area and outputs the current state of the traffic signal lamp. The traffic signal lamp identification method, the traffic signal lamp identification system and the computer readable medium on the downhill road can quickly, real-timely and accurately identify the traffic signal lamp state on the downhill road without reducing the image processing speed, and are favorable for the safe driving of vehicles.

Description

Traffic signal lamp identification method and system on downhill road and computer readable medium
Technical Field
The invention belongs to the technical field of automobile environment perception, and relates to a traffic signal lamp identification method and system on a downhill road and a computer readable medium.
Background
The mouthfeel of traffic lights on crossroads is known to be a necessary function for complying with traffic regulations and preventing fatal traffic accidents. In the prior art, a vision-based method is mostly adopted, and a camera arranged on a vehicle windshield is used for identifying a traffic signal lamp. These approaches have some limitations in advanced driver-assist systems or autonomous driving systems. First, the camera requires a wide field of view and high resolution, and can photograph and clearly display the traffic signal light when it is far or near the traffic signal light. These requirements increase the amount of information for image processing and require a large amount of computing power. Secondly, as shown in fig. 1, since the installation position of the camera on the vehicle does not change and the field of view of the camera is fixed, when the vehicle is in a state of a downhill, it is difficult for the vehicle to recognize a traffic signal on a flat ground near the end of a sloping road.
In view of the above problems, it is desirable to provide a system, a method and a computer readable medium for rapidly, real-timely and accurately identifying the state of traffic lights on a downhill without reducing the image processing speed.
Disclosure of Invention
In order to achieve the above purpose, the invention provides a traffic signal lamp recognition method, a system and a computer readable medium on a downhill road, which utilize a normal view field camera, a slope sensor and a camera angle regulator to form a traffic signal lamp recognition system on the downhill road, can quickly, real-timely and accurately recognize the traffic signal lamp state on the downhill road without reducing the image processing speed, is beneficial to the safe driving of vehicles, particularly advanced auxiliary driving vehicles or automatic driving vehicles, and solves the problem that the traffic signal lamp on the downhill road is difficult to accurately recognize in the prior art.
The invention adopts the technical scheme that the traffic signal lamp identification method on the downhill comprises the following steps:
s10, adjusting the rotation angle of the orientation angle of the camera according to road gradient information fed back by the gradient sensor;
s20, shooting the front of the vehicle by the camera after the steering angle of the heading angle is adjusted to form an image, transmitting the shot image to a detector, detecting the image with the traffic signal lamp by the detector through a classifier, and further detecting the area of the traffic signal lamp in the image;
and S30, the detector transmits the identified image of the area with the traffic signal lamp to the identifier, and the identifier identifies the state of the traffic signal lamp in the area and outputs the current state of the traffic signal lamp.
Further, in S10, adjusting the rotation angle of the camera toward the angle according to the road gradient information fed back by the gradient sensor includes the following steps:
s11, firstly adopting a finite impulse response filter to carry out low on the voltage signalThrough filtering signal processing, the gradient sensor outputs a voltage value X according to the current state when driving out And the voltage value X output when the vehicle is running under the horizontal road condition state ref By α = arcsin [ (X) out -X ref )/0.8]Calculating to obtain a road slope angle alpha when the vehicle is running at the current state;
s12, the microprocessor receives a road slope angle alpha transmitted by the slope sensor when the vehicle runs in the current state, calculates an angle beta which the camera angle adjusting device should rotate according to beta =1.2 alpha, and converts the value of the angle beta which should rotate into a corresponding PWM signal value;
and S13, the camera angle adjusting device consists of a steering engine and a camera fixing device, wherein a camera is fixedly arranged in the camera fixing device, the steering engine receives the PWM signal value transmitted by the micro processor, the rotating angle of the steering engine is adjusted according to the pulse width duration of the PWM signal value, and then the rotating angle of the orientation angle of the camera is adjusted.
Further, in S20, the detector detects the image with the traffic light through the classifier, and further detects the area of the traffic light in the image, specifically: the method comprises the following steps of detecting an image with a traffic signal lamp by adopting an AdaBoost classifier based on Haar-like characteristics, and further detecting the area of the traffic signal lamp in the image, wherein the AdaBoost classifier comprises two processes: a training process and a recognition process;
in the training process, on one hand, haar-like features which play a key role in classification and identification are selected from a large number of Haar-like features, and on the other hand, an AdaBoost classifier which accurately identifies a traffic signal light region and a non-traffic signal light region is trained to prepare for the identification process;
in the identification process, the key Haar features extracted in the training process and the trained AdaBoost classifier are used for identifying the images transmitted by the camera, and the images with the traffic signal lamps and the areas of the traffic signal lamps in the images are identified;
the identification process specifically comprises the following steps: and (3) classifying and identifying whether an area with a traffic signal lamp exists in the image transmitted by the camera: comprises the steps of image preprocessing; calculating an integral graph; calculating corresponding Haar-like characteristic values by utilizing the Haar-like characteristic information selected in the training process to form characteristic vectors; and detecting whether the area with the traffic signal lamp exists in the image transmitted by the camera by using the AdaBoost classifier trained in the training process and the obtained feature vector, and outputting a final classification recognition result.
Further, the training process includes four training sub-processes: preprocessing an image; calculating an integral graph; extracting Haar-like features; training an AdaBoost classifier; wherein the content of the first and second substances,
image preprocessing: the shot image is divided into two parts: one part is an image with a traffic light and is used as a traffic light training sample; the other part is an image without a traffic signal lamp and is used as a non-traffic signal lamp training sample; normalizing all traffic signal lamp training samples and non-traffic signal lamp training samples into 128 multiplied by 128 gray level images as normalized traffic signal lamp training samples and normalized non-traffic signal lamp training samples;
and (3) calculating an integral graph: respectively calculating a forward integral image and an oblique integral image of each normalized traffic signal lamp training sample and each normalized non-traffic signal lamp training sample;
extracting Haar-like features: the expanded Haar-like features are divided into 15 features of 4 categories, the size of each Haar-like feature is set to be 2 multiplied by 1, and according to a forward integral image and an oblique integral image of each normalized traffic signal lamp training sample and each normalized non-traffic signal lamp training sample, 15 Haar-like features of different sizes of each normalized traffic signal lamp training sample and each normalized non-traffic signal lamp training sample image are calculated and extracted and used for describing the edge and structural features of the traffic signal lamp;
training an AdaBoost classifier, which comprises the steps of constructing a weak classifier, constructing a strong classifier and constructing a cascade classifier:
constructing a weak classifier: selecting one type of Haar features from 15 types of Haar features as input, and obtaining a weak classifier h of the Haar features through training j (x) Each weak classifier h j (x) Are comprised of selected Haar-like feature values and a threshold,the form is shown as the following formula:
Figure BDA0002972567250000031
wherein x represents a sample, f j (x) Represents the corresponding characteristic value, p, of the jth Haar-like characteristic on the sample x j Determining the positive or negative of the inequality, theta j Representation classifier h j (x) A threshold corresponding to the Haar-like eigenvalue in (1);
constructing a strong classifier: training with weak classifiers for many times, continuously increasing the weight of the misclassified samples in each training, continuously training, selecting the optimal weak classifier from each training, and linearly combining into a strong classifier with better classification capability;
constructing a cascade classifier: adopting a cascade method, separating negative samples by each stage of strong classifier, leading the rest samples to enter the next stage of strong classifier, and obtaining positive samples through the prediction of the last strong classifier; and training a sample set based on the constructed cascade classifier so as to obtain features which play a key role in classification and identification and a final classifier.
Further, the specific training process for constructing the strong classifier is as follows:
selecting a training set with n samples, wherein a traffic signal training samples and b non-traffic signal training samples are selected, n = a + b, and the sample set is (x) 1 ,y 1 ),(x 2 ,y 2 ),...,(x n ,y n ),x i For the ith sample, y i To illustrate x i Whether it is a traffic signal light training sample or a non-traffic signal light training sample, when y i When =0, then x i Non-traffic light training samples; when y is i When =1, then x i Is a traffic signal light training sample;
initializing sample weights: the weights of all traffic signal lamp training samples are 1/2a, and the weights of all non-traffic signal lamp training samples are 1/2b;
for the training times T =1, \ 8230, the process of training to obtain the optimal weak classifier is as follows:
step a1, normalizing the weights of all samples in the current round:
Figure BDA0002972567250000041
in the formula, W t,i Represents the normalized weight of the ith sample in the t training, w t,i Represents the weight of the ith sample in the t training, w t,j Representing the weight of a jth sample in the tth training, wherein j represents the jth sample, and n represents the total number of samples;
step a2, training a weak classifier h according to each Haar-like feature j j Classifying whether the samples in the sample set belong to traffic signal lamp training samples, and calculating the error of the sample set classification:
Figure BDA0002972567250000042
in the formula, epsilon j Error, h, representing sample set classification j (x i ) Is a weak classifier h j For sample x i And (5) classifying results.
A3, selecting an optimal weak classifier from each training; and (3) updating the weight: if the sample is classified correctly, then
Figure BDA0002972567250000043
ε t Representing the error rate of the t-th training, W if the sample is misclassified t+1,i =W t,i (ii) a Linearly combining the T optimal weak classifiers into a strong classifier, wherein the formula of the strong classifier is shown as the following formula:
Figure BDA0002972567250000044
in the formula, a t Represents the weight of the weak classifier trained for the t-th time, h t (x) Represents the optimal weak classifier selected in the t training,
Figure BDA0002972567250000045
further, in S30, the identifier identifies the state of the traffic signal lamp in the area, specifically:
identifying the state of the image in the area with the traffic light by a classifier, wherein the classifier adopts two characteristics of an orientation gradient histogram HOG and a bulb HSV color histogram, and integrates and trains the two characteristics of the orientation gradient histogram HOG and the bulb HSV color histogram by a support vector machine;
in the training process, firstly, the parameter gamma and the penalty factor C of the optimal radial basis function are determined by a grid search method, then a support vector set is found by learning of a training set, and a Lagrange multiplier a is preliminarily determined i And b, adjusting and optimizing the obtained relevant parameters of the support vector machine model by using a test set, and finally determining the parameters of a decision function of the optimal classification surface of the support vector machine model;
after the training of the support vector machine model is completed, each image transmitted by the detector is brought into a decision function of each support vector machine model, and finally the classification category of the image is determined from the result of the support vector machine model through a voting method, so that the state of the traffic light is determined.
Furthermore, a support vector machine is used for integrating and training two characteristics of the histogram of oriented gradient HOG and the histogram of color of the lamp bulb HSV, and the method specifically comprises the following steps:
step b1: normalizing the sample image to 48 × 48 pixel size, selecting the histogram of oriented gradient HOG and the histogram of color of lamp bulb HSV of the normalized sample image as the characteristic value of the normalized sample image, and forming a characteristic value vector x = (p) 1 ,p 2 ) X denotes a vector of eigenvalues, p 1 Representing oriented gradient histogram feature value, p 2 Representing the characteristic value of the HSV color histogram of the bulb, and converting a characteristic value vector x = (p) 1 ,p 2 ) Taking the state y of the traffic signal lamp as an input, and forming a traffic signal lamp state sample set;
in the extraction of the directional gradient histogram of the image, selecting cell units with the size of 6 multiplied by 6 pixels, wherein each cell unit is 9 bins, taking the rectangular interval Block as 2 multiplied by 2, extracting the directional gradient histogram of the image, and then performing dimensionality reduction on data by using a principal component analysis method to obtain a final value;
the states of the traffic signal lamp are three types: the method comprises the following steps of respectively corresponding to y =1, y =2 and y =3 for red lamps, green lamps and yellow lamps, extracting 4/5 of 3 samples corresponding to the state y of the traffic signal lamp as a training set, and taking the rest 1/5 as a test set;
step b2: determining the number of Support Vector Machines (SVM): 3 classifiers are constructed, and respectively: a red-green support vector machine, wherein the sample sets are taken from the sample sets with bright red light and bright green light, and y =1 when the sample sets are taken from the samples with bright red light; taken from a sample with a bright green light, y = -1; a red-yellow support vector machine, the sample sets are taken from the sample sets of red light and yellow light, and the sample sets are taken from the sample sets of red light, so that y =1; if the sample is taken from a sample with yellow light on, then y = -1; a green-yellow support vector machine, the sample set taken from the sample set of green and yellow light on, from the sample of green light on, then y =1; if the sample is taken from a sample with a bright yellow light, y = -1, and the three support vector machines are trained respectively;
and b3: training a support vector machine: determining initial values of relevant parameters of a decision function of the optimal classification surface of the sample set through a training set; the relevant parameters comprise optimal kernel function parameters and penalty factors; determining the optimal kernel function parameter by adopting a grid search method; using a radial basis kernel function K (x) i ,x)=exp(-γ||x i -x|| 2 ) The method is used as an optimal kernel function to realize the mapping of a support vector machine from an original space to a feature space, wherein gamma is a kernel parameter and a relaxation factor xi is introduced i And a penalty factor C, namely solving the problem of the optimal classification surface equivalently to solve a convex quadratic programming problem shown as the following formula:
Figure BDA0002972567250000061
wherein R is: (w) represents an objective function, w is a normal vector of an optimal classification surface, C represents a penalty factor, ξ i Representing the relaxation factor, b is the offset coefficient, N is the number of samples, x i As sample feature vector, y i The traffic signal lamp state corresponding to the sample is obtained;
and (3) applying a Lagrange multiplier method and considering that the Karush-Kuhn-Tucker condition is satisfied, and obtaining a decision function of the optimal classification surface as follows:
Figure BDA0002972567250000062
wherein f (x) represents the decision function of the optimal classification surface, sgn is the sign function, a i And (4) corresponding to each sample, wherein x is a target characteristic vector, and SV represents a support vector.
And further, the step of inputting the image determined to have the traffic signal lamp by the step S20 into a pre-trained neural network for monocular depth estimation is included, the depth corresponding to each pixel in the image is output, the depth information l of the traffic signal lamp at the vehicle position at the current moment is obtained by combining the area of the traffic signal lamp in the image output by the S20 detector and the depth averaging method of all pixels in the area, and the distance S from the vehicle to the traffic signal lamp position at the current moment is obtained by combining the road slope angle alpha obtained by the step S10 and according to S = l/cos alpha.
Another object of the present invention is to provide a traffic signal light recognition system on a downhill, including:
a memory for storing instructions executable by the processor;
a processor for executing the instructions to implement the method as described above.
It is a further object of the invention to provide a computer readable medium having stored computer program code which, when executed by a processor, implements a method as described above.
The invention has the beneficial effects that:
(1) This patent proposes a traffic signal lamp identification system on downhill path that utilizes normal visual field camera and slope sensor and camera angle regulator to constitute. Compared with a wide view field camera, the normal view field camera has small image information amount, the processing speed of the algorithm on the image is increased, and the camera angle adjuster can adjust the angle of the camera according to the road gradient information fed back by the gradient sensor, so that vehicles on an inclined road can detect traffic lights on a flat ground at the end of the inclined road. The traffic signal lamp identification method on the downhill road does not reduce the image processing speed, can quickly, real-timely and accurately identify the traffic signal lamp state on the downhill road, and is favorable for the safe running of vehicles, particularly advanced auxiliary driving vehicles or automatic driving vehicles.
(2) The method for adjusting the camera observation angle by utilizing the slope angle enables a vehicle to accurately observe a traffic signal lamp on a downhill road, an AdaBoost classifier based on a Haar-like feature is used for detecting the area of the traffic signal lamp in an image, and a Support Vector Machine (SVM) is used for integrating and training the two features to identify the state of the traffic signal lamp based on the two features of an oriented gradient histogram and a bulb HSV color histogram. The two methods have the advantages of higher processing speed, better reliability and stronger generalization capability.
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 embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of a scenario in which a prior art vehicle has limitations on signal light identification on a downhill slope.
Fig. 2 is a schematic structural diagram of a traffic light recognition system on a downhill road according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of traffic signal lamp area division in the embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an algorithm for training an AdaBoost classifier in the embodiment of the present invention.
FIG. 5 is a schematic illustration of 15 extended Haar-like features employed in embodiments of the present invention.
FIG. 6 is a schematic diagram of a cascade classifier according to an embodiment of the present invention.
Fig. 7 is a flowchart illustrating a process of classifying and identifying whether there is a traffic signal in an image from a camera according to an embodiment of the present invention.
FIG. 8 is a flow chart of a process for an identifier to identify the status of traffic lights in an area in accordance with an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A traffic light identification method on a downhill road, as shown in fig. 2, includes the steps of:
and S10, adjusting the rotation angle of the orientation angle of the camera according to the road gradient information fed back by the gradient sensor.
S11, acquiring a road slope angle alpha when the vehicle runs in the current state through the relation between voltage signals output by the slope sensor when the vehicle runs in the current state and the voltage signals output by the slope sensor when the vehicle runs in the horizontal road condition state.
Since the voltage signal output by the gradient sensor is accompanied by great noise and is difficult to be directly used for gradient acquisition, the voltage signal output by the gradient sensor is firstly subjected to low-pass filtering signal processing before being used for gradient acquisition.
The gradient sensor outputs according to the current state when drivingVoltage value X of out And the voltage value X output when the vehicle is running under the horizontal road condition state ref Calculating the road slope angle alpha when the vehicle is running at the current state through a formula (1):
α=arcsin[(X out -X ref )/0.8] (1)。
s12, the microprocessor receives the road slope angle alpha transmitted by the slope sensor when the vehicle runs in the current state, calculates the angle beta which the camera angle adjusting device should rotate according to the formula (2), and converts the angle beta value which should rotate into a corresponding PWM signal value:
β=1.2α (2)。
s13, the camera angle adjusting device is composed of a steering engine and a camera fixing device, a camera is fixedly arranged in the camera fixing device, the steering engine receives a PWM signal value transmitted by the micro processor, the rotating angle of the steering engine is adjusted according to the pulse width duration of the PWM signal value, and then the rotating angle of the orientation angle of the camera is adjusted.
Because the relation between the rotation angle of different steering engines and the pulse width and time length of the PWM signal value is different, the PWM signal value obtained by the beta value does not have a fixed formula and is determined according to the model of the steering engine, the content belongs to the common knowledge, and the invention is not repeated.
And S20, shooting the front of the vehicle by the camera after the steering angle is adjusted to form an image, transmitting the shot image to a detector, detecting the image with the traffic signal lamp by the detector through a classifier, and further detecting the area of the traffic signal lamp in the image.
The specific structure of the classifier is not limited by the invention, as long as the image with the traffic signal lamp can be detected, and the area of the traffic signal lamp in the image can be further detected. In a preferred embodiment, an AdaBoost classifier based on Haar-like features is used to detect images with traffic lights and further detect the area of the traffic lights in the images. The division of the traffic signal in the image is shown in fig. 3, and the area of each traffic signal has four angular distances of L/2 in addition to the traffic signal, where L is the height of the traffic signal box.
The use of an AdaBoost classifier based on Haar-like features to detect images with traffic signals and further detect the area of the traffic signal in the image involves two processes: a training process and a recognition process.
In the training process, on one hand, a Haar-like feature which plays a key role in classification and identification is selected from a large number of Haar-like features, and on the other hand, an AdaBoost classifier which can accurately identify a traffic signal lamp area and a non-traffic signal lamp area is trained to prepare for the next identification process.
In the identification process, the key-class Haar features extracted in the training process and the trained AdaBoost classifier are used for identifying the images transmitted by the camera, and the images with the traffic signal lamps and the areas of the traffic signal lamps in the images are obtained through identification.
As shown in fig. 4, the training process includes the following four training sub-processes, including:
preprocessing an image; calculating an integrogram; extracting Haar-like features; an AdaBoost classifier is trained.
Image preprocessing:
the shot image is divided into two parts: one part is an image with a traffic light and is used as a traffic light training sample; the other part is an image without a traffic light and is used as a non-traffic light training sample;
all traffic signal training samples and non-traffic signal training samples are normalized into 128 x 128 gray-scale images as normalized traffic signal training samples and normalized non-traffic signal training samples.
And (3) calculating an integral graph:
and respectively calculating a forward integral image and an oblique integral image of each normalized traffic signal lamp training sample and each normalized non-traffic signal lamp training sample.
Extracting Haar-like features: as shown in fig. 5, the expanded Haar-like features of the present invention are divided into 4 categories and 15 categories, the size of each Haar-like feature is set to 2 × 1, and according to the calculated forward integral map and the oblique integral map of each normalized traffic signal training sample and normalized non-traffic signal training sample, 15 different sizes of Haar-like features of each normalized traffic signal training sample and normalized non-traffic signal training sample image are calculated and extracted for describing the edge and structural features of the traffic signal.
Training an AdaBoost classifier:
the process of training the AdaBoost classifier includes: constructing a weak classifier; constructing a strong classifier; and constructing a cascade classifier.
Constructing a weak classifier: selecting a certain class of Haar features from the 15 classes of Haar features as input, and obtaining the weak classifier h of the Haar features through training j (x) Each weak classifier h j (x) Are formed by the selected Haar-like eigenvalues and a threshold, which is of the form shown in equation (3):
Figure BDA0002972567250000091
wherein x represents a sample, f j (x) Represents the corresponding characteristic value, p, of the jth Haar-like characteristic on the sample x j Determining the positive or negative of the inequality, θ j Representation classifier h j (x) The Haar-like characteristic value in (1) is obtained.
Constructing a strong classifier: training with weak classifiers for many times, continuously increasing the weight of the misclassified samples in each training, reducing the weight of the correctly classified samples, enabling the misclassified samples in the weak classifiers to be trained in the following training in a repeated manner, improving the training accuracy, continuing the training, selecting the optimal weak classifier (the weak classifier with the minimum error in the training process) from each training, linearly combining into the strong classifier with better classification capability, and specifically training in the following steps:
selecting a training set with n samples, wherein a traffic signal training samples and b non-traffic signal training samples are selected, n = a + b, and the sample set is (x) 1 ,y 1 ),(x 2 ,y 2 ),...,(x n ,y n ),x i Is a firsti samples, y i To illustrate x i Whether it is a traffic signal training sample or a non-traffic signal training sample, when y i If =0, then x i Non-traffic light training samples; when y is i If =1, then x i Is a traffic light training sample.
Initializing sample weights: the weight of all traffic signal training samples is 1/2a, and the weight of all non-traffic signal training samples is 1/2b.
For the training times T =1, \ 8230, the process of training to obtain the optimal weak classifier is as follows:
step a1, normalizing the weights of all samples in the current round (so that the sum of the weights of all samples in the current round is 1):
Figure BDA0002972567250000101
in the formula, W t,i Represents the normalized weight of the ith sample in the t training, w t,i Represents the weight of the ith sample in the t training, w t,j Represents the weight of the jth sample in the t training, j represents the jth sample, n represents the total number of samples, and n is 15.
Step a2, training a weak classifier h according to each Haar-like feature j j Classifying whether the samples in the sample set belong to traffic signal lamp training samples, and calculating the error of the sample set classification:
Figure BDA0002972567250000102
in the formula, epsilon j Error, h, representing sample set classification j (x i ) Is a weak classifier h j For sample x i And (5) classifying results.
Step a3, selecting an optimal (namely, the error is minimum) weak classifier from each training; updating the weight: if the sample is classified correctly, then
Figure BDA0002972567250000103
ε t Representing the error rate of the t-th training, W if the sample is misclassified t+1,i =W t,i (ii) a Linearly combining the T optimal weak classifiers into a strong classifier, wherein the formula of the strong classifier is shown as the following formula:
Figure BDA0002972567250000104
in the formula, a t Represents the weight of the weak classifier trained for the t-th time, h t (x) Represents the optimal weak classifier selected in the t training,
Figure BDA0002972567250000111
constructing a cascade classifier: a cascade connection method is adopted, wherein cascade connection is a method for connecting a plurality of strong classifiers in series from small to large according to classification capability, as shown in figure 6, each stage of strong classifier separates out negative samples, the rest samples enter the next stage of strong classifier, and positive samples are obtained through prediction of the last strong classifier.
Based on the cascade classifier constructed above, the sample set is trained, so as to obtain features which play a key role in classification and identification and a final classifier.
Whether the images transmitted by the camera have the traffic signal lamps or not is classified and identified; the identification process is as follows: as shown in fig. 7, the step of performing classification and identification on whether the area with the traffic signal lamp exists in the image transmitted by the camera includes image preprocessing, integral image calculation, haar-like feature extraction and classification and identification by applying a trained AdaBoost classifier;
wherein the image preprocessing and the integral graph calculation are similar to the training process; extracting Haar-like features, namely calculating corresponding Haar-like feature values by using Haar-like feature information selected in a training process, including position, structure and type information, to form feature vectors; and detecting whether the area with the traffic signal lamp exists in the image transmitted by the camera by using the acquired feature vector by using the AdaBoost classifier trained in the training process, and outputting a final classification recognition result.
And S30, the detector transmits the identified image of the area with the traffic signal lamp to the identifier, and the identifier identifies the state of the traffic signal lamp in the area and outputs the current state of the traffic signal lamp.
The invention does not limit the specific structure of the recognizer, as long as the state of the traffic signal lamp in the area can be recognized and the current state of the traffic signal lamp is output. In a preferred embodiment, the identifier identifies the state of the image of the traffic light area identified in the previous step by a classifier. The classifier adopts two characteristics of an orientation gradient histogram and a bulb HSV color histogram and integrates and trains the two characteristics by a Support Vector Machine (SVM). As shown in fig. 8, the training steps using the support vector machine are as follows:
step b1: because the Support Vector Machine (SVM) is a two-class classifier, the traffic signal lamp state classification is a three-class classification problem, and the support vector machine is expanded to solve the three-class classification problem of the traffic signal lamp by adopting a 1-a-1 algorithm.
Normalizing the sample image to 48 × 48 pixel size, selecting orientation gradient Histogram (HOG) and bulb HSV color histogram of the normalized sample image as characteristic values of the normalized sample image, and constructing a characteristic value vector x = (p) 1 ,p 2 ) X denotes a vector of eigenvalues, p 1 Representing oriented gradient histogram feature value, p 2 Representing the characteristic value of HSV color histogram of the bulb, and converting the characteristic value vector x = (p) 1 ,p 2 ) As an input, the state y of the traffic light is taken as an output, constituting a traffic light state sample set.
In the extraction of the oriented gradient histogram of the image, cell units with the size of 6 x 6 pixels are selected, each cell unit is 9 bins, the rectangular interval Block is 2 x 2, the oriented gradient histogram of the image is extracted, and then the principal component analysis method is used for reducing the dimension of the data to obtain a final value.
The states of the traffic signal lamp are three types: red light, green light and yellow light respectively correspond to y =1,y =2,y =3, 4/5 of 3 samples corresponding to the state y of the traffic signal lamp are extracted as a training set, and the rest 1/5 samples are taken as a test set.
And b2: determining the number of Support Vector Machines (SVMs): 3 classifiers are constructed, and respectively: a red-green (1-2) support vector machine, the sample sets taken from the sample sets of red light and green light, if taken from the sample of red light, y =1; if taken from a sample with a green light on, y = -1; a red-yellow (1-3) support vector machine, the sample sets taken from the sample sets of red and yellow light, if taken from the sample of red light, y =1; if taken from a sample with a yellow light on, y = -1; a green-yellow (2-3) support vector machine, the sample set taken from the sample set of green and yellow light, if taken from the sample of green light, y =1; if taken from a sample with a yellow light on, y = -1. The three support vector machines are trained separately.
And b3: training a support vector machine: determining initial values of relevant parameters of a decision function of the optimal classification surface of the sample set through a training set; the relevant parameters comprise optimal kernel function parameters and penalty factors; determining the optimal kernel function parameter by adopting a grid search method; the invention selects a radial basis kernel function K (x) i ,x)=exp(-γ||x i -x|| 2 ) The method is used as an optimal kernel function to realize the mapping of a support vector machine from an original space to a feature space, wherein gamma is a kernel parameter and a relaxation factor xi is introduced i And a penalty factor C, the problem of solving the optimal classification surface is equivalent to the problem of solving the convex quadratic programming of the following formula:
Figure BDA0002972567250000121
in the formula, R (w) represents an objective function, w is a normal vector of an optimal classification surface, C represents a penalty factor, and xi i Representing the relaxation factor, b is the offset coefficient, N is the number of samples, x i As sample feature vector, y i And the traffic light state corresponding to the sample is obtained.
Applying a Lagrange multiplier method and considering that the Karush-Kuhn-Tucker condition is satisfied, the decision function for obtaining the optimal classification surface is as follows:
Figure BDA0002972567250000122
in the formula, f (x) represents a decision function of an optimal classification surface, sgn is a sign function, a i And (4) corresponding to each sample, wherein x is a target characteristic vector, and SV represents a support vector.
In the training process, firstly, determining the parameter gamma and the penalty factor C of the optimal radial basis kernel function by a grid search method, then, searching a support vector set through the learning of a training set, and preliminarily determining the Lagrangian multiplier a i And adjusting and optimizing the obtained relevant parameters of the support vector machine model by using the test set, and finally determining the parameters of the decision function of the optimal classification surface of the support vector machine model.
After the training of the support vector machine model is completed, the support vector machine model is applied to the model of the invention, each image transmitted by the detector is brought into a decision function of each support vector machine model, and finally, the classification category of the image is determined from the results of the support vector machine models through a voting method, so that the state of the traffic light is determined.
The method can further comprise the step of inputting the image with the traffic signal lamp determined in the S20 step into a pre-trained neural network for monocular depth estimation, the depth corresponding to each pixel in the image is output, the depth information l of the traffic signal lamp at the current moment under the vehicle position is obtained by combining the area of the traffic signal lamp in the image output by the S20 detector and the depth averaging method of all pixels in the area, and the distance S from the vehicle to the traffic signal lamp at the current moment is obtained according to S = l/cos alpha and the road slope angle alpha obtained in the S10.
The pre-trained neural network for monocular depth estimation is mature prior art, and can be realized as long as the neural network has the monocular depth estimation function, which is not described in detail in the application.
Traffic signal lamp identification system includes following three modules on the downhill path:
(1) The camera angle adjusting module: as shown in fig. 2, the camera angle adjusting module includes a slope sensor, a finite impulse response filter, a microprocessor, and a camera angle adjusting device.
The gradient sensor is arranged between the primary and secondary driver seats (close to the mass center of the automobile), and the positive direction of an X axis of the gradient sensor is consistent with the positive direction of an X axis of a vehicle coordinate system; the camera angle adjusting device comprises a steering engine and a camera fixing device.
The slope sensor transmits the acquired road slope alpha to the microprocessor, the microprocessor receives road slope information in the current driving state, calculates the angle beta of the camera angle adjusting device which should rotate, converts the angle beta value which should rotate into a corresponding PWM signal value, the steering engine receives the PWM signal value transmitted by the microprocessor, adjusts the rotating angle of the steering engine according to the pulse width duration of the PWM signal value, and then drives the adjustment of the rotating angle of the orientation angle of the camera.
(2) A detector module: the system is used for receiving an image formed by shooting the front of the vehicle by the camera after the steering angle of the heading angle is adjusted, detecting the image with the traffic signal lamp through the classifier, and further detecting the area of the traffic signal lamp in the image.
(3) An identifier module: the traffic signal lamp state recognition device is used for receiving the image of the area with the traffic signal lamp, recognized by the detector, recognizing the state of the traffic signal lamp in the area and outputting the current state of the traffic signal lamp.
The traffic light identification system on the downhill road can be implemented as a computer program, stored in a hard disk, and recorded in a processor for execution so as to implement the method of the embodiment of the present invention.
An embodiment of the present invention further provides a computer readable medium storing computer program code, which when executed by a processor implements the traffic light identification method on a downhill road.
The traffic light identification method on a downhill road may also be stored in a computer-readable storage medium as an article of manufacture when implemented as a computer program. For example, computer-readable storage media can include but are not limited to magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips), optical disks (e.g., compact Disk (CD), digital Versatile Disk (DVD)), smart cards, and flash memory devices (e.g., electrically erasable programmable read-only memory (EPROM), card, stick, key drive). In addition, various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" can include, without being limited to, wireless channels and various other media (and/or storage media) capable of storing, containing, and/or carrying code and/or instructions and/or data.
It should be understood that the above-described embodiments are illustrative only. The described embodiments of the invention may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, and/or other electronic units designed to perform the functions described herein, or a combination thereof.
It is noted that, in the present application, relational terms such as first, second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "...," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (3)

1. A traffic signal lamp identification method on a downhill road is characterized by comprising the following steps:
s10, adjusting the rotation angle of the orientation angle of the camera according to road gradient information fed back by the gradient sensor;
s10 comprises the following steps:
s11, firstly, a finite impulse response filter is adopted to carry out low-pass filtering signal processing on the voltage signal, and the gradient sensor outputs a voltage value X according to the current state when the vehicle runs out And voltage value X output when driving in horizontal road condition state ref By α = arcsin [ (X) out -X ref )/0.8]Calculating to obtain a road slope angle alpha when the vehicle is running at the current state;
s12, the microprocessor receives a road slope angle alpha transmitted by the slope sensor when the vehicle runs in the current state, calculates an angle beta which the camera angle adjusting device should rotate according to beta =1.2 alpha, and converts the value of the angle beta which should rotate into a corresponding PWM signal value;
s13, the camera angle adjusting device consists of a steering engine and a camera fixing device, wherein a camera is fixedly arranged in the camera fixing device, the steering engine receives a PWM signal value transmitted by the micro processor, and the rotating angle of the steering engine is adjusted according to the pulse width duration of the PWM signal value so as to drive the adjustment of the rotating angle of the orientation angle of the camera;
s20, shooting the front of the vehicle by the camera after the steering angle of the heading angle is adjusted to form an image, transmitting the shot image to a detector, detecting the image with the traffic signal lamp by the detector through a classifier, and further detecting the area of the traffic signal lamp in the image;
in S20, the detector detects the image with the traffic light through the classifier, and further detects the area of the traffic light in the image, specifically: the method comprises the following steps of detecting an image with a traffic signal lamp by adopting an AdaBoost classifier based on Haar-like features, and further detecting the area of the traffic signal lamp in the image, wherein the method comprises the following two processes: a training process and a recognition process;
in the training process, on one hand, haar-like features which play a key role in classification and identification are selected from a large number of Haar-like features, and on the other hand, an AdaBoost classifier which accurately identifies a traffic signal lamp area and a non-traffic signal lamp area is trained to prepare for the identification process;
in the identification process, the key Haar features extracted in the training process and the trained AdaBoost classifier are used for identifying the images transmitted by the camera, and the images with the traffic signal lamps and the areas of the traffic signal lamps in the images are obtained by identification:
the identification process specifically comprises the following steps: and (3) classifying and identifying whether an area with a traffic signal lamp exists in the image transmitted by the camera: comprises the steps of image preprocessing; calculating an integral graph; calculating corresponding Haar-like characteristic values by utilizing the Haar-like characteristic information selected in the training process to form characteristic vectors; detecting whether an area with a traffic signal lamp exists in an image transmitted by a camera by using an AdaBoost classifier trained in a training process and using the obtained feature vector, and outputting a final classification recognition result;
the training process includes four training sub-processes: preprocessing an image; calculating an integral graph; extracting Haar-like features; training an AdaBoost classifier; wherein the content of the first and second substances,
image preprocessing: the shot image is divided into two parts: one part is an image with a traffic light and is used as a traffic light training sample; the other part is an image without a traffic light and is used as a non-traffic light training sample; normalizing all traffic signal lamp training samples and non-traffic signal lamp training samples into 128 multiplied by 128 gray level images as normalized traffic signal lamp training samples and normalized non-traffic signal lamp training samples;
and (3) calculating an integral graph: respectively calculating a forward integral image and an oblique integral image of each normalized traffic signal lamp training sample and each normalized non-traffic signal lamp training sample;
extracting Haar-like features: the expanded Haar-like features are divided into 4 categories and 15 categories, the size of each Haar-like feature is set to be 2 multiplied by 1, and according to a forward integral image and an oblique integral image of each normalized traffic signal lamp training sample and each normalized non-traffic signal lamp training sample, 15 Haar-like features with different sizes of each normalized traffic signal lamp training sample and each normalized non-traffic signal lamp training sample image are calculated and extracted and used for describing the edge and structural features of the traffic signal lamp;
training an AdaBoost classifier, which comprises the steps of constructing a weak classifier, constructing a strong classifier and constructing a cascade classifier:
constructing a weak classifier: selecting one type of Haar features from 15 types of Haar features as input, and obtaining a weak classifier h of the Haar features through training j (x) Each weak classifier h j (x) Are formed by the selected Haar-like eigenvalues and a threshold value of the form:
Figure FDA0003888025070000021
wherein x represents a sample, f j (x) Represents the corresponding characteristic value, p, of the jth Haar-like characteristic on the sample x j Determining the positive or negative of the inequality, theta j Representation classifier h j (x) A threshold corresponding to the Haar-like eigenvalue in (1);
constructing a strong classifier: training with weak classifiers for many times, continuously increasing the weight of the misclassified samples in each training, continuously training, selecting the optimal weak classifier from each training, and linearly combining into a strong classifier with better classification capability;
constructing a cascade classifier: adopting a cascade method, separating out negative samples by each stage of strong classifier, entering the rest samples into the next stage of strong classifier, and obtaining positive samples through the prediction of the last strong classifier; training a sample set based on the constructed cascade classifier so as to obtain features playing a key role in classification and identification and a final classifier;
the specific training process for constructing the strong classifier is as follows:
selecting a training set with n samples, wherein a traffic signal training samples and b non-traffic signal training samples are selected, n = a + b, and the sample set is (x) 1 ,y 1 ),(x 2 ,y 2 ),...,(x n ,y n ),x i For the ith sample, y i To illustrate x i Whether it is a traffic signal light training sample or a non-traffic signal light training sample, when y i When =0, then x i Non-traffic light training samples; when y is i When =1, then x i Is a traffic signal lamp training sample;
initializing sample weights: the weights of all traffic signal lamp training samples are 1/2a, and the weights of all non-traffic signal lamp training samples are 1/2b;
for the training times T =1, \ 8230, the process of training to obtain the optimal weak classifier is as follows:
step a1, normalizing the weights of all samples in the round:
Figure FDA0003888025070000031
in the formula, W t,i Represents the normalized weight of the ith sample in the t training, w t,i Represents the weight of the ith sample in the t training, w t,j Representing the weight of a jth sample in the tth training, wherein j represents the jth sample, and n represents the total number of samples;
step a2, training a weak classifier h according to each Haar-like feature j j Classifying whether the samples in the sample set belong to traffic signal lamp training samples, and calculating the error of the sample set classification:
Figure FDA0003888025070000032
in the formula, epsilon j Error, h, representing sample set classification j (x i ) Is a weak classifier h j For sample x i The result of the classification;
a3, selecting an optimal weak classifier from each training; updating the weight: if the sample is classified correctly, then
Figure FDA0003888025070000033
ε t Representing the error rate of the t-th training, W if the sample is misclassified t+1,i =W t,i (ii) a Linearly combining the T optimal weak classifiers into a strong classifier, wherein the formula of the strong classifier is shown as the following formula: />
Figure FDA0003888025070000034
In the formula, a t Represents the weight of the weak classifier trained for the t-th time, h t (x) Represents the optimal weak classifier selected in the t training,
Figure FDA0003888025070000035
inputting the image determined to have the traffic signal lamp by the S20 into a pre-trained neural network for monocular depth estimation, obtaining depth information l of the traffic signal lamp at the current vehicle position by outputting the depth corresponding to each pixel in the image and combining the area of the traffic signal lamp in the image output by the S20 detector, and obtaining the distance S from the vehicle to the traffic signal lamp at the current time according to S = l/cos alpha by combining the road slope angle alpha obtained by the S10 and by averaging the depths of all pixels in the area;
s30, the detector transmits the identified image of the area with the traffic signal lamp to the identifier, and the identifier identifies the state of the traffic signal lamp in the area and outputs the current state of the traffic signal lamp;
the recognizer recognizes the state of the traffic signal lamp in the area, specifically:
identifying the state of the image in the area with the traffic light by a classifier, wherein the classifier adopts two characteristics of an orientation gradient histogram HOG and a bulb HSV color histogram, and integrates and trains the two characteristics of the orientation gradient histogram HOG and the bulb HSV color histogram by a support vector machine;
in the training process, firstly, determining the parameter gamma and the penalty factor C of the optimal radial basis kernel function by a grid search method, then, searching a support vector set through the learning of a training set, and preliminarily determining the Lagrangian multiplier a i And b, adjusting and optimizing the obtained relevant parameters of the support vector machine model by using a test set, and finally determining the parameters of a decision function of the optimal classification surface of the support vector machine model;
after the training of the support vector machine model is finished, each image transmitted by the detector is brought into a decision function of each support vector machine model, and finally the classification category of the image is determined from the result of the support vector machine model through a voting method, so that the state of a traffic light is determined;
integrating and training two characteristics of an orientation gradient histogram HOG and a bulb HSV color histogram by using a support vector machine, and specifically comprising the following steps of:
step b1: normalizing the sample image to 48 × 48 pixel size, selecting the histogram of oriented gradient HOG and the histogram of color of lamp bulb HSV of the normalized sample image as the characteristic value of the normalized sample image, and forming a characteristic value vector x = (p) 1 ,p 2 ) X denotes a vector of eigenvalues, p 1 Representing oriented gradient histogram feature value, p 2 Representing the characteristic value of the HSV color histogram of the bulb, and converting a characteristic value vector x = (p) 1 ,p 2 ) Taking the state y of the traffic signal lamp as an input, and forming a traffic signal lamp state sample set;
in the extraction of the directional gradient histogram of the image, selecting cell units with the size of 6 multiplied by 6 pixels, wherein each cell unit is 9 bins, taking the rectangular interval Block as 2 multiplied by 2, extracting the directional gradient histogram of the image, and then performing dimensionality reduction on data by using a principal component analysis method to obtain a final value;
the states of the traffic signal lamp are three types: the method comprises the following steps of respectively corresponding to y =1, y =2 and y =3 for a red light, a green light and a yellow light, extracting 4/5 of 3 samples corresponding to the state y of the traffic signal lamp as a training set, and taking the rest 1/5 of the samples as a test set;
step b2: determining the number of Support Vector Machines (SVM): 3 classifiers are constructed, and respectively: a red-green support vector machine, the sample sets being taken from the sample sets of red light and green light, from the sample sets of red light, then y =1; taken from a sample with a bright green light, y = -1; a red-yellow support vector machine, the sample sets are taken from the sample sets of red light and yellow light, and the sample sets are taken from the sample sets of red light, so that y =1; if the sample is taken from a sample with yellow light on, then y = -1; a green-yellow support vector machine, the sample set taken from the sample set of green and yellow light on, from the sample of green light on, then y =1; if the sample is taken from a sample with yellow light on, y = -1, and the three support vector machines are trained respectively;
step b3: training a support vector machine: determining initial values of relevant parameters of a decision function of the optimal classification surface of the sample set through a training set; the relevant parameters comprise an optimal kernel function parameter and a penalty factor; determining the optimal kernel function parameter by adopting a grid search method; selecting a radial basis kernel function K (x) i ,x)=exp(-γ||x i -x|| 2 ) The method is used as an optimal kernel function to realize the mapping of a support vector machine from an original space to a feature space, wherein gamma is a kernel parameter and a relaxation factor xi is introduced i And a penalty factor C, namely solving the problem of the optimal classification surface equivalently to solve a convex quadratic programming problem shown as the following formula:
Figure FDA0003888025070000051
in the formula, R (w) represents an objective function, w is a normal vector of an optimal classification surface, C represents a penalty factor, and xi i Denotes the relaxation factor, b is offShift factor, N being the number of samples, x i As sample feature vector, y i The traffic signal lamp state corresponding to the sample is obtained;
and (3) applying a Lagrange multiplier method and considering that the Karush-Kuhn-Tucker condition is satisfied, and obtaining a decision function of the optimal classification surface as follows:
Figure FDA0003888025070000052
wherein f (x) represents the decision function of the optimal classification surface, sgn is the sign function, a i And (4) corresponding Lagrange multipliers for each sample, wherein x is a target characteristic vector, and SV represents a support vector.
2. A traffic signal lamp identification system on a downhill road, characterized by comprising:
a memory for storing instructions executable by the processor;
a processor for executing the instructions to implement the method of claim 1.
3. A computer-readable medium, characterized in that a computer program code is stored, which, when being executed by a processor, realizes the method of claim 1.
CN202110267619.9A 2021-03-12 2021-03-12 Traffic signal lamp identification method and system on downhill road and computer readable medium Active CN112990002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110267619.9A CN112990002B (en) 2021-03-12 2021-03-12 Traffic signal lamp identification method and system on downhill road and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110267619.9A CN112990002B (en) 2021-03-12 2021-03-12 Traffic signal lamp identification method and system on downhill road and computer readable medium

Publications (2)

Publication Number Publication Date
CN112990002A CN112990002A (en) 2021-06-18
CN112990002B true CN112990002B (en) 2023-04-18

Family

ID=76335046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110267619.9A Active CN112990002B (en) 2021-03-12 2021-03-12 Traffic signal lamp identification method and system on downhill road and computer readable medium

Country Status (1)

Country Link
CN (1) CN112990002B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105699095A (en) * 2016-01-27 2016-06-22 常州加美科技有限公司 A test method for a remotely piloted vehicle (PRV)
JP2018081405A (en) * 2016-11-15 2018-05-24 本田技研工業株式会社 Traffic light recognition device, vehicle, and traffic light recognition method
CN110475702A (en) * 2017-02-22 2019-11-19 加特可株式会社 Controller of vehicle and control method for vehicle

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0823447D0 (en) * 2007-12-24 2009-01-28 Mayer Yaron System and method for improved electric cars and/or electric car batteries and/or improved infrastructures for recharging electric cars
CN102213589A (en) * 2010-04-09 2011-10-12 常州机械电子工程研究所 Digital gradient sensor
CN102968646B (en) * 2012-10-25 2015-11-04 华中科技大学 A kind of detection method of license plate based on machine learning
CN103150547A (en) * 2013-01-21 2013-06-12 信帧电子技术(北京)有限公司 Vehicle tracking method and device
KR101741433B1 (en) * 2015-06-09 2017-05-30 엘지전자 주식회사 Driver assistance apparatus and control method for the same
CN105809184B (en) * 2015-10-30 2020-06-16 哈尔滨工程大学 Method for real-time vehicle identification and tracking and parking space occupation judgment suitable for gas station
KR20170099188A (en) * 2016-02-23 2017-08-31 엘지전자 주식회사 Driver Assistance Apparatus and Vehicle Having The Same
CN106767803A (en) * 2016-12-16 2017-05-31 杭州奥腾电子股份有限公司 The method and its device of road target missing inspection are avoided using gyroscope adjustment camera
CN107133597A (en) * 2017-05-11 2017-09-05 南宁市正祥科技有限公司 A kind of front vehicles detection method in the daytime
CN109835256B (en) * 2017-11-29 2021-04-16 长城汽车股份有限公司 Automobile panoramic all-round looking system and method and automobile
CN109947110A (en) * 2019-04-02 2019-06-28 吉林大学 Lane self-checking algorithm assemblage on-orbit control method and system towards automatic Pilot
US11180134B2 (en) * 2019-06-04 2021-11-23 Pony Ai Inc. Systems and methods for implementing a preemptive suspension control for an autonomous vehicle to improve ride quality
CN110979183B (en) * 2019-12-07 2022-04-08 吉利汽车研究院(宁波)有限公司 Vehicle blind area detection device and method and vehicle
CN111806357A (en) * 2020-07-31 2020-10-23 北京小马慧行科技有限公司 Signal acquisition method and acquisition device of traffic signal lamp

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105699095A (en) * 2016-01-27 2016-06-22 常州加美科技有限公司 A test method for a remotely piloted vehicle (PRV)
JP2018081405A (en) * 2016-11-15 2018-05-24 本田技研工業株式会社 Traffic light recognition device, vehicle, and traffic light recognition method
CN110475702A (en) * 2017-02-22 2019-11-19 加特可株式会社 Controller of vehicle and control method for vehicle

Also Published As

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

Similar Documents

Publication Publication Date Title
Saini et al. An efficient vision-based traffic light detection and state recognition for autonomous vehicles
Prioletti et al. Part-based pedestrian detection and feature-based tracking for driver assistance: real-time, robust algorithms, and evaluation
Chang et al. Online boosting for vehicle detection
Shi et al. Real-time traffic light detection with adaptive background suppression filter
EP1782335B1 (en) Method for traffic sign detection
US8842883B2 (en) Global classifier with local adaption for objection detection
CN102076531B (en) Vehicle clear path detection
Sivaraman et al. Active learning for on-road vehicle detection: A comparative study
US7724962B2 (en) Context adaptive approach in vehicle detection under various visibility conditions
CN101859382B (en) License plate detection and identification method based on maximum stable extremal region
US7853072B2 (en) System and method for detecting still objects in images
Sivaraman et al. Vehicle detection by independent parts for urban driver assistance
Wali et al. Comparative survey on traffic sign detection and recognition: a review
CN103218610B (en) The forming method of dog face detector and dog face detecting method
CN103632170A (en) Pedestrian detection method and device based on characteristic combination
CN104615986A (en) Method for utilizing multiple detectors to conduct pedestrian detection on video images of scene change
CN109886086B (en) Pedestrian detection method based on HOG (histogram of oriented gradient) features and linear SVM (support vector machine) cascade classifier
Weber et al. HDTLR: A CNN based hierarchical detector for traffic lights
Wang et al. Simultaneous multi-vehicle detection and tracking framework with pavement constraints based on machine learning and particle filter algorithm
Biswas et al. Detection and classification of speed limit traffic signs
Besbes et al. Pedestrian recognition based on hierarchical codebook of SURF features in visible and infrared images
Lampert et al. A multiple kernel learning approach to joint multi-class object detection
Barodi et al. An enhanced artificial intelligence-based approach applied to vehicular traffic signs detection and road safety enhancement
CN112990002B (en) Traffic signal lamp identification method and system on downhill road and computer readable medium
CN104966064A (en) Pedestrian ahead distance measurement method based on visual sense

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