CN114241438B - Traffic signal lamp rapid and accurate identification method based on priori information - Google Patents

Traffic signal lamp rapid and accurate identification method based on priori information Download PDF

Info

Publication number
CN114241438B
CN114241438B CN202111419474.6A CN202111419474A CN114241438B CN 114241438 B CN114241438 B CN 114241438B CN 202111419474 A CN202111419474 A CN 202111419474A CN 114241438 B CN114241438 B CN 114241438B
Authority
CN
China
Prior art keywords
traffic signal
signal lamp
image
sum
main body
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
CN202111419474.6A
Other languages
Chinese (zh)
Other versions
CN114241438A (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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202111419474.6A priority Critical patent/CN114241438B/en
Publication of CN114241438A publication Critical patent/CN114241438A/en
Application granted granted Critical
Publication of CN114241438B publication Critical patent/CN114241438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention aims to provide a traffic signal lamp rapid and accurate identification method based on priori information, and belongs to the technical field of intelligent traffic information detection. Aiming at the problem that the identification result is accurate due to the fact that the verification component range is difficult to select in the existing HSV color space identification method, the method comprises the steps of detecting the main body area of the traffic signal lamp, then summing the gray values of the main body area to judge the type of the traffic signal lamp, and identification is completed. The method can still keep high identification accuracy under the condition of serious color distortion in the image, and improves the adaptability under different environments and weather; meanwhile, the invention does not adopt a machine learning or deep learning method, thereby greatly reducing the requirements on equipment, avoiding long-time model selection and training, and simultaneously taking into account the advantages of quick and accurate recognition.

Description

Traffic signal lamp rapid and accurate identification method based on priori information
Technical Field
The invention belongs to the technical field of intelligent traffic information detection, and particularly relates to a rapid and accurate identification method of a traffic signal lamp based on prior information of structural characteristics of the traffic signal lamp.
Background
The intelligent transportation system (Intelligent Traffic System, ITS) is a comprehensive system integrating many subjects such as artificial intelligence, computer vision, automatic control principle, communication and the like. As a key ring in ITS scene information, the visual scene information contains important road traffic safety information such as traffic signals, lane lines, traffic signs, etc., so how to effectively and accurately identify the traffic signals (Traffic Light Recognition, TLR) is an important topic unavoidable in ITS.
Cameras are widely used in visual scene recognition in ITS as a relatively reliable and low cost sensor. The images acquired by the cameras may be interfered by adverse factors such as current color distortion, target area shielding, distortion and the like due to interference by factors such as weather, environment, camera characteristics and the like, so that the recognition accuracy of the traffic signal lamp is reduced. With the continuous development of subjects such as computer vision, pattern recognition, artificial intelligence, deep learning and the like, numerous methods for detecting and identifying traffic signals are developed, and the methods are roughly divided into four categories: a traffic light identification method based on color, a traffic light identification method based on shape, a traffic light identification method based on multi-feature (color, shape, map information, etc.) fusion and a traffic light identification method based on deep learning. The traffic signal lamp identification method based on the shape usually uses a Hough circle detection method to identify the traffic signal lamp, so that the traffic signal lamp is easily interfered by factors such as shielding of environmental objects, automobile tail lights, image distortion, color 'blooming effect', and the like; most of traffic signal lamp identification methods based on multi-feature fusion are based on color and shape features, feature information such as a direction gradient histogram (Histogram of Oriented Gradient, HOG), a high-precision map, a traffic signal lamp structure and the like is introduced, training and classification are carried out by using a support vector machine (Support Vector Machine, SVM), and a result better than other algorithms can be obtained on a small sample training set, but the large-scale training sample is difficult to implement, and the problem of multi-classification is difficult to solve; the traffic signal lamp identification method based on deep learning adopts convolutional neural network (Convolutional Ne ural Networks, CNN), region-CNN (RCNN), fast-RCNN and other algorithms, and has the advantages of strong learning capacity, but has the defects of large calculation amount, poor portability, high hardware requirement, complex model design, low interpretability and the like.
The color features are the most obvious features of the traffic signal lamp, the identification method is simple to realize, and the requirements on equipment hardware are not high, so that the color-based traffic signal lamp identification method is widely used. The color space judgment method is commonly adopted in The color type-based traffic signal lamp identification method, hassan N et al (Hassan N, kong W, wah C K.A Comparative Study on HSV-based and Deep Learning-based Object Detection Algorithms for Pedestrian Tr affic Light Signal Recognition [ C ]. The 3rd International Conference on Intelligent Autonomo us Systems.2020.) propose a pedestrian traffic signal lamp detection method based on HSV color space and deep learning, and under The condition that only The HSV color space is adopted, the identification accuracy is 93.25%, but The method depends on factors such as ambient light and weather to a great extent, and all components of HSV are difficult to select a universal suitable range, so that The accuracy is still not high enough in The actual identification process.
Therefore, how to further study the color space method to improve the recognition accuracy thereof becomes a research hotspot.
Disclosure of Invention
Aiming at the problems existing in the background technology, the invention aims to provide a rapid and accurate identification method of traffic signal lamps based on prior information. Aiming at the problem that the identification result is accurate due to the fact that the verification component range is difficult to select in the existing HSV color space identification method, the method comprises the steps of detecting the main body area of the traffic signal lamp, then summing the gray values of the main body area to judge the type of the traffic signal lamp, and the identification is completed.
In order to achieve the above purpose, the technical scheme of the invention is as follows:
a traffic signal lamp rapid and accurate identification method based on priori information comprises the following steps:
step 1, preprocessing traffic signal lamp images, including image inclination correction and image size standardization processing;
step 2, judging the type of the traffic signal lamp by adopting an HSV color space method on the image obtained after the pretreatment in the step 1, and if the traffic signal lamp can be judged, directly outputting a judging result; otherwise, entering a step 3;
step 3, detecting a main body area of the traffic signal lamp in the image preprocessed in the step 1, wherein the main body area comprises Canny edge detection, hough straight line detection and traffic signal lamp boundary determination; the specific process of boundary determination is as follows: screening all detected straight lines, setting an angle range to be met by the straight lines, and reserving horizontal and vertical straight lines in the angle range; regarding the horizontal straight lines, taking two horizontal straight lines closest to the horizontal midline of the signal lamp image as the upper and lower boundaries of the main body area of the traffic signal lamp; regarding the vertical straight lines, taking two vertical straight lines closest to the vertical center line as the left and right boundaries of the main body area of the traffic signal lamp;
and 4, trisecting the main body area in the vertical direction, summing the gray pixel values of each part obtained by the trisecting, wherein the summing mode is to sum the gray pixel values in the horizontal direction along the vertical direction of the image, and then judging the type of the traffic signal lamp according to the gray value results of the three parts.
Further, the prior information is: the traffic signal lamps are all vertical in shape, and the red light is in the middle of the yellow light and the green light is in the lower of the yellow light.
Further, in step 1, the traffic signal lamp image is a local area where a single traffic signal lamp is located.
Further, the image tilt correction in step 1 includes four steps of RGB color image graying processing, canny edge detection, hough straight line detection, and straight line tilt angle compensation rotation.
Further, the specific process of linear inclination angle compensation in the image inclination correction is as follows: and selecting the inclination angle of the longest straight line in all the detected straight lines as a rotation compensation angle to realize image inclination correction.
Further, the image size normalization in step 1 may be performed by nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, or the like.
Further, in step 3, if the angle θ of the straight line satisfies θ∈ [ -10,10 ]. U.80, 110], the straight line is considered as a horizontal straight line or a vertical straight line.
The mechanism of the invention is as follows: the traffic signal lamp structure characteristics are used as priori information, and under the condition that color information is not relied on, the summation section of the gray image pixel value summation method is determined by searching the main body area where the traffic signal lamp is located, and the type of the traffic signal lamp is judged according to the distribution condition of the gray image pixel value summation result, so that the problem of low identification accuracy caused by color distortion is effectively avoided.
In summary, due to the adoption of the technical scheme, the beneficial effects of the invention are as follows:
according to the traffic signal lamp rapid and accurate identification method based on the traffic signal lamp structure characteristic priori information, on the basis of identifying the type of the traffic signal lamp in the traditional HSV color space, the traffic signal lamp identification method based on the summation of gray pixel values of the main body area of the traffic signal lamp is provided, high identification accuracy can be maintained under the condition that severe color distortion occurs in an image, and the adaptability under different environments and weather is improved; meanwhile, the invention does not adopt a machine learning or deep learning method, thereby greatly reducing the requirements on equipment, avoiding long-time model selection and training, and simultaneously taking into account the advantages of quick and accurate recognition. The intelligent traffic system built based on the identification method has low cost and high accuracy, and can be also applied to the visual traffic scene identification in unmanned vehicles or auxiliary driving to improve the road traffic safety.
Drawings
Fig. 1 is a flow chart of a prior art method for identifying traffic signals using HSV color space.
Fig. 2 is a prior information schematic diagram of the signal lamp of the present invention.
FIG. 3 is a block flow diagram of the method of the present invention for identifying traffic signals.
Fig. 4 is a schematic diagram of an image tilt correction process.
Fig. 5 is a schematic diagram of image size normalization.
Fig. 6 is a schematic diagram of traffic signal body area detection.
Fig. 7 is a schematic diagram of the summation of gray pixel values for a body region of a traffic signal.
Fig. 8 is a graph of the result of summing gray pixel values to identify traffic light type data according to embodiment 1 of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the embodiments and the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present invention more apparent.
Fig. 1 is a flow chart of identifying traffic lights by adopting an HSV color space method in the prior art, and as can be seen from the flow chart, the method comprises an image preprocessing and an HSV color space judging method, all pictures applicable to the method are pictures of which the local area where the traffic lights are located are segmented, the traffic lights are vertical, red lights are on, yellow lights are on, and green lights are on, so that the traffic lights are under, and the specific process of identification is as follows:
step 1, preprocessing the traffic signal lamp image, including image inclination correction and image size standardization processing, specifically including,
step 1.1. Performing tilt correction processing on the image, including the steps of:
step 1.1.1. Converting the RGB color image of the traffic signal lamp into a gray image, wherein the conversion formula is as follows:
Gray=0.299·R+0.587·G+0.114·B (1)
step 1.1.2. Carry out Canny edge detection, firstly carry out Gao Silv wave smoothing treatment on the gray level image obtained in step 1.1 according to the following formula,
Figure SMS_1
wherein (x, y) is the coordinates of any point in the mask, (u) x ,u y ) The mask center point coordinates; sigma is the standard deviation;
bringing the coordinates of each position into a Gaussian filter function, wherein the obtained value (f (x, y)) is a coefficient of a mask;
if the mask size is (2k+1) × (2k+1), the calculation formula of each element value in the mask is as follows:
Figure SMS_2
wherein ,H(x,y) The coefficients of any point (x, y) in the mask;
then to H (x,y) Normalizing the calculated result, and if the result is in an integer form, normalizing according to the following formula:
Figure SMS_3
wherein ,
Figure SMS_4
is the inverse of the mask coefficient sum; h (-k,k) The value of the coefficient for the upper left corner of the mask;
if the result is in decimal form, then multiplication is not required
Figure SMS_5
The rest are kept consistent;
after the normalized mask matrix is obtained, convolution operation of the mask and the pixel point area of the image with the same size is performed:
Figure SMS_6
Figure SMS_7
Figure SMS_8
wherein I is an original image pixel matrix, H normal The method is characterized in that the method is Gaussian convolution kernel, convolution operation is performed, and I' is a pixel matrix of a new image obtained after the convolution operation is performed; (7) The formula is that the Gaussian smoothing filter operation is completed, and FIG. 4 (a) is a gray level image and an image after Gaussian smoothing filter processing;
then calculating the gradient amplitude and direction of the new image after smoothing, and convolving with the input image by utilizing a Sobel horizontal operator and a vertical operator to obtain a horizontal gradient component d x And a vertical gradient component d y
Figure SMS_9
Figure SMS_10
d x =f(x,y)*Sobel x (x,y)
d y =f(x,y)*Sobel y (x,y) (8)
The magnitude M (x, y) of the image gradient is calculated as:
M(x,y)=|d x (x,y)|+|d y (x,y)| (9)
the azimuth angle is the angle between the gradient direction of the image and the x axis:
Figure SMS_11
finally, non-maximum suppression of the amplitude is performed along the gradient direction:
the horizontal edge, i.e. the gradient direction is vertical:
α M ∈[0,22.5)∪(-22.5,0]∪(157.5,180]∪[-180,-157.5) (11)
135 ° edge, i.e. gradient direction is 45 °:
α M ∈[22.5,67.5)∪[-157.5,-112.5) (12)
vertical edges, i.e. gradient direction is horizontal:
α M ∈[67.5,112.5]∪[-112.5,-67.5] (13)
45 ° edge, i.e. gradient direction is 135 °:
α M ∈(112.5,157.5]∪[-67.5,-22.5] (14)
at each point, the domain center (x, y) (actual position of mask center on image) is compared with two pixels along its corresponding gradient direction, if the center pixel is the maximum value, then it is preserved, otherwise the center is set to 0, fig. 4 (b) is the image after Canny edge extraction;
step 1.1.3. Hough straight line detection is carried out to determine a rotation compensation angle: assuming that the distance between the straight line and the origin is s, the polar angle is θ, and each point on the straight line satisfies:
s=x*cosθ+y*sinθ (15)
from this, the length of any one straight line segment can be calculated
Figure SMS_12
Taking L i Maximum value of (3): l (L) MAX =max{L 1 ,...,L i ,..}, fig. 4 (c) is the detection of the longest straight line segment in the image;
will L i =L MAX Theta corresponding to time i Taking a negative value as the angle of rotation compensation of the original image, the image tilt correction is thereby completed, as shown in fig. 4 (d);
step 1.2, the image size is standardized, the image size after rotation compensation is unified to be 30 multiplied by 30, and the subsequent unified processing is convenient; there are three main methods of changing the size of the image: nearest neighbor interpolation, bilinear interpolation, bicubic interpolation;
taking bilinear interpolation method as an example, the method has small calculated amount and higher output image quality:
let 5 pixel points in original image: q (Q) 00 (coordinates (h) 0 ,w 0 ))、Q 01 (coordinates (h) 0 ,w 1 ))、Q 10 (coordinates (h) 1 ,w 0)) and Q11 (coordinates (h) 1 ,w 1 ) Point P (coordinates: (h, w)) is the projection of the pixels of the target image on the original image;
for each pixel point of the target graph, find its four most relevant points on the original graph (i.e., the closest point, satisfy: w 1 -w 0 =1,h 1 -h 0 =1) and its pixel value is obtained by interpolation calculation, specifically calculated as follows:
f(P)≈(1-u)×(1-v)×f(Q 00 )+(1-u)×v×f(Q 01 ) +u×(1-v)×f(Q 10 )+u×v×f(Q 11 ) (16)
wherein u, v and Q (Q) 00 Related to the P) coordinates (u=h-h 0 ,v=w-w 0 ) FIG. 5 is a view of an image after tilt correction and an image after normalization of the image size;
and 2, judging the type of the traffic signal lamp by adopting an HSV color space method on the image obtained after the pretreatment in the step 1, wherein the specific process is as follows: the conversion formula for converting an RGB color image into an HSV color space is as follows,
Figure SMS_13
S=(max(R,G,B)-min(R,G,B))/max(R,G,B) (17)
V=max(R,G,B)
wherein H is hue, S is saturation, and V is brightness; red, yellow, green H parameter ranges: 180. not less than H red ≥150and0≥H red ≥10,60≥H yellow ≥10,100≥H green And the parameter ranges of S and V are more than or equal to 70, and the parameter ranges of S and V are all satisfied: 255. s is greater than or equal to S low ,255≥V≥140,S low =int(average(S current_image )×1.3);
Counting the number SUM of pixel points in HSV color ranges respectively meeting red, yellow and green red 、SUM yellow 、 SUM green
The prior method is commonly used: setting a threshold t=10, if SUM red 、SUM yellow 、SUM green Only one value of the color number satisfies SUM not less than T, and the corresponding color is the judgment result of the traffic signal lamp; if at least one of the colors satisfies SUM not less than T, comparing the maximum value of the three colors, wherein the corresponding color is the judgment result of the traffic signal lamp.
In real life, however, the recognition result is inaccurate due to the difference in the selection of the H, S and V thresholds, and SUM is also present red 、SUM yellow 、SUM green The probability that SUM is more than or equal to T is not satisfied (namely, the type of traffic light cannot be identified); meanwhile, the color of a part of traffic lights in the real shot traffic light image may be changed significantly, and if the color judgment is based only, the judgment is wrong.
The invention provides a traffic signal lamp rapid and accurate identification method based on priori information, which comprises the following steps:
step 1, preprocessing traffic signal lamp images, including image inclination correction and image size standardization processing;
step 2, judging the type of the traffic signal lamp by adopting an HSV color space method for the image obtained after the pretreatment in the step 1;
step 3, detecting a main body area of the traffic signal lamp, and determining a main body boundary, wherein the specific process is as follows: screening all detected straight lines, setting an angle range to be met by the straight lines, and reserving horizontal and vertical straight lines in the angle range; for the horizontal straight lines, two horizontal straight lines closest to the horizontal central line of the signal lamp image are found to serve as the upper boundary and the lower boundary of the main body area of the traffic signal lamp; for the vertical straight lines, two vertical straight lines closest to the vertical center line are found to serve as the left and right boundaries of the main body area of the traffic signal lamp;
reserving the Hough straight line detection in the step 1.4 to obtain a horizontal straight line and a vertical straight line, wherein the polar angle theta of the straight line meets theta epsilon < -10,10 > U < 80,110 >, as shown in the figure 6 (a);
defining the upper left corner of the image as the origin, the horizontal right as the x-axis, and the vertical downward as the y-axis, assuming the horizontal centerline y=15 and the vertical centerline x=15 of the image, then y top ∈[0,14],y bottom ∈[15,29]The method comprises the steps of carrying out a first treatment on the surface of the Is provided with a horizontal straight line corresponding to the ordinate y i In y top Is taken from within the coordinate range of (1)
Figure SMS_14
If y i In y bottom Is taken from within the coordinate range of (1)
Figure SMS_15
And->
Figure SMS_16
Namely, the ordinate corresponding to the upper and lower boundaries of the main body area of the traffic signal lamp is taken, and the abscissa corresponding to the left and right boundaries of the main body area of the traffic signal lamp is obtained in the same way>
Figure SMS_17
And->
Figure SMS_18
Thus obtaining the redA rectangular area where the green body is located, as shown in fig. 6 (b);
and 4, trisecting the main body area in the step 3, summing the gray pixel values of each part obtained by the trisecting, wherein the summing mode is to sum the gray pixel values of the horizontal direction along the vertical direction of the image, and then judging the type of the traffic signal lamp according to the gray value results of the three parts, and the specific process is as follows:
because the structural characteristics of the traffic signal lamp are known, the gray pixel value summation of the traffic light main body area can be judged; according to the step 3, the upper left corner coordinates of the rectangular area where the traffic signal lamp main body is located are as follows:
Figure SMS_19
lower left corner coordinates: />
Figure SMS_20
Upper right corner coordinates->
Figure SMS_21
Lower right corner coordinates->
Figure SMS_22
As shown in fig. 7; defining the summation as summing the gray scale image pixel values along the y-axis direction and the x-axis direction, then for the y-axis in the image i Summing pixels in the x-axis direction, there are:
Figure SMS_23
wherein ,
Figure SMS_24
is the mid-point (x i ,y i ) The sum range of the gray pixel values in the x-axis direction is:
Figure SMS_25
the sum range of gray pixel values in the y-axis direction is: />
Figure SMS_26
According to the priori information that the green light is in the upper part, the yellow light is in the middle and the green light is in the lower part
Figure SMS_27
Trisection is carried out:
Figure SMS_28
Figure SMS_29
Figure SMS_30
the summation process is as follows:
Figure SMS_31
Figure SMS_32
Figure SMS_33
respectively obtaining gray value pixel sums of three summation intervals to make
Figure SMS_34
If->
Figure SMS_35
Namely, judging that the lamp is red; if->
Figure SMS_36
Namely judging that the lamp is a yellow lamp; if it is
Figure SMS_37
And judging as a green light.
Example 1
The method of the invention is used for processing 1484 traffic light data images, wherein 904 red traffic light pictures, 536 green traffic light pictures and 44 yellow traffic light pictures are acquired.
The data result diagram of the present embodiment for identifying traffic signal lamp type is shown in fig. 8. Wherein the summation result of the red light gray pixel values is intensively distributed in a vertical axis interval y red (4, 11) as shown in FIG. 8 (a); the result of the summation of the gray pixel values of the yellow lamps is intensively distributed in a vertical axis interval y yellow (12, 17) as shown in FIG. 8 (b); the green light gray pixel value summation result is intensively distributed in the vertical axis interval y green 18,25, as shown in FIG. 8 (c). In 1484 traffic light data images in total, the correct number of traffic signal lamp identification is 1458, the identification accuracy is 98.248%, and the average processing time of a single image is about 16.33ms;
the result shows that the identification method has high identification precision and high running speed, and can be used for real-time traffic signal lamp identification.
Comparative example 1
Only the HSV color space recognition method is adopted.
The same 1484 traffic light data images collected were processed, with 904 red traffic light pictures, 536 green traffic light pictures, 44 yellow traffic light pictures.
The correct number of identification is 1396, the accuracy is 94.070%, compared with 4.178%, and the average time for processing a single picture is about 13.87ms.
Comparative example 2
The traffic signal lamp identification is carried out by adopting the method of the invention, and the main body area detection of the signal lamp in the step 3 is not carried out. The gray image pixel value summation area is defined as the whole image, and the gray pixel value summation range in the x-axis direction is as follows: the sum range of gray pixel values in the y-axis direction is [0,29 ]: [0,29] the correct number is 1231, the accuracy is 82.951% by calculation and judgment according to the expression (19) and expression (20) in step 4, and the average processing time for a single picture is about 17.9 5ms (no region detection is performed, the image processing area is increased, and the processing time is increased) compared with 15.287%.
This is because, after the image is grayed out, the background portion is off-white, the signal lamp is off-white, and the gray pixel values of the two are close. Therefore, the main body area detection of the traffic signal lamp performed in the step 3 effectively ensures the high accuracy of identifying the traffic signal lamp by the gray pixel value summation method.
The invention adopts the traffic signal lamp identification method based on HSV color space to carry out preliminary screening on the traffic signal lamp types, and simultaneously further provides a method for summing gray pixel values of the main body area of the traffic signal lamp aiming at adverse factors such as color distortion and the like caused by weather, camera characteristics and the like in partial images, thereby effectively identifying the traffic signal lamp types, greatly reducing time cost and equipment cost and simultaneously ensuring high accuracy of the traffic signal lamp identification.
While the invention has been described in terms of specific embodiments, any feature disclosed in this specification may be replaced by alternative features serving the equivalent or similar purpose, unless expressly stated otherwise; all of the features disclosed, or all of the steps in a method or process, may be combined in any combination, except mutually exclusive features and/or steps.

Claims (7)

1. A rapid and accurate identification method of traffic signal lamps based on prior information is characterized in that the prior information is that the traffic signal lamps are all vertical in shape, and red lamps are in the middle of the upper lamps and yellow lamps and green lamps are in the lower positions;
the identification method comprises the following steps:
step 1, preprocessing traffic signal lamp images, including image inclination correction and image size standardization processing;
step 2, judging the type of the traffic signal lamp by adopting an HSV color space method on the image obtained after the pretreatment in the step 1, and if the traffic signal lamp can be judged, directly outputting a judging result; otherwise, entering a step 3;
step 3, detecting a main body area of the traffic signal lamp in the image obtained by preprocessing in the step 1, wherein the main body area comprises Canny edge detection, hough straight line detection and traffic signal lamp boundary determination; the specific process of boundary determination is as follows: screening all detected straight lines, setting an angle range to be met by the straight lines, and reserving horizontal and vertical straight lines in the angle range; aiming at the horizontal straight lines, taking two horizontal straight lines closest to the horizontal midline of the signal lamp image as the upper and lower boundaries of the main body area of the traffic signal lamp; regarding the vertical straight lines, taking two vertical straight lines closest to the vertical center line as the left and right boundaries of the main body area of the traffic signal lamp;
and 4, trisecting the main body area in the step 3 along the vertical direction, summing the gray pixel values of each part obtained by the trisecting, wherein the summing mode is to sum the gray pixel values of the horizontal direction along the vertical direction of the image, and then judging the type of the traffic signal lamp according to the gray value results of the three parts, and the specific process is as follows:
the upper left corner coordinate of the rectangular area where the traffic signal lamp main body is located:
Figure QLYQS_1
lower left corner coordinates:
Figure QLYQS_2
upper right corner coordinates->
Figure QLYQS_3
Lower right corner coordinates->
Figure QLYQS_4
Defining the summation as summing the gray scale image pixel values along the y-axis direction and the x-axis direction, then for the y-axis in the image i Summing pixels in the x-axis direction, there are:
Figure QLYQS_5
wherein ,
Figure QLYQS_6
in gray-scale imagesPoint (x) i ,y i ) The sum range of the gray pixel values in the x-axis direction is:
Figure QLYQS_7
the sum range of gray pixel values in the y-axis direction is: />
Figure QLYQS_8
According to the priori information that the green light is in the upper part, the yellow light is in the middle and the green light is in the lower part
Figure QLYQS_9
Trisection is carried out:
Figure QLYQS_10
Figure QLYQS_11
Figure QLYQS_12
the summation process is as follows:
Figure QLYQS_13
Figure QLYQS_14
/>
Figure QLYQS_15
respectively obtaining gray value pixel sums of three summation intervals to make
Figure QLYQS_16
If->
Figure QLYQS_17
Namely, judging that the lamp is red; if->
Figure QLYQS_18
Namely judging that the lamp is a yellow lamp; if it is
Figure QLYQS_19
And judging as a green light.
2. The method of claim 1, wherein the traffic signal image in step 1 is a localized area where a single traffic signal is located.
3. The recognition method according to claim 1, wherein the image tilt correction in step 1 includes four steps of RGB color image graying processing, canny edge detection, hough straight line detection, and straight line tilt angle compensation rotation.
4. The recognition method of claim 3, wherein the specific process of the straight line tilt angle compensation in the image tilt correction is: and selecting the inclination angle of the longest straight line in all the detected straight lines as a rotation compensation angle to realize image inclination correction.
5. The method of claim 1, wherein the image size normalization in step 1 employs nearest neighbor interpolation, bilinear interpolation, or bicubic interpolation.
6. The identification method as claimed in claim 1, wherein in the step 3, if the angle θ of the straight line satisfies θ∈ [ -10,10] u [80,110], the straight line is considered as a horizontal straight line or a vertical straight line.
7. The identification method as claimed in claim 1, wherein the specific process of judging the traffic signal lamp type by using the HSV color space method in the step 2 is as follows:
the conversion formula for converting an RGB color image into an HSV color space is as follows,
Figure QLYQS_20
S=(max(R,G,B)-min(R,G,B))/max(R,G,B)
V=max(R,G,B)
wherein H is hue, S is saturation, and V is brightness; red, yellow, green H parameter ranges: 180. not less than H red ≥150and 0≥H red ≥10,60≥H yellow ≥10,100≥H green And the parameter ranges of S and V are more than or equal to 70, and the parameter ranges of S and V are all satisfied: 255. s is greater than or equal to S low ,255≥V≥140,S low =int(average(S current_image )×1.3);
Counting the number SUM of pixel points in HSV color ranges respectively meeting red, yellow and green red 、SUM yellow 、SUM green The method comprises the steps of carrying out a first treatment on the surface of the Setting a threshold T, if SUM red 、SUM yellow 、SUM green Only one value of the color number satisfies SUM not less than T, and the corresponding color is the judgment result of the traffic signal lamp; if at least one of the three colors meets SUM not less than T, comparing the maximum value of the three colors, wherein the corresponding color is the judgment result of the traffic signal lamp.
CN202111419474.6A 2021-11-26 2021-11-26 Traffic signal lamp rapid and accurate identification method based on priori information Active CN114241438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111419474.6A CN114241438B (en) 2021-11-26 2021-11-26 Traffic signal lamp rapid and accurate identification method based on priori information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111419474.6A CN114241438B (en) 2021-11-26 2021-11-26 Traffic signal lamp rapid and accurate identification method based on priori information

Publications (2)

Publication Number Publication Date
CN114241438A CN114241438A (en) 2022-03-25
CN114241438B true CN114241438B (en) 2023-05-16

Family

ID=80751277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111419474.6A Active CN114241438B (en) 2021-11-26 2021-11-26 Traffic signal lamp rapid and accurate identification method based on priori information

Country Status (1)

Country Link
CN (1) CN114241438B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152785B (en) * 2023-04-24 2023-07-18 之江实验室 Traffic signal lamp detection method and system based on CBAM combined with HSB mode
CN117292360B (en) * 2023-11-24 2024-02-09 福思(杭州)智能科技有限公司 Traffic signal lamp identification method and device, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021378A (en) * 2014-06-07 2014-09-03 北京联合大学 Real-time traffic light recognition method based on space-time correlation and priori knowledge
CN106295605A (en) * 2016-08-18 2017-01-04 宁波傲视智绘光电科技有限公司 Traffic lights detection and recognition methods
CN107507142A (en) * 2017-08-11 2017-12-22 江苏航天大为科技股份有限公司 Signal lamp image processing method
KR20200101509A (en) * 2019-01-30 2020-08-28 (주)컨트롤웍스 Method and apparatus for detecting traffic light

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050827B (en) * 2014-06-06 2016-03-02 北京航空航天大学 A kind of traffic lights of view-based access control model detect recognition methods automatically
CN105160924B (en) * 2015-08-25 2017-10-17 公安部第三研究所 Intelligent signal lamp condition detection method and detecting system based on Video processing
CN105913041B (en) * 2016-04-27 2019-05-24 浙江工业大学 It is a kind of based on the signal lamp recognition methods demarcated in advance
CN106650641B (en) * 2016-12-05 2019-05-14 北京文安智能技术股份有限公司 A kind of traffic lights positioning identifying method, apparatus and system
CN106682597A (en) * 2016-12-14 2017-05-17 四川长虹电器股份有限公司 Method for identifying traffic lights
CN106909937B (en) * 2017-02-09 2020-05-19 北京汽车集团有限公司 Traffic signal lamp identification method, vehicle control method and device and vehicle
CN108108761B (en) * 2017-12-21 2020-05-01 西北工业大学 Rapid traffic signal lamp detection method based on deep feature learning
CN110210316B (en) * 2019-05-07 2022-08-12 南京理工大学 Traffic signal lamp digital identification method based on gray level image
US20210350152A1 (en) * 2020-05-11 2021-11-11 Toyota Research Institute, Inc. Structural object detector for hierarchical ontology for traffic light handling
CN112183427B (en) * 2020-10-10 2023-05-30 厦门理工学院 Quick extraction method for arrow-shaped traffic signal lamp candidate image area

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021378A (en) * 2014-06-07 2014-09-03 北京联合大学 Real-time traffic light recognition method based on space-time correlation and priori knowledge
CN106295605A (en) * 2016-08-18 2017-01-04 宁波傲视智绘光电科技有限公司 Traffic lights detection and recognition methods
CN107507142A (en) * 2017-08-11 2017-12-22 江苏航天大为科技股份有限公司 Signal lamp image processing method
KR20200101509A (en) * 2019-01-30 2020-08-28 (주)컨트롤웍스 Method and apparatus for detecting traffic light

Also Published As

Publication number Publication date
CN114241438A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN109886896B (en) Blue license plate segmentation and correction method
CN108596129B (en) Vehicle line-crossing detection method based on intelligent video analysis technology
CN109785316B (en) Method for detecting apparent defects of chip
CN107679520B (en) Lane line visual detection method suitable for complex conditions
CN109657632B (en) Lane line detection and identification method
CN110807355B (en) Pointer instrument detection and reading identification method based on mobile robot
CN107844750A (en) A kind of water surface panoramic picture target detection recognition methods
CN114241438B (en) Traffic signal lamp rapid and accurate identification method based on priori information
CN110450706B (en) Self-adaptive high beam control system and image processing algorithm
CN109785291A (en) A kind of lane line self-adapting detecting method
CN112819094A (en) Target detection and identification method based on structural similarity measurement
CN110569861B (en) Image matching positioning method based on point feature and contour feature fusion
CN111784655B (en) Underwater robot recycling and positioning method
CN110674812B (en) Civil license plate positioning and character segmentation method facing complex background
CN106875430B (en) Single moving target tracking method and device based on fixed form under dynamic background
CN109492525B (en) Method for measuring engineering parameters of base station antenna
CN111832388B (en) Method and system for detecting and identifying traffic sign in vehicle running
Ma et al. An all-weather lane detection system based on simulation interaction platform
CN112348018A (en) Digital display type instrument reading identification method based on inspection robot
CN115841633A (en) Power tower and power line associated correction power tower and power line detection method
Stević et al. Vision-based extrapolation of road lane lines in controlled conditions
CN111723805B (en) Method and related device for identifying foreground region of signal lamp
CN113989771A (en) Traffic signal lamp identification method based on digital image processing
CN113255455B (en) Monocular camera object identification and positioning method based on vector illumination influence removing algorithm
Rui Lane line detection technology based on machine vision

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