Highway construction anti-intrusion early warning method based on computer vision and related equipment

Through computer vision-based methods, the construction areas of highways are accurately identified, false alarms are reduced, construction efficiency is improved, and potential dangers are promptly warned of, which solves the problems of low accuracy in the identification of construction areas and high number of false alarms in the existing technology.

CN120220305APending Publication Date: 2025-06-27INNER MONGOLIA TRANSPORTATION GRP MENGTONG MAINTENANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510304956.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art cannot accurately identify the construction area during highway construction, resulting in frequent false alarms and affecting construction efficiency.

Method used

Using a computer vision-based method, the lane line is recognized by obtaining high-speed road images, and the trapezoidal area surrounded by lane lines is set as the area to prevent vehicle intrusion. The digital zoom and high-speed road recognition model are used for vehicle identification and tracking, and real-time distance measurement of perspective transformation algorithm is combined with the perspective transformation algorithm to conduct anti-break-in early warning.

Benefits of technology

It realizes accurate identification of the construction area of ​​highway roads, reduces the number of false alarms, improves the efficiency of construction personnel, and promptly warns of potential hazards to ensure the safety of the construction area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120220305A_ABST
    Figure CN120220305A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a highway construction anti-intrusion early warning method based on computer vision and related equipment. The method comprises the steps of firstly obtaining an expressway surface image, identifying lane lines and delimiting a trapezoidal vehicle intrusion prevention area; then, carrying out digital zooming on long-distance vehicles in the area, and obtaining vehicle identification frame parameters by using an expressway identification model; a vehicle representative point is determined by tracking an intruding vehicle and acquiring its ID. Then, perspective transformation is carried out on the vehicle intrusion prevention area, the distance between the intrusion vehicle and the construction area is measured in real time, and the distance is compared with a preset intrusion prevention threshold value; and according to the comparison result, highway construction anti-intrusion early warning is triggered. According to the method, the recognition accuracy of the highway construction area is effectively improved, the number of false alarms is remarkably reduced, and a powerful guarantee is provided for highway construction safety. Through application of the method and the related equipment, the intelligent level of highway construction management is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and specifically provides a method and related equipment for preventing intrusion and warning in highway construction based on computer vision. Background Art

[0002] With the continuous expansion of the highway network, the demand for road maintenance and construction has also increased. Given the high speed of vehicle travel on highways, ensuring the safety of construction personnel and equipment has become the top priority in road construction. Currently, the main protective measures adopted in road construction mostly rely on traditional road cones as warning signs, placed at the front end of the construction area to warn oncoming vehicles. In addition, technological advancements have introduced electronic road cones, which use radar technology to detect whether a vehicle has strayed into the construction area, thus providing a more intelligent warning function.

[0003] However, the existing technologies have obvious limitations. For example, the patent with the application number CN202210752497.7 proposes a device for preventing intrusion and warning in road construction, which combines an embedded radar processing unit and a state information remote sensing unit for vehicle detection. Although this warning device can provide a certain degree of warning for construction personnel, it fails to distinguish according to the construction area, resulting in the alarm device possibly sending unnecessary alarms to construction personnel even when the vehicle is driving in a non-construction lane, thereby affecting the construction efficiency.

[0004] Similarly, the patent with the application number CN202321738138.2 introduces a warning robot for preventing intrusion in the operation area, which is also equipped with a radar detection device to monitor the operation area. Although this robot is also equipped with a camera device, this camera is only used for monitoring purposes and does not perform identification and detection functions. Therefore, this device also faces the problem of being unable to accurately distinguish the construction area, easily leading to false alarms, and thus reducing the work efficiency of construction personnel.

[0005] In summary, although the existing road construction protection measures have made progress in terms of intelligence, they still have the deficiencies of being unable to accurately identify the construction area and being prone to false alarms, thus affecting the construction efficiency. Summary of the Invention

[0006] In order to overcome the defects existing in the above-mentioned prior art, the purpose of the present invention is to provide a method and related equipment for preventing intrusion and warning in highway construction based on computer vision, so as to solve the technical problems of low accuracy in identifying the construction area and a large number of false alarms in the prior art on high-speed roads.

[0007] The present invention is realized through the following technical solutions: In the first aspect, the present invention provides a method for preventing intrusion and warning in highway construction based on computer vision, including: Acquire a highway road surface image, perform lane line recognition on the acquired highway road surface image, and obtain a trapezoidal area surrounded by the area where the lane line is located as a vehicle intrusion prevention area according to the recognition result; Digitally zoom the image of a long-distance vehicle in the vehicle intrusion prevention area, and input the digitally zoomed image into the trained highway recognition model to obtain vehicle recognition frame parameters; track the vehicle that intrudes into the vehicle intrusion prevention area according to the vehicle recognition frame parameters and obtain the vehicle ID, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters; The vehicle intrusion prevention area is transformed in perspective, and the distance from the vehicle that enters the vehicle intrusion prevention area to the highway construction is measured in real time to obtain the real-time distance. The real-time distance is compared with the set anti-intrusion threshold, and a highway construction anti-intrusion warning is issued based on the comparison result.

[0008] Preferably, in the step of acquiring a highway road image, performing lane line recognition on the acquired highway road image, and obtaining a trapezoidal area surrounded by the area where the lane line is located as the vehicle intrusion prevention area according to the recognition result, the specific process is as follows: The acquired highway road image is transmitted to the computer processor for lane line recognition to obtain the left lane line and right lane line ; Get the endpoint coordinates based on the lane lines on the left and right sides , and , , and then extend the lane lines on both sides to the top of the highway road image and intersect at , ,get , , , are the coordinates of the four vertices of the circumscribed trapezoid; From a vertex of the circumscribed trapezoid, four pixel points are obtained in a clockwise direction. , , as well as ; Record the coordinates of these four pixels in the image respectively , , , ; The coordinates of the four pixels are respectively enclosed into a trapezoidal area as an area to prevent vehicle intrusion.

[0009] Furthermore, the image of the long-distance vehicle in the vehicle intrusion prevention area is digitally zoomed, and the specific process is as follows: According to the four vertices of the area to prevent vehicle intrusion , , , , halve the ordinates of the two lower vertices and to obtain and . The coordinates are respectively and ; According to , , , , four pixel points form a trapezoidal region. Read the pixel values of the adjacent four coordinates in the trapezoidal region, which are respectively , , , ; According to , , , , calculate the pixel value of the coordinate after bilinear interpolation for digital zoom.

[0010] Preferably, the training process of the highway recognition model is as follows: S1. According to the highway recognition scenario, collect a highway vehicle image dataset with similar perspectives and distances to this scenario; S2. Label the vehicle image dataset to obtain a labeled file in YOLO format and input it into the YOLOv5 network; S3. Set the initial parameters, the number of training epochs epochs, the initial learning rate ilr, the upper and lower limits of the learning rate min_lr, max_lr, and calculate the learning rate for each training epoch; S4. Use the learning rate for the forward propagation and parameter update of the model. Halve the learning rate lower limit min_lr every 5 training epochs and recalculate the learning rate for the current training epoch; S5. Repeat S3 - S4 until all training epochs are completed to obtain a trained highway recognition model.

[0011] Preferably, in the step of tracking the vehicle that intrudes into the vehicle intrusion prevention area and obtaining the ID of the vehicle according to the vehicle recognition frame parameters, the vehicle recognition frame parameters include the width of the vehicle recognition frame, the length and the center point coordinates , the confidence level Conf, and the detection box category Class; The specific process of obtaining the ID of the vehicle is as follows: For the class Class, confidence Conf, and center point coordinates of the vehicle recognition frames in two consecutive frames obtained by the highway recognition model Compare them to find the same vehicle recognition frames in the two frames, and extract their feature vectors; Perform feature matching on the feature vectors, and assign a unique ID to each successfully matched vehicle recognition frame as the vehicle representative point.

[0012] Preferably, in the step of performing perspective transformation on the area where vehicle intrusion is prevented, the specific process is as follows: According to the perspective of the camera on the vehicle And the observation plane Calculate the parameters of the perspective transformation ; According to the parameters of the perspective transformation And the four vertices of the anti-intrusion area 、 、 、 Obtain a system of equations, and solve the system of equations to obtain the transformation matrix γ of the perspective transformation; According to the transformation matrix γ, perform perspective transformation on each point ([[]] , ) in the anti-intrusion area, and calculate the transformed coordinate values; Connect the transformed coordinate values according to the relationship before the perspective transformation to obtain the top view of the highway vehicle.

[0013] Furthermore, in the step of obtaining the real-time distance by performing real-time ranging on the distance from the vehicle that intrudes into the area where vehicle intrusion is prevented to the highway construction, obtain the pixel distance from the vehicle representative point to the center point of the bottom edge of the three-times digital zoom image through the top view of the highway vehicle, calculate the pixel distance of a lane line according to the top view, and calculate the real-time distance according to the pixel distance.

[0014] Preferably, in the step of comparing the real-time distance with the set anti-intrusion threshold and performing anti-intrusion warning for highway construction according to the comparison result, the specific comparison process is as follows: If the real-time distance is less than the set anti-intrusion threshold, the anti-intrusion alarm device starts to work, gives a departure alarm to the intruding vehicle, and reminds the construction personnel to quickly evacuate to the safe area; Otherwise, the vehicle can drive normally without warning it.

[0015] Second aspect, the present invention also provides a highway construction anti-intrusion warning system based on computer vision, including: The vehicle intrusion area recognition module is used to obtain a highway road image, perform lane line recognition on the obtained highway road image, and obtain a trapezoidal area surrounded by the area where the lane line is located as a vehicle intrusion prevention area according to the recognition result; The model processing tracking module is used to digitally zoom the image of a long-distance vehicle in the vehicle intrusion prevention area, and input the digitally zoomed image into the trained highway recognition model to obtain vehicle recognition frame parameters; track the vehicle that intrudes into the vehicle intrusion prevention area according to the vehicle recognition frame parameters and obtain the vehicle ID, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters; The regional anti-intrusion warning module is used to perform perspective transformation on the vehicle intrusion prevention area, measure the distance from the vehicle that intrudes into the vehicle intrusion prevention area to the highway construction in real time to obtain the real-time distance, compare the real-time distance with the set anti-intrusion threshold, and issue a highway construction anti-intrusion warning based on the comparison result.

[0016] In a third aspect, the present invention also provides a mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the highway construction anti-intrusion warning method based on computer vision as described above are implemented.

[0017] Compared with the prior art, the present invention has the following beneficial technical effects: The present invention provides a computer vision-based highway construction anti-intrusion warning method, which obtains highway road surface images and performs lane line recognition, and sets a trapezoidal area surrounded by lane lines as an area to prevent vehicle intrusion. Compared with traditional radar detection, this method can more realistically and accurately reflect the location information of the vehicle. By digitally zooming the long-distance vehicle image and inputting it into the trained highway recognition model, the vehicle can be accurately identified and its location parameters can be obtained, reducing the construction interference caused by radar false alarms and improving the efficiency of construction personnel. The perspective transformation algorithm is used to calculate the actual distance between the vehicle in the anti-intrusion area and the construction personnel. This real-time distance measurement function can timely discover and warn of potential dangerous situations. By comparing the real-time distance with the set anti-intrusion threshold, once the vehicle breaks into the dangerous area, the system can immediately issue a warning to the construction personnel, thereby effectively avoiding the occurrence of traffic accidents and ensuring the safety of the construction area.

[0018] Furthermore, the present invention digitally zooms in on the vehicle in the picture taken by the camera and then identifies whether the vehicle is located in the anti-intrusion area. Compared with radar detection, it can more realistically reflect the vehicle location information, reduce the number of false alarms, and thus improve the efficiency of construction workers.

[0019] Furthermore, the present invention utilizes a perspective transformation algorithm to calculate the distance between the vehicles and construction workers in the anti-intrusion area, and gives early warnings to the construction workers in a timely manner to avoid traffic accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flowchart of a method for preventing intrusion and giving early warnings during highway construction based on computer vision according to an embodiment of the present invention; Figure 2 is a block diagram of the implementation process of a method for preventing intrusion and giving early warnings during highway construction based on computer vision according to an embodiment of the present invention; Figure 3 is a schematic diagram of preventing vehicle intrusion into an area according to an embodiment of the present invention; Figure 4 is a schematic structural diagram of a system for preventing intrusion and giving early warnings during highway construction based on computer vision according to an embodiment of the present invention; In the figure: 1. Vehicle intrusion area recognition module; 2. Model processing and tracking module; 3. Area anti-intrusion warning module. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0022] The purpose of the present invention is to provide a method and related equipment for preventing intrusion and giving early warnings during highway construction based on computer vision, so as to solve the technical problems of low recognition accuracy and many false alarms in the construction area on the highway in the prior art.

[0023] The present invention will be further described in detail below with reference to the accompanying drawings: Embodiment 1 Refer to Figure 1 and Figure 2 , in an embodiment of the present invention, a method for preventing intrusion and giving early warnings during highway construction based on computer vision is provided, including: Step 1, obtain a highway pavement image, perform lane line recognition on the obtained highway pavement image, and obtain a trapezoidal area surrounded by the area where the lane lines are located as the area for preventing vehicle intrusion according to the recognition result; Specifically, in the step of obtaining a highway pavement image, performing lane line recognition on the obtained highway pavement image, and obtaining a trapezoidal area surrounded by the area where the lane lines are located as the area for preventing vehicle intrusion, the specific process is as follows: The acquired highway road image is transmitted to the computer processor for lane line recognition to obtain the left lane line and right lane line ; Get the endpoint coordinates based on the lane lines on the left and right sides , and , , and then extend the lane lines on both sides to the top of the highway road image and intersect at , ,get , , , are the coordinates of the four vertices of the circumscribed trapezoid; From a vertex of the circumscribed trapezoid, four pixel points are obtained in a clockwise direction. , , as well as ; Record the coordinates of these four pixels in the image respectively , , , ; The coordinates of the four pixels are enclosed into a trapezoidal area as the area to prevent vehicle intrusion, such as Figure 3 shown.

[0024] Step 2: digitally zoom the long-distance vehicle image in the vehicle intrusion prevention area, and input the digitally zoomed image into the trained highway recognition model to obtain vehicle recognition frame parameters; track the vehicle that intrudes into the vehicle intrusion prevention area according to the vehicle recognition frame parameters and obtain the vehicle ID, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters; Specifically, the image of a long-distance vehicle in the vehicle intrusion prevention area is digitally zoomed, and the specific process is as follows: According to the four vertices of the area to prevent vehicle intrusion , , , , the two vertices below , Halving the ordinate gives , The coordinates of , ; according to , , , Four pixels form a trapezoidal area. The pixel values ​​of the four adjacent coordinates in the trapezoidal area are read as follows: , , , ; According to , , , calculate the coordinates of the pixel values Perform digital zoom on the pixel values after bilinear interpolation. The expression is as follows:

[0026] Among them, and are the interpolation weights in the horizontal and vertical directions respectively, and the calculation method is: .

[0027] Specifically, the training process of the highway recognition model is as follows: S1. According to the highway recognition scenario, collect a highway vehicle image dataset with similar perspectives and distances to this scenario; S2. Label the vehicle image dataset to obtain a labeled file in YOLO format and input it into the YOLOv5 network; S3. Set the initial parameters, the number of training epochs epochs, the initial learning rate ilr, the upper and lower limits of the learning rate min_lr, max_lr, and calculate the learning rate for each training epoch. The expression is as follows: ; S4. Use the learning rate for forward propagation and parameter update of the model. Halve the learning rate lower limit min_lr every 5 training epochs and recalculate the learning rate for the current training epoch; S5. Repeat steps S3 - S4 until all training epochs are completed to obtain a trained highway recognition model.

[0028] Specifically, in the step of tracking the vehicle that intrudes into the vehicle intrusion prevention area according to the vehicle recognition frame parameters and obtaining the ID of the vehicle, the vehicle recognition frame parameters include the width 、length and the center point coordinates 、confidence Conf and the detection box category Class; The specific process of obtaining the ID of the vehicle is as follows: Compare the category Class, confidence Conf and the center point coordinates of the vehicle recognition frames of two consecutive frames recognized by the highway recognition model, find the same vehicle recognition frames in the two frames, and extract their feature vectors; Perform feature matching on the feature vectors, and assign a unique ID to each successfully matched vehicle recognition box as the vehicle representative point.

[0029] Step 3: Perform perspective transformation on the vehicle intrusion prevention area, perform real-time ranging on the distance from the vehicle that intrudes into the vehicle intrusion prevention area to the highway construction to obtain the real-time distance, compare the real-time distance with the set intrusion prevention threshold, and perform highway construction intrusion prevention early warning according to the comparison result.

[0030] Specifically, in the step of performing perspective transformation on the vehicle intrusion prevention area, the specific process is as follows: According to the perspective of the camera on the vehicle and the observation plane Calculate the parameters of the perspective transformation , and the expression is as follows: ; According to the parameters of the perspective transformation and the four vertices of the intrusion prevention area , , , Obtain a system of equations, and the expression is as follows: ; Solve the system of equations to obtain the transformation matrix γ of the perspective transformation, and the expression is as follows: ; According to the transformation matrix γ, perform perspective transformation on each point ([[]] , ) in the intrusion prevention area, calculate the transformed coordinate values, and the expression is as follows: ; Connect the transformed coordinate values according to the relationship before the perspective transformation to obtain the top view of the high-speed vehicle.

[0031] Among them, in the step of performing real-time ranging on the distance from the vehicle that intrudes into the vehicle intrusion prevention area to the highway construction to obtain the real-time distance, obtain the pixel distance from the vehicle representative point to the center point of the bottom edge of the three-fold digital zoom image through the top view of the high-speed vehicle, calculate the pixel distance of a lane line according to the top view, and calculate the real-time distance according to the pixel distance.

[0032] Among them, the vehicle representative point includes the width , length and the center point coordinates , and the calculation formula is as follows: ; ; Among them, the calculation formula for the pixel distance of a lane line is as follows: ; Among them, is the upper end point of the lane line, is the lower end point of the lane line; The real-time distance D is calculated based on the pixel distance, and the calculation formula is as follows:

[0033] Among them, is the distance from the bottom of the screen to the camera, and 9 is the actual distance of a lane line on the highway.

[0034] In this embodiment, the setting range of the anti-intrusion threshold T is as follows: ,

[0035] Among them, , are respectively the minimum and maximum values of the driving speed of the high-speed vehicle, is the reaction time of the construction personnel; The anti-intrusion threshold T is determined according to the anti-intrusion threshold range and the maximum distance ω that the camera can shoot.

[0036] In this embodiment, when comparing the real-time distance with the set anti-intrusion threshold and performing the steps of anti-intrusion warning for highway construction according to the comparison result, the specific comparison process is as follows: If the real-time distance is less than the set anti-intrusion threshold, the anti-intrusion alarm device starts to work, gives a departure alarm to the intruding vehicle, and reminds the construction personnel to quickly evacuate to a safe area; Otherwise, the vehicle can drive normally without warning it.

[0037] A highway construction anti-intrusion warning method based on computer vision provided in this embodiment can be further illustrated by the following test results: 1. Test conditions The hardware platform for the simulation experiment of the present invention is: the processor is an Intel i7-10870H CPU with a main frequency of 2.21 GHz, the graphics card is an RTX2080Ti, and the memory is 16 GB.

[0038] The software platform for the simulation experiment of the present invention is: Windows 10 operating system and Pycharm 2023.

[0039] 2. Test content and results: Simulation 1: Use the recognition model in the present invention to test the original image, and obtain the recognition box, category, and confidence level of the vehicle.

[0040] Simulation 2: Use the digital zoom method in the present invention to test the original image, and then perform YOLO recognition on the digitally zoomed image.

[0041] For vehicles that cannot be recognized, they can be recognized after digital zooming.

[0042] Simulation 3: Use the method of the present invention to perform simulation tests on the original images captured by the camera.

[0043] The distance from the vehicle to the camera shooting position is 96.77m, the actual real distance is 100m, and the error is 3.23%. This shows that this embodiment can accurately measure the distance between the intruding vehicle and the construction workers within the allowable error.

[0044] In summary, a highway construction anti-intrusion warning method based on computer vision provided by this embodiment obtains highway surface images and performs lane line recognition, and sets a trapezoidal area surrounded by lane lines as the area to prevent vehicle intrusion. Compared with traditional radar detection, this method can more realistically and accurately reflect the position information of vehicles. By digitally zooming in on the vehicle images at a long distance and inputting them into the trained highway recognition model, the vehicle can be accurately recognized and its position parameters can be obtained, reducing construction interference caused by radar false alarms and improving the efficiency of construction workers. Using the perspective transformation algorithm, the actual distance between the vehicle in the anti-intrusion area and the construction workers is calculated. This real-time ranging function can timely detect and warn of potential dangerous situations. By comparing the real-time distance with the set anti-intrusion threshold, once a vehicle intrudes into the dangerous area, the system can immediately issue a warning to the construction workers, thus effectively avoiding traffic accidents and ensuring the safety of the construction area.

[0045] Embodiment 2 According to Figure 4 As shown, the present invention also provides a highway construction anti-intrusion warning system based on computer vision, including: Vehicle intrusion area recognition module 1, which is used to obtain highway surface images, perform lane line recognition on the obtained highway surface images, and obtain a trapezoidal area surrounded by the lane line area as the area to prevent vehicle intrusion according to the recognition result; Model processing and tracking module 2, which is used to digitally zoom in on the vehicle images at a long distance in the area to prevent vehicle intrusion, and input the digitally zoomed image into the trained highway recognition model to obtain vehicle recognition box parameters; track the vehicle that intrudes into the area to prevent vehicle intrusion according to the vehicle recognition box parameters and obtain the ID of the vehicle, and determine the vehicle representative point of the vehicle according to the vehicle recognition box parameters; The area anti-intrusion warning module 3 is used to perform perspective transformation on the area where vehicle intrusion is prevented, perform real-time ranging on the distance from the vehicle intruding into the area where vehicle intrusion is prevented to the highway construction to obtain a real-time distance, compare the real-time distance with the set anti-intrusion threshold, and perform highway construction anti-intrusion warning according to the comparison result.

[0046] Embodiment 3 The present invention also provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, such as a highway construction anti-intrusion warning program based on computer vision.

[0047] When the processor executes the computer program, the steps of the above-mentioned highway construction anti-intrusion warning method based on computer vision are implemented, for example: Obtain a highway pavement image, perform lane line recognition on the obtained highway pavement image, and obtain a trapezoidal area surrounded by the area where the lane lines are located as the area where vehicle intrusion is prevented according to the recognition result; Perform digital zoom on the vehicle image at a long distance in the area where vehicle intrusion is prevented, and input the digitally zoomed image into a trained highway recognition model to obtain vehicle recognition frame parameters; track the vehicle intruding into the area where vehicle intrusion is prevented according to the vehicle recognition frame parameters, obtain the ID of the vehicle, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters; Perform perspective transformation on the area where vehicle intrusion is prevented, perform real-time ranging on the distance from the vehicle intruding into the area where vehicle intrusion is prevented to the highway construction to obtain a real-time distance, compare the real-time distance with the set anti-intrusion threshold, and perform highway construction anti-intrusion warning according to the comparison result.

[0048] Alternatively, when the processor executes the computer program, the functions of each module in the above system are implemented, for example: The vehicle intrusion area recognition module 1 is used to obtain a highway pavement image, perform lane line recognition on the obtained highway pavement image, and obtain a trapezoidal area surrounded by the area where the lane lines are located as the area where vehicle intrusion is prevented according to the recognition result; The model processing and tracking module 2 is used to perform digital zoom on the vehicle image at a long distance in the area where vehicle intrusion is prevented, and input the digitally zoomed image into a trained highway recognition model to obtain vehicle recognition frame parameters; track the vehicle intruding into the area where vehicle intrusion is prevented according to the vehicle recognition frame parameters, obtain the ID of the vehicle, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters; The area intrusion prevention warning module 3 is used to perform perspective transformation on the area where vehicle intrusion is prevented, perform real-time ranging on the distance from the vehicle intruding into the area where vehicle intrusion is prevented to the highway construction to obtain the real-time distance, compare the real-time distance with the set intrusion prevention threshold, and perform highway construction intrusion prevention warning according to the comparison result.

[0049] Exemplarily, the computer program can be divided into one or more modules / units. The one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the mobile terminal.

[0050] For example, the computer program can be divided into a vehicle intrusion area recognition module 1, an industry model processing and tracking module 2, and an area intrusion prevention warning module 3; The specific functions of each module are as follows: The vehicle intrusion area recognition module 1 is used to obtain the highway surface image, perform lane line recognition on the obtained highway surface image, and obtain the trapezoidal area surrounded by the area where the lane lines are located as the area where vehicle intrusion is prevented according to the recognition result. The model processing and tracking module 2 is used to perform digital zoom on the vehicle image at a long distance in the area where vehicle intrusion is prevented, input the digitally zoomed image into the trained highway recognition model to obtain the vehicle recognition frame parameters; track the vehicle intruding into the area where vehicle intrusion is prevented according to the vehicle recognition frame parameters and obtain the ID of the vehicle, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters. The area intrusion prevention warning module 3 is used to perform perspective transformation on the area where vehicle intrusion is prevented, perform real-time ranging on the distance from the vehicle intruding into the area where vehicle intrusion is prevented to the highway construction to obtain the real-time distance, compare the real-time distance with the set intrusion prevention threshold, and perform highway construction intrusion prevention warning according to the comparison result.

[0051] The mobile terminal can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The mobile terminal may include, but is not limited to, a processor and a memory.

[0052] The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the mobile terminal and connects various parts of the entire mobile terminal through various interfaces and circuits.

[0053] The memory can be used to store the computer programs and / or modules. The processor realizes various functions of the mobile terminal by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory.

[0054] The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0055] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific implementation manners of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A computer vision-based highway construction anti-intrusion warning method, characterized in that: include: Acquire a highway road surface image, perform lane line recognition on the acquired highway road surface image, and obtain a trapezoidal area surrounded by the area where the lane line is located as a vehicle intrusion prevention area according to the recognition result; Digitally zoom the image of a long-distance vehicle in the vehicle intrusion prevention area, and input the digitally zoomed image into the trained highway recognition model to obtain vehicle recognition frame parameters; track the vehicle that intrudes into the vehicle intrusion prevention area according to the vehicle recognition frame parameters and obtain the vehicle ID, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters; The vehicle intrusion prevention area is transformed in perspective, and the distance from the vehicle that enters the vehicle intrusion prevention area to the highway construction is measured in real time to obtain the real-time distance. The real-time distance is compared with the set anti-intrusion threshold, and a highway construction anti-intrusion warning is issued based on the comparison result.

2. The method for preventing intrusion during highway construction based on computer vision according to claim 1, characterized in that: In the step of acquiring a highway road image, performing lane line recognition on the acquired highway road image, and obtaining a trapezoidal area surrounded by the area where the lane line is located as a vehicle intrusion prevention area according to the recognition result, the specific process is as follows: The acquired highway road image is transmitted to the computer processor for lane line recognition to obtain the left lane line and right lane line ; Get the endpoint coordinates based on the lane lines on the left and right sides , and , , and then extend the lane lines on both sides to the top of the highway road image and intersect at , ,get , , , are the coordinates of the four vertices of the circumscribed trapezoid; From a vertex of the circumscribed trapezoid, four pixel points are obtained in a clockwise direction. , , as well as ; Record the coordinates of these four pixels in the image respectively , , , ; The coordinates of the four pixel points are respectively enclosed into a trapezoidal area as an area to prevent vehicle intrusion.

3. The method for preventing intrusion during highway construction based on computer vision according to claim 2 is characterized in that: The specific process of digitally zooming the image of a long-distance vehicle in the vehicle intrusion prevention area is as follows: According to the four vertices of the area to prevent vehicle intrusion , , , , the two vertices below , Halving the ordinate gives , The coordinates of , ; according to , , , Four pixels form a trapezoidal area. The pixel values ​​of the four adjacent coordinates in the trapezoidal area are read as follows: , , , ; according to , , , Calculate the pixel coordinates The pixel values ​​are digitally zoomed after bilinear interpolation.

4. The method for preventing intrusion during highway construction based on computer vision according to claim 1, characterized in that: The training process of the highway recognition model is as follows: S1, based on the highway recognition scene, collect a highway vehicle image dataset with a similar viewing angle and distance to the scene; S2, annotate the vehicle image dataset, obtain the annotation file in YOLO format, and input it into the YOLOv5 network; S3, set the initial parameters, training cycle epochs, initial learning rate ilr, learning rate upper and lower limits min_lr, max_lr, and calculate the learning rate for each training cycle; S4, use the learning rate to perform forward propagation and parameter update of the model, halve the learning rate lower limit min_lr every 5 training cycles, and recalculate the learning rate of the current training cycle; S5, repeat S3-S4 until all training cycles are completed to obtain a trained highway recognition model.

5. The computer vision-based highway construction anti-intrusion warning method according to claim 1, characterized in that: In the step of tracking the vehicle that has entered the vehicle intrusion prevention area according to the vehicle identification frame parameters and obtaining the vehicle ID, the vehicle identification frame parameters include the vehicle identification frame width ,length And the center point coordinates , confidence Conf and detection box category Class; The specific process of obtaining the vehicle's ID is as follows: The category Class, confidence Conf and center point coordinates of the two consecutive frames of vehicle recognition frames obtained by the highway recognition model Compare and find the same vehicle recognition frames in the two frames and extract their feature vectors; Feature matching is performed on the feature vectors, and a unique ID is assigned to each successfully matched vehicle identification box as a vehicle representative point.

6. The method for preventing intrusion during highway construction based on computer vision according to claim 1, characterized in that: In the step of performing perspective transformation on the area to prevent vehicle intrusion, the specific process is as follows: Based on the camera's view of the vehicle and the viewing plane Calculate the parameters of perspective change ; According to the parameters of perspective transformation And the four vertices of the anti-intrusion area , , , Get the system of equations, solve the system of equations to get the transformation matrix γ of the perspective transformation; According to the transformation matrix γ, each point in the anti-intrusion area ( , ) performs perspective transformation and calculates the transformed coordinate values; The converted coordinate values ​​are connected according to the relationship before perspective transformation to obtain a top view of the high-speed vehicle.

7. The method for preventing intrusion during highway construction based on computer vision according to claim 6, characterized in that: In the step of measuring the distance from the vehicle that has entered the vehicle intrusion prevention area to the highway construction to obtain the real-time distance, the pixel distance from the vehicle representative point to the center point of the bottom edge of the triple digital zoom image is obtained through the overhead view of the high-speed vehicle, and the pixel distance of a lane line is calculated based on the overhead view, and the real-time distance is obtained based on the pixel distance calculation.

8. The method for preventing intrusion during highway construction based on computer vision according to claim 1, characterized in that: In the step of comparing the real-time distance with the set anti-intrusion threshold and performing the anti-intrusion warning for highway construction according to the comparison result, the specific comparison process is as follows: If the real-time distance is less than the set anti-intrusion threshold, the anti-intrusion alarm device starts to work, alerts the intruding vehicle to leave, and reminds the construction workers to evacuate to a safe area quickly; Otherwise, the vehicle can run normally without any warning.

9. A highway construction anti-intrusion warning system based on computer vision, characterized in that: include: The vehicle intrusion area recognition module is used to obtain a highway road image, perform lane line recognition on the obtained highway road image, and obtain a trapezoidal area surrounded by the area where the lane line is located as a vehicle intrusion prevention area according to the recognition result; The model processing tracking module is used to digitally zoom the image of a long-distance vehicle in the vehicle intrusion prevention area, and input the digitally zoomed image into the trained highway recognition model to obtain vehicle recognition frame parameters; track the vehicle that intrudes into the vehicle intrusion prevention area according to the vehicle recognition frame parameters and obtain the vehicle ID, and determine the vehicle representative point of the vehicle according to the vehicle recognition frame parameters; The regional anti-intrusion warning module is used to perform perspective transformation on the vehicle intrusion prevention area, measure the distance from the vehicle that intrudes into the vehicle intrusion prevention area to the highway construction in real time to obtain the real-time distance, compare the real-time distance with the set anti-intrusion threshold, and issue a highway construction anti-intrusion warning based on the comparison result.

10. A mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the highway construction anti-intrusion warning method based on computer vision as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Anti-intrusion early warning device for road construction

    CN114922111A

  • Operation area anti-intrusion early warning robot

    CN219504781U