Detection method for continuous opening of high beam

文档序号:1685666 发布日期:2020-01-03 浏览:28次 中文

阅读说明:本技术 一种远光灯持续开启的检测方法 (Detection method for continuous opening of high beam ) 是由 刘建 于 2019-09-30 设计创作,主要内容包括:本发明涉及一种检测方法,具体公开了一种远光灯持续开启的检测方法,其根据车辆灯光区域亮度均值与特征形状面积变化规律,判别车辆远光灯持续开启状态,包括以下具体步骤:步骤S10:获取车辆车灯区域;步骤S20:计算车灯区域亮度均值与特征形状面积;步骤S30:统计分析车辆灯光区域亮度均值与特征形状面积变化规律。本发明实施例开发成本低,操作简单,计算量小;能够适应多种车灯类型远光灯持续开启状态判别;在维持高检测率的同时,还拥有较高的处理速度。(The invention relates to a detection method, and particularly discloses a detection method for continuously opening a high beam, which judges the continuously opening state of the high beam according to the brightness mean value of a vehicle light area and the change rule of a characteristic shape area, and comprises the following specific steps: step S10, obtaining the area of the vehicle lamp; step S20: calculating the average value of the brightness of the vehicle lamp region and the area of the characteristic shape; step S30: and (4) carrying out statistical analysis on the brightness mean value of the vehicle light region and the change rule of the characteristic shape area. The embodiment of the invention has low development cost, simple operation and small calculated amount; the method can be suitable for judging the continuous opening state of the high beam of various vehicle lamp types; the method has high processing speed while maintaining high detection rate.)

1. A method for detecting the continuous opening of a high beam is characterized by comprising the following specific steps:

step S10, obtaining the area of the vehicle lamp;

step S20: calculating the average value of the brightness of the vehicle lamp region and the area of the characteristic shape;

step S30: and (4) carrying out statistical analysis on the brightness mean value of the vehicle light region and the change rule of the characteristic shape area.

2. The method for detecting the continuous turning on of the high beam according to claim 1, wherein the step of obtaining the area of the vehicle lamp comprises the following specific steps: step S101, monitoring an area; step S102: processing a threshold value; step S103: contour screening; step S104: and (5) extracting the car lamp.

3. The method for detecting the continuous on of the high beam according to claim 1 or 2, wherein the step S20 further comprises a step of obtaining an average gray-level value of the headlight area.

4. The method according to claim 3, wherein said step of calculating the average gray-level value of the headlight area comprises: traversing the pixels in the whole car light area, accumulating and solving the gray value sum of all the pixels, wherein the average gray value is the quotient of the gray value sum and the number of the pixels, and the calculation formula is as follows:

Figure DEST_PATH_IMAGE002

wherein n is the total number of pixel points of the image.

5. The method for detecting the continuous on-state of the high beam according to claim 4, wherein the specific steps of statistically analyzing the change rule of the brightness mean value and the characteristic shape area of the vehicle light area comprise the following steps: step S301: tracking a target; step S302: judging whether the vehicle light changes or not; step S303: and calculating the continuous opening time of the high beam.

6. The method for detecting the continuous on-state of the high beam according to claim 4, wherein in the step S301, the target tracking comprises the following specific steps: when the vehicle is detected to turn on the high beam, the vehicle is tracked in real time, the mean value of the light brightness of the vehicle and the area of the characteristic shape are calculated in real time, and the vehicle lamp area is stopped being tracked until the vehicle exits the camera monitoring area or is continuously detected for N seconds.

7. The method of claim 6, wherein the determination of whether the vehicle light changes is determined by analyzing whether the difference between the mean value M2 and the characteristic shape area S2 of the vehicle light area calculated from the current video frame and the mean value M1 and the characteristic shape area S1 of the vehicle light area calculated from the previous frame exceeds the threshold values K1 and K2, and the calculation formula is as follows:

Figure DEST_PATH_IMAGE004

when R1 is not less than K1 and R2 is not less than K2, the vehicle light is judged to be switched from the high beam light to the low beam light;

when-R1 is more than or equal to K1 and-R2 is more than or equal to K2, judging that the vehicle light is switched from the dipped headlight to the high beam;

when R2 is 0 or less than the threshold K3, it is determined that the vehicle lamps have been turned off.

Technical Field

The invention relates to a detection method, in particular to a detection method for continuously starting a high beam.

Background

When overtaking at night, the far and near lights are used alternatively to remind the vehicle ahead. However, in the light alternation process, although the driver of the vehicle turns on the high beam for a short time, the behavior is not illegal. In order to avoid disputes caused by the driver switching the dipped headlight rapidly, the high beam of the vehicle needs to be judged to be in a continuously-opened state.

The existing detection method for continuously opening the high beam mainly utilizes a target tracking technology to continuously detect the light state of the vehicle so as to judge whether the light state of the vehicle changes or not, and further accumulates to obtain the time for continuously opening the high beam by the vehicle.

At present, no study specially aiming at the judgment of the continuous opening state of the high beam is seen abroad, and domestic studies mainly exist in the form of invention patents. In 2018, Juhong et al, Zhejiang Anhui Intelligent science and technology Limited, put forward a method for judging the continuous on-state of a high beam based on a convolutional neural network, and the method obtains the vehicle lamp area in each frame of video image by setting proper exposure parameters; then arranging according to the time sequence to obtain a light track graph in the driving process of the vehicle; and finally, carrying out feature extraction and analysis on the light track graph by using a convolutional neural network to judge whether the vehicle high beam is continuously started or not. 2018, 8-month cinnabar and the like provide a method for judging whether a vehicle high beam is continuously turned on or not by analyzing the change rule of the dazzling degree of the vehicle light by using a target tracking algorithm. The judgment of the dazzling degree of the vehicle light determines whether the vehicle turns on the high beam or not. However, these two methods still have certain limitations and cannot meet the practical requirements well.

The existing method for continuously starting the high beam based on the convolutional neural network has complex judging and calculating process and poor real-time performance, and a target vehicle lamp area image needs to be continuously acquired to form a vehicle lamp track image, so that the vehicle lamp track image can be sent to the convolutional neural network for identification; if the RNN is to be trained quickly, a large amount of sample data needs to be collected and a large amount of computing resources are consumed. The method for judging whether the high beam of the vehicle is continuously turned on or not by analyzing the change rule of the dazzling degree of the light of the vehicle and judging whether the high beam of the vehicle is continuously turned on or not by utilizing a target tracking algorithm is optimized in terms of calculated amount, but the method for judging whether the high beam of the vehicle is the high beam or not by judging the dazzling degree of the light of the vehicle has certain limitation and cannot adapt to all types of the vehicle.

Disclosure of Invention

The invention aims to provide a vehicle high beam continuous start detection method which can adapt to different night environments and vehicle lamp types, has a simple detection algorithm and a small calculation amount and is combined with a high beam detection unit, so as to solve the problems in the background technology.

In order to achieve the purpose, the invention provides the following technical scheme:

a method for detecting the continuous opening of a high beam comprises the following steps of:

step S10, obtaining the area of the vehicle lamp;

step S20: calculating the average value of the brightness of the vehicle lamp region and the area of the characteristic shape;

step S30: and (4) carrying out statistical analysis on the brightness mean value of the vehicle light region and the change rule of the characteristic shape area.

As a further limitation of the technical solution of the embodiment of the present invention, the acquiring the vehicle lamp area includes the following specific steps:

step S101, monitoring an area;

step S102: processing a threshold value;

step S103: contour screening;

step S104: and (5) extracting the car lamp.

As a further limitation of the technical solution of the embodiment of the present invention, in step S20, the method further includes a step of obtaining an average gray-scale value of the vehicle lamp region, and specifically, the step of obtaining the average gray-scale value of the vehicle lamp region includes: traversing the pixels in the whole car light area, accumulating and solving the gray value sum of all the pixels, wherein the average gray value is the quotient of the gray value sum and the number of the pixels, and the calculation formula is as follows:

Figure 100002_DEST_PATH_IMAGE002

wherein n is the total number of pixel points of the image.

As a further limitation of the technical solution of the embodiment of the present invention, the specific steps of statistically analyzing the change rule of the average brightness value and the characteristic shape area of the vehicle light area include the following steps:

step S301: tracking a target; when the vehicle is detected to turn on the high beam, tracking the vehicle in real time, and calculating the mean value of the light brightness and the characteristic shape area of the vehicle in real time according to the method in the step S20 until the vehicle exits the camera monitoring area or stops tracking the vehicle lamp area after continuously detecting for N seconds;

step S302: judging whether the vehicle light changes or not;

step S303: and calculating the continuous opening time of the high beam.

As a further limitation of the technical solution of the embodiment of the present invention, the determination of whether the vehicle light changes is determined by analyzing whether a difference between the vehicle light area brightness mean value M2 and the characteristic shape area S2 calculated by the current video frame and the vehicle light area brightness mean value M1 and the characteristic shape area S1 calculated by the previous frame exceeds the threshold values K1 and K2, and a calculation formula thereof is as follows:

Figure 100002_DEST_PATH_IMAGE004

when R1 is not less than K1 and R2 is not less than K2, the vehicle light is judged to be switched from the high beam light to the low beam light;

when-R1 is more than or equal to K1 and-R2 is more than or equal to K2, judging that the vehicle light is switched from the dipped headlight to the high beam;

when R2 is 0 or less than the threshold K3, it is determined that the vehicle lamps have been turned off.

Compared with the prior art, the technical scheme of the invention has the beneficial effects that: the development cost is low, the operation is simple, and the calculated amount is small; the method can be suitable for judging the continuous opening state of the high beam of various vehicle lamp types; the method has high processing speed while maintaining high detection rate.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.

Fig. 1 is a schematic diagram of a processing result of acquiring a vehicle lamp area according to an embodiment of the present invention.

FIG. 2 is a graph illustrating the variation of the average brightness of the vehicle light area according to an embodiment of the present invention.

FIG. 3 is a vehicle lamp profile for two frames before and after the time when the vehicle lamp switches from high beam to low beam according to the embodiment of the present invention.

Detailed Description

In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

A method for detecting the continuous opening of a high beam comprises the following steps of:

step S10, obtaining the area of the vehicle lamp;

specifically, as shown in fig. 1, the acquiring a vehicle lamp area specifically includes the following steps:

step S101, monitoring an area; step S102: processing a threshold value; step S103: contour screening; step S104: and (5) extracting the car lamp.

Specifically, a remarkable characteristic of the night vehicle is that the brightness of a vehicle lamp area is extremely high, a high beam detection unit detects that a vehicle starts a high beam in a monitoring area, and a threshold value processing is immediately carried out on the monitoring area of the high beam detection unit of a video frame at the moment to segment a high-brightness white area;

the process adopts a color image segmentation method, converts a BGR color space into an HSV color space, and segments a white area of the car light from a background image by limiting the range of three components of HSV (0 < H <180, 0< S <30, 221< V < 255); then, denoising the white area, executing opening operation (firstly corrosion operation and then expansion operation), and separating the original fine white connected area;

then, profile screening is carried out, all white areas are traversed from top to bottom, small-area and long-strip-shaped (caused by ground reflection) areas are removed, and the white areas which are symmetrical left and right are reserved; finally, a white symmetrical region with the largest area is found out from all the white symmetrical regions, namely the target vehicle lamp region, and the processing result is shown in fig. 1.

Step S20: calculating the average value of the brightness of the vehicle lamp region and the area of the characteristic shape;

the image mean value reflects the brightness of the image, and the larger the mean value is, the larger the brightness of the image is, and the smaller the brightness of the image is. The average gray value of the car light area is obtained by a direct method of traversing the pixel points of the whole car light area, accumulating and obtaining the gray value sum of all the pixel points, wherein the average gray value is the quotient of the gray value sum and the number of the pixel points, and the calculation formula is as follows:

Figure DEST_PATH_IMAGE005

wherein n is the total number of pixel points of the image;

for the same vehicle, from the visual point of view, the high beam is brighter than the low beam, the corresponding lamp has a wider illumination angle (0 degree perpendicular to the ground), and the lamp outline area is larger than the low beam outline area. And obtaining the characteristic shape area of the vehicle lamp, extracting the lamp outline in the vehicle lamp area by the method in the step S10, and measuring the characteristic shape area of the vehicle lamp by using the number S of the pixels in the lamp outline.

Step S30: carrying out statistical analysis on the brightness mean value of the vehicle light region and the change rule of the characteristic shape area; the method specifically comprises the following steps:

step S301: tracking a target; when the vehicle is detected to turn on the high beam, the vehicle needs to be tracked in real time, and according to the method in step S20, the mean value of the vehicle light brightness and the characteristic shape area are calculated in real time, and the vehicle light area is not tracked until the vehicle exits the camera monitoring area or is continuously detected for N seconds.

Step S302: judging whether the vehicle light changes or not; when the vehicle is switched from the high beam to the low beam, not only the brightness of the vehicle lamp is sharply reduced, but also the area of the lamp area is sharply reduced.

FIG. 2 is a graph of the mean change in brightness of the vehicle light area within the front 150 video frames of the vehicle; fig. 3 shows the vehicle lamp profile of two frames before and after the time when the vehicle lamp is switched from high beam to low beam.

Whether the vehicle light changes or not is determined by analyzing whether the difference between the vehicle light area brightness mean value M2 and the characteristic shape area S2 calculated by the current video frame and the vehicle light area brightness mean value M1 and the characteristic shape area S1 calculated by the previous frame exceeds the threshold values K1 and K2, and the calculation formula is as follows:

when R1 is more than or equal to K1 and R2 is more than or equal to K2, the vehicle light can be switched from high beam to low beam; when-R1 is more than or equal to K1 and-R2 is more than or equal to K2, the vehicle light can be switched from the dipped headlight to the high beam; when R2 is 0 or less than some sufficiently small threshold K3, the vehicle lights may be considered to be off.

Step S303: calculating the continuous opening time of the high beam; and calculating the duration opening time of the high beam by taking the video frame corresponding to the moment when the high beam is opened by the target vehicle, which is detected by the high beam detection unit, as the first frame. According to the method in step S302, if the difference between | S1-S2| and | M1-M2| in consecutive n frames of video does not exceed the threshold, it can be determined that the target vehicle has continuously turned on the high beam for n/fps (video frame rate) seconds.

The technical scheme of the invention has the beneficial effects that: the development cost is low, the operation is simple, and the calculated amount is small; the method can be suitable for judging the continuous opening state of the high beam of various vehicle lamp types; the method has high processing speed while maintaining high detection rate.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于辅助钻具的性能参数的测试装置及测试方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!