Lane line processing method, device and equipment in tunnel and storage medium
By utilizing lane line parameter correction and light strip and arch structure feature judgment in the tunnel, the problem of unstable lane line detection under backlight conditions at the tunnel entrance was solved, and the vehicle's lateral stability and safety were improved.
Patent Information
- Application Number
- CN202511176739.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-10-17
AI Technical Summary
Under backlight conditions in tunnels and at tunnel entrances, existing technologies are unable to effectively detect and correct lane lines on both sides, resulting in unstable lateral control of the vehicle and posing a safety hazard.
By determining whether the vehicle is in a tunnel and using the locked lane line parameters of the previous frame combined with the real-time detected parameters, the lane lines are weightedly corrected, especially the heading angle, lane line curvature, and curvature change rate. The vehicle position is determined by combining the light strip and arch structure features to achieve corrections to the lane lines on both sides.
It improves the lateral stability and safety of the vehicle in backlight conditions at the tunnel entrance, reduces the probability of lateral deviation of the vehicle, and improves driving safety.
Smart Images

Figure CN120792812A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent driving, and in particular to a lane line processing method, device and equipment in a tunnel and a storage medium. BACKGROUND
[0002] In a vehicle combination assisted driving system, lane line detection is a key link to realize lateral control. Especially in a highway scene, when the vehicle enters a tunnel or exits the tunnel, due to the complex light conditions inside the tunnel and the backlight problem when exiting the tunnel, the lane line detection quality will decrease significantly, resulting in unstable vehicle lateral control, even deviation, and seriously affecting driving safety.
[0003] In the prior art, when the road edge side lane line is lost in the tunnel, the road edge side lane line is fitted according to the coordinate information of the identified road edge target object. Defects: 1. Only the single side lane line inside the tunnel is post-processed, and when the vehicle is about to exit the tunnel, the quality of the lane line on both sides will decrease significantly due to backlight, and the single side processing effect is limited, which cannot effectively improve the overall lane line detection quality. 2. When the vehicle is about to exit the tunnel, the characteristics of the road edge target object at the tunnel entrance will change (such as the lighting structure at the tunnel exit, sudden change of ambient light, etc.), resulting in that the lane line far away cannot be effectively repaired by the existing method, and the negative influence of the special light conditions at the tunnel entrance and exit on the lane line detection cannot be solved. 3. Cannot be effectively corrected in time when the lane line quality decreases, resulting in that the vehicle is prone to lateral deviation during the exiting process of the tunnel, and there is a safety hazard.
[0004] Therefore, how to improve the lateral stability and safety of the vehicle in the backlight scene at the tunnel entrance is a technical problem to be solved at present. SUMMARY
[0005] The main purpose of the present application is to provide a lane line processing method, device, equipment and storage medium in a tunnel, which can correct the lane lines on both sides, reduce the probability of lateral deviation of the vehicle, and improve the safety of vehicle driving.
[0006] In a first aspect, the present application provides a lane line processing method in a tunnel, wherein the method comprises the following steps: determining whether the vehicle is in the tunnel; if the vehicle is in the tunnel and the lane line is detected to be abnormal, correcting the lane line based on the locked lane line parameters of the previous frame and the real-time detected lane line parameters.
[0007] In combination with the above first aspect, as an optional implementation manner, the locked lane line parameters of the previous frame and the real-time detected lane line parameters of the current frame are acquired, and the lane line parameters include a heading angle, a lane line curvature and a curvature change rate. The difference between the corresponding parameters of the lane line of the last locked frame and the lane line of the current frame is calculated to obtain the heading angle difference, the lane line curvature difference and the curvature change rate difference of the two respectively; The heading angle difference is combined with the heading angle of the current frame, the lane line curvature difference is combined with the lane line curvature of the current frame, and the curvature change rate difference is combined with the curvature change rate of the current frame in a weighted manner to correct the heading angle, the lane line curvature and the curvature change rate of the current frame respectively. The abnormal lane line is restored through the correction results.
[0008] In combination with the first aspect, as an optional implementation manner, the heading angle of the current frame is corrected according to the formula: + The lane line curvature of the current frame is corrected according to the formula: The curvature change rate of the current frame is corrected according to the formula: + The lane line curvature of the current frame is corrected according to the formula: The curvature change rate of the current frame is corrected according to the formula: + The curvature change rate of the current frame is corrected according to the formula:
[0009] In combination with the first aspect, as an optional implementation manner, the acquired vehicle front image is preprocessed to extract a region of interest (ROI); The lamp strip feature and the arch structure feature in the ROI region are recognized; Based on the lamp strip feature and the arch structure feature, it is judged whether the vehicle is in a tunnel.
[0010] In combination with the first aspect, as an optional implementation manner, the ROI is converted to an HSV color space to separate the brightness and color information. The white and yellow light information in the ROI is extracted by setting a threshold value, and a morphological closing operation is used to connect the broken light belt regions, to extract a connected region contour, and to screen a strip contour with a length-width ratio greater than a threshold value as an effective light belt, and to count the number of effective light belts as light_number; The ROI is converted into a gray image, an edge is detected using a Canny operator, and an edge feature in the image is extracted; A Hough transform is used to detect a long arc line for the detected edge, and an angle constraint is set to screen an arc line of an arch structure; and a length screening is performed on the detected arc line, and the number of effective arc lines is counted as arc_number; The number of the counted arc lines and the number of the light belts are set with weights to respectively calculate a score of the arch structure and a score of the light belt, so as to obtain a total score of the light belt and the arch structure; If the total score in the continuous frames of images is greater than a set threshold value, it is determined that the vehicle is in the tunnel, otherwise it is not in the tunnel.
[0011] In combination with the first aspect, as an optional implementation manner, the correction state is exited when the processing time exceeds a set time or the length of the detected lane line returns to normal.
[0012] In combination with the first aspect, as an optional implementation manner, a new container is created to store the left and right lane line parameters recognized in the last frame.
[0013] In the second aspect, the present application provides a lane line processing device in a tunnel, which comprises: A judgment module is configured to judge whether a vehicle is in a tunnel; A processing module is configured to, if the vehicle is in the tunnel and the lane line is abnormal, perform a correction processing on the lane line based on the lane line parameters of the last frame locked in advance and the lane line parameters detected in real time.
[0014] In combination with the second aspect, as an optional implementation manner, In the third aspect, the present application further provides an electronic device, which comprises a processor and a memory having computer readable instructions stored thereon, wherein the computer readable instructions are executed by the processor to implement the method of any one of the first aspect.
[0015] In the fourth aspect, the present application further provides a computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions are executed by a computer to implement the method of any one of the first aspect.
[0016] The application provides a lane line processing method, device and equipment in a tunnel and a storage medium. The method comprises the steps of: determining whether a vehicle is in a tunnel; if the vehicle is in the tunnel and lane line anomaly is detected, correcting the lane line based on the lane line parameters of the previous frame that are locked in advance and the lane line parameters detected in real time.
[0017] It should be understood that the general description above and the following detailed description are only exemplary and do not limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0019] Figure 1 A flow chart of a lane line processing method in a tunnel provided in an embodiment of the application; Figure 2 A schematic diagram of a lane line processing device in a tunnel provided in an embodiment of the application; Figure 3 A schematic diagram of an electronic device provided in an embodiment of the application; Figure 4 A schematic diagram of a computer-readable program medium provided in an embodiment of the application. DETAILED DESCRIPTION
[0020] The exemplary embodiments will be described in detail herein below with reference to the drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0021] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0022] The embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0023] Reference Figure 1 , Figure 1 A flow chart of a lane line processing method in a tunnel provided in an embodiment of the application is shown in FIG. 1. As shown in FIG. 1, the method comprises the steps of: Figure 1 Step S101: judging whether the vehicle is in a tunnel.
[0024] Specifically, the acquired vehicle front image is preprocessed to extract a region of interest (ROI); The lamp strip feature and the arch structure feature in the ROI region are recognized. Based on the lamp strip feature and the arch structure feature, it is judged whether the vehicle is in a tunnel.
[0025] Specifically, the ROI is converted to an HSV color space to separate the brightness and color information. The white and yellow light information in the ROI is extracted by setting a threshold, and morphological closing operation is adopted to connect the broken lamp strip regions, extract the connected region contour, filter out the strip contour with a length-width ratio greater than a threshold as the effective lamp strip, and count the number of effective lamp strips as light_number. The ROI is converted to a gray image, and the Canny operator is adopted for edge detection to extract the edge features in the image. The detected edges are subjected to Hough transform to detect long arc lines, and angle constraints are set to filter out the arc lines of the arch structure; and the detected arc lines are subjected to length screening, and the number of effective arc lines is counted as arc_number. The number of the counted arc lines and the number of the lamp strips are set with weights to respectively calculate the arch structure score and the lamp strip score to obtain the total score of the lamp strip and the arch structure. If it is judged that the total score in the continuous number of frames of images is greater than a set threshold, it is judged that the vehicle is in a tunnel, otherwise it is not in a tunnel.
[0026] For the convenience of understanding and illustration, step 1: image preprocessing. The ROI (region of interest) is extracted, and the top 1 / 3 region of the image is taken as the ROI, which contains the lighting lamp strip features of the top of the tunnel and the arch structure features specific to the tunnel, avoiding the interference of other road information.
[0027] Step 2: arch structure detection. The ROI is converted to a gray image, first, the Canny operator is applied to the ROI for edge detection to extract the edge features in the image. Secondly, the detected edges are subjected to Hough transform to detect long arc lines, and the angle constraint is set to 165-175 degrees to filter out the arc lines similar to the arch structure of the tunnel. Finally, the detected arc lines are subjected to length screening, and the arc lines with a length greater than 100 pixels are retained, and the number of effective arc lines is counted as arc_number.
[0028] Step 3: Tunnel light belt detection. First, convert ROI to HSV color space, separate brightness and color information, and extract white and yellow light information in ROI by setting threshold H: 0-30, S: 0.2-1.0, V: 0.7-1.0. Second, use morphological closing operation to connect broken light belt regions, extract connected region contours, filter out strip contours with aspect ratio greater than 5:1 as effective light belts, and count the number of effective light belts as light_number.
[0029] Step 4: Determine whether the vehicle is in the tunnel. According to the above-mentioned arc number and light belt number, set the weight.
[0030] Arc structure score: arc_score = arc_number × 0.4 Light belt score: light_score = light_number × 0.6 Total score: total_score = arc_score + light_score If total_score>1.2 for 3 consecutive frames, it is considered that the vehicle is located in the tunnel.
[0031] Step S102: If the vehicle is in the tunnel and the lane line is abnormal, correct the lane line based on the previously locked lane line parameters of the last frame and the real-time detected lane line parameters.
[0032] Specifically, the locked lane line parameters of the last frame and the real-time detected lane line parameters of the current frame are obtained, and the lane line parameters include: heading angle, lane line curvature and curvature change rate; The difference values of the corresponding parameters of the locked last frame lane line and the current frame lane line are calculated, and the heading angle difference, lane line curvature difference and curvature change rate difference of the two are obtained; The heading angle difference is combined with the heading angle of the current frame, the lane line curvature difference is combined with the lane line curvature of the current frame, and the curvature change rate difference is combined with the curvature change rate of the current frame in a weighted manner to correct the heading angle, lane line curvature and curvature change rate of the current frame, respectively. The abnormal lane line is restored through the correction results.
[0033] wherein, according to the formula: + The heading angle of the current frame is corrected, wherein, is the heading angle of the current frame, is the difference between the locked last frame heading angle and the current frame heading angle, for the correction coefficient; According to the formula: + The lane line curvature of the current frame is corrected, wherein is the lane line curvature of the current frame, is the difference between the locked lane line curvature of the previous frame and the lane line curvature of the current frame; According to the formula: + The curvature change rate of the current frame is corrected, wherein is the curvature change rate of the current frame, is the difference between the locked curvature change rate of the previous frame and the curvature change rate of the current frame.
[0034] For the convenience of understanding, the lane line post-processing is illustrated. The lane line equation is as follows:
[0035] If the vehicle is in a tunnel, a new container is created to store the left and right lane lines of the previous frame. Since the vehicle will cause the lane line to be shortened due to backlight at the tunnel entrance, if the length of the lane line on both sides of the current frame is less than 45m, the stored lane line parameters of the previous frame will be locked. The lane line parameters include: heading angle, indicating lane line curvature, indicating curvature change rate, wherein c0 in the lane line equation represents the distance from the current vehicle center to the lane line, c1 represents the heading angle, c2 represents the lane line curvature, and c3 represents the curvature change rate. Since the backlight causes the lane line to be shortened, the c0 value is not affected, and the c1, c2, and c3 values are greatly affected. Therefore, the lane line of the previous frame is used to correct these parameters. (That is, through the image captured by the front camera of the vehicle, the lamp belt and the arch structure inside the tunnel are identified to determine whether the vehicle is inside the tunnel. Secondly, a new container is created to store the lane line information identified in the previous frame. When the vehicle exits the tunnel, if the length of the front lane line detection is too short, the lane line information of the previous frame is locked, and the locked parameters are combined with the real-time detection results for weighted correction) The difference delta_c1 between the c1 value of the right lane line and the locked lane line is calculated.
[0036] delta_c1 = lock_right_lane.c1 - right_lane.c1 Wherein lock_right_lane.c1 is the c1 value of the right locked lane line, right_lane.c1 is the c1 value of the current frame.
[0037] Similarly, the difference value of c2 and c3 is calculated, i.e. the difference value between the previous frame c2 value and the current frame c2 value, and the difference value between the previous frame c3 value and the current frame c3 value, to obtain delta_c2 and delta_c3.
[0038] The current frame value is corrected according to the difference value.
[0039] right_lane.c1 (corrected value) = right_lane.c1 (current value) + delta_c1 *coefficient; right_lane.c2 (corrected value) = right_lane.c2 (current value) + delta_c2 *coefficient; right_lane.c3 (corrected value) = right_lane.c3 (current value) + delta_c3 *coefficient; coefficient = 0.1.
[0040] The left lane line is corrected in the same way.
[0041] The corrected c1, c2 and c3 are substituted into the lane line equation to obtain the repaired lane line.
[0042] In an embodiment, the correction state is exited when the processing time exceeds the set time or the length of the detected lane line returns to normal.
[0043] It can be understood that the correction state is exited when the processing time exceeds 3s or the length of the detected lane line returns (more than 50m).
[0044] In summary, the application determines whether the vehicle is in the tunnel according to the characteristics of the lamp strip and the arch structure in the tunnel, and does not rely on map information, thereby improving the real-time performance of lane line post-processing. When the vehicle is at the tunnel entrance and the lane line quality is poor due to backlight, the quality good lane line is locked to correct the real-time detected lane line, thereby reducing the probability of lateral deviation of the vehicle and improving the safety of vehicle driving.
[0045] For the problems of too short lane line and distortion of the far end of the lane line detected by the vehicle at the tunnel entrance, the application can correct the lane lines on both sides, thereby reducing the probability of lateral deviation of the vehicle and improving the safety of vehicle driving.
[0046] The visual-based detection method of the vehicle in the tunnel does not rely on GPS map information, thereby improving the real-time performance of lane line post-processing.
[0047] Reference Figure 2 , Figure 2A schematic diagram of a lane line processing device in a tunnel is shown, and the device is provided by the application, as shown in Figure 2 The device comprises: A judging module 201, configured to judge whether a vehicle is in a tunnel.
[0048] A processing module 202, configured to, if the vehicle is in the tunnel and an abnormal lane line is detected, correct the lane line based on a last frame lane line parameter locked in advance and a real-time detected lane line parameter.
[0049] Further, in a possible implementation, the processing module is further configured to acquire the last frame lane line parameter locked and the current frame lane line parameter detected in real time, and the lane line parameter comprises a heading angle, a lane line curvature and a curvature change rate; calculate a difference value of each corresponding parameter of the last frame lane line locked and the current frame lane line, to obtain a heading angle difference value, a lane line curvature difference value and a curvature change rate difference value of the two respectively; combine the heading angle difference value and the heading angle of the current frame, combine the lane line curvature difference value and the lane line curvature of the current frame, and combine the curvature change rate difference value and the curvature change rate of the current frame in a weighted manner, to correct the heading angle, the lane line curvature and the curvature change rate of the current frame respectively; restore the abnormal lane line through the correction results.
[0050] Further, in a possible implementation, the processing module is further configured to correct the heading angle of the current frame according to a formula: + wherein, is the heading angle of the current frame, is a difference value of the last frame heading angle locked and the heading angle of the current frame, is a correction coefficient. correct the lane line curvature of the current frame according to a formula: + wherein, is the lane line curvature of the current frame, is a difference value of the last frame lane line curvature locked and the lane line curvature of the current frame; correct the curvature change rate of the current frame according to a formula: + wherein, is the curvature change rate of the current frame, is a difference value of the last frame curvature change rate locked and the curvature change rate of the current frame.
[0051] Furthermore, in a possible implementation, the judgment module is further configured to pre-process the acquired vehicle forward image to extract a region of interest (ROI); Identifying light strip features and arch structure features within the ROI area; Based on the light strip characteristics and the arch structure characteristics, it is determined whether the vehicle is in a tunnel.
[0052] Furthermore, in a possible implementation, the processing module is further configured to convert the ROI into an HSV color space to separate brightness and color information; The white and yellow light information in the ROI is extracted by setting a threshold. The morphological closing operation is then used to connect the broken light strip areas and extract the contours of the connected areas. The strip contours with an aspect ratio greater than the threshold are selected as valid light strips, and the number of valid light strips is counted and recorded as light_number. Convert the ROI into a grayscale image, use the Canny operator to perform edge detection, and extract edge features in the image; Use Hough transform to detect long arcs on the detected edges, set angle constraints, and filter out arcs of arched structures; filter the length of the detected arcs, and count the number of valid arcs as arc_number; Set weights for the number of arcs and light strips counted to calculate the arch structure score and light strip score respectively, to obtain the total score of the light strip and arch structure; If it is determined that the total score in a plurality of consecutive frames of images is greater than a set threshold, it is determined that the vehicle is in a tunnel; otherwise, it is not in a tunnel.
[0053] Furthermore, in a possible implementation manner, the processing module is further configured to exit the correction state when the processing time exceeds a set time or the length of the lane line detected during processing returns to normal.
[0054] Furthermore, in a possible implementation, the processing module is further configured to create a new container to store the left and right lane line parameters identified in the previous frame.
[0055] Refer to the following Figure 3 The electronic device 300 according to this embodiment of the present invention will be described. Figure 3 The electronic device 300 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0056] like Figure 3As shown, the electronic device 300 is in the form of a general-purpose computing device. The components of electronic device 300 can include, but are not limited to, the at least one processing unit 310, the at least one storage unit 320, and a bus 330 that connects the various system components, including the storage unit 320 and the processing unit 310.
[0057] The storage unit stores program code that can be executed by the processing unit 310 such that the processing unit 310 performs the steps described in the above "Embodiment Methods" section of this specification in accordance with the various exemplary embodiments of this application.
[0058] The storage unit 320 can include a readable medium in the form of volatile storage such as random access memory (RAM) 321 and / or cache memory 322, and can further include non-volatile storage such as read only memory (ROM) 323.
[0059] The storage unit 320 can also include a program / utility 324 having a set of program modules 325, including but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which can give rise to an implementation of a network environment in each of these examples or some combination thereof.
[0060] The bus 330 can represent one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics bus (e.g., an Accelerated Graphics Port, or AGP bus) and a local bus using any of a variety of bus architectures.
[0061] The electronic device 300 can also communicate with one or more external devices such as a keyboard or a pointing device, through an I / O interface 350. Additionally, the electronic device 300 can communicate with one or more devices that enable a user to interact with the electronic device 300, and / or one or more devices that enable the electronic device 300 to communicate with one or more other computing devices. Such communication can be via an I / O interface 350. The electronic device 300 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or the Internet) through a network adapter 360. As depicted, the network adapter 360 is communicatively coupled to the other components of the electronic device 300 through the bus 330. It should be appreciated that the electronic device 300 can be a part of a larger system, and that communication can occur via the network adapter 360 in conjunction with the other components of the larger system. It should also be appreciated that the electronic device 300 can employ any suitable type of interface to communicate with the other components of the system, including a wireless interface, a wired interface, and / or a combination of interfaces.
[0062] Those skilled in the art can easily understand from the above description of the embodiments that the example embodiments described herein can be implemented by software or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, or the like) or on a network, and includes a number of instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the methods according to the embodiments of the present disclosure.
[0063] According to the solutions of the present disclosure, a computer readable storage medium is also provided, which stores the program product capable of implementing the above-mentioned methods of the present disclosure. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing a terminal device to execute the steps according to various example embodiments of the present disclosure described in the above-mentioned “example method” section of the present disclosure when the program product is run on the terminal device.
[0064] Reference Figure 4 As shown, the program product 400 for implementing the above-mentioned methods according to the embodiments of the present disclosure is described, which can adopt a portable compact disc read-only memory (CD-ROM) and includes program codes, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in the present document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device, or apparatus.
[0065] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0066] A computer readable signal medium can include a propagated data signal with computer executable code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that can be involved in
[0067] The code can be transmitted in any form, including, but not limited to, radio frequency, optical, electrical, or the like, or any suitable combination thereof.
[0068] The code can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider. In some embodiments, electronic circuitry including, for example, programmable logic circuitry, application specific circuitry, or field programmable gate array (FPGA) circuitry, includes the code.
[0069] Moreover, the above-described diagrams merely illustrate a possible implementation of a method according to an example embodiment of the present application and are not intended to limit the present application. It is readily understood that the processes depicted in the diagrams are not meant to imply a fixed order of timing, and that the processes can be performed in any suitable order, including synchronously or asynchronously in multiple modules.
[0070] The detailed description set forth above is not intended as an exhaustive description of all aspects of the application. While certain aspects of the application have been set forth in the detailed description above, modifications to the detailed description can be made without departing from the spirit and scope of the application. Accordingly, the application is not limited to that precisely as shown and described. Rather, the scope of the application is that which is set forth by the appended claims, and any equivalents thereof.
[0071] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions specified in the flowchart block or blocks. Figure 1 The flowchart and / or block diagram in the variation of the present application illustrate the architecture, functionality, and operation of possible implementations of apparatuses (systems), methods and computer program products according to the present application. In this regard, each flowchart block and / or block in the flowcharts and / or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable Figure 1 instructions for implementing the specified logical functions. The flowchart and / or block diagram in the variation of the present application can also represent a method according to the present application. The flowchart and / or block diagram in the variation of the present application can be stored in any suitable location, memory or transmission medium irrespective of the particular technology and / or methodology for storage and / or transmission.
Claims
1. A method for processing lane lines in a tunnel, characterized in that: include: Determine whether the vehicle is in a tunnel; If the vehicle is in a tunnel and the detected lane line is abnormal, the lane line is corrected based on the lane line parameters of the previous frame locked in advance and the lane line parameters detected in real time.
2. The method according to claim 1, characterized in that The lane line correction process based on the previously locked lane line parameters of the previous frame and the lane line parameters detected in real time includes: Obtain the locked lane line parameters of the previous frame and the lane line parameters of the current frame detected in real time, wherein the lane line parameters include: heading angle, lane line curvature, and curvature change rate; Calculate the difference between the corresponding parameters of the locked lane line in the previous frame and the lane line in the current frame, and obtain the heading angle difference, lane line curvature difference, and curvature change rate difference between the two; Combining the heading angle difference with the heading angle of the current frame, combining the lane curvature difference with the lane curvature of the current frame, and combining the curvature change rate difference with the curvature change rate of the current frame in a weighted manner to respectively correct the heading angle, lane curvature, and curvature change rate of the current frame; The abnormal lane lines are restored through the correction results.
3. The method according to claim 2, characterized in that The heading angle, lane curvature and curvature change rate of the current frame are corrected as follows: According to the formula: + , correct the heading angle of the current frame, where is the heading angle of the current frame, The difference between the locked heading angle of the previous frame and the heading angle of the current frame, is the correction factor; According to the formula: + , correct the lane curvature of the current frame, where is the lane curvature of the current frame, The difference between the curvature of the lane line in the previous frame and the curvature of the lane line in the current frame; According to the formula: + , correct the curvature change rate of the current frame, where is the curvature change rate of the current frame, The difference between the curvature change rate of the previous frame and the curvature change rate of the current frame.
4. The method according to claim 1, wherein The determining whether the vehicle is in a tunnel includes: Preprocess the acquired vehicle forward image to extract the region of interest (ROI); Identifying light strip features and arch structure features within the ROI area; Based on the light strip characteristics and the arch structure characteristics, it is determined whether the vehicle is in a tunnel.
5. The method according to claim 4, characterized in that include: Convert ROI to HSV color space to separate brightness and color information; The white and yellow light information in the ROI is extracted by setting a threshold. The morphological closing operation is then used to connect the broken light strip areas and extract the contours of the connected areas. The strip contours with an aspect ratio greater than the threshold are selected as valid light strips, and the number of valid light strips is counted and recorded as light_number. Convert the ROI into a grayscale image, use the Canny operator to perform edge detection, and extract edge features in the image; Use Hough transform to detect long arcs on the detected edges, set angle constraints, and filter out arcs of arched structures; filter the length of the detected arcs, and count the number of valid arcs as arc_number; Set weights for the number of arcs and light strips counted to calculate the arch structure score and light strip score respectively, to obtain the total score of the light strip and arch structure; If it is determined that the total score in a plurality of consecutive frames of images is greater than a set threshold, it is determined that the vehicle is in a tunnel; otherwise, it is not in a tunnel.
6. The method according to claim 1, characterized in that After the lane line is corrected, the following steps are included: When the processing time exceeds the set time or the length of the lane line detected during processing returns to normal, the correction state is exited.
7. The method according to claim 1, characterized in that After determining whether the vehicle is in a tunnel, the method includes: Create a new container to store the left and right lane line parameters identified in the previous frame.
8. A lane line processing device in a tunnel, characterized in that: include: A judgment module, which is used to judge whether the vehicle is in a tunnel; The processing module is used to correct the lane line based on the lane line parameters of the previous frame locked in advance and the lane line parameters detected in real time if the vehicle is in a tunnel and the lane line is detected to be abnormal.
9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer program instructions are stored therein, and when the computer program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 7.