Lane lighting method based on vehicle visual perception, storage medium and system
The road image is analyzed and the initial lighting angle is calculated through the vehicle visual perception system, and the headlight angle is adjusted according to the vehicle's lateral offset and speed in the lane, which solves the problem of lighting angle adjustment in curved scenes and improves driving safety.
Patent Information
- Application Number
- CN202510429629.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-04-08
AI Technical Summary
The prior art is difficult to accurately adjust the lighting angle of the headlights in curved scenes, making it difficult for the driver to see the curved boundary clearly at night, affecting driving safety.
The vehicle visual perception system analyzes the road image, recognizes the curve type and road curvature, calculates the initial lighting angle, and adjusts the angle according to the vehicle's lateral offset and speed in the lane to realize dynamic angle adjustment of the headlight.
The precise adjustment of the lighting angle of the headlights in curved scenes is achieved, which improves the driver's ability to see the curved boundary clearly at night, assists in judging the distance between the vehicle and the curved boundary, and improves driving safety.
Smart Images

Figure CN120191284A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle lighting, and in particular to a lane lighting method, a storage medium and a system based on vehicle vision perception. Background Art
[0002] Vision perception refers to capturing image or video data through a vision sensor (such as a camera) and using algorithms to process and analyze the data to identify, understand, and interpret information such as targets, objects, and environmental features in the scene. In the field of vehicle driving, vision perception is one of the key technologies in autonomous driving and assisted driving systems, and it mainly senses the scene in front of the vehicle through a camera installed in the middle of the vehicle's front windshield.
[0003] In traditional lane lighting solutions based on vehicle vision perception, it is usually adopted to determine the road type according to visual information and switch the lighting mode of the headlamp according to the road type. For example, in a patent of a headlamp lighting method, a headlamp lighting system and a computer storage medium with the publication number of CN116552369A, it obtains vehicle movement information and visual information of the road in front of the vehicle, judges the type of the road according to the vehicle movement information and the visual information, generates a target control instruction based on the type of the road, and switches the lighting mode of the headlamp according to the target control instruction, so that the lighting effect of the headlamp changes. However, this technical solution does not accurately adjust the lighting angle of the headlamp in a curved road scene, making it difficult for the driver to clearly see the boundary of the curve at night, resulting in the inability to judge the distance between the vehicle and the curve boundary and affecting driving safety.
[0004] In a patent of an adaptive curve auxiliary lighting method and device with the publication number of CN101879881A, although it can calculate the required irradiation angle of the headlamp according to the illumination range requirement of the vehicle, the calculated curve radius and the distance between the vehicle and the starting position of the curve, and control the movement of the actuator according to this angle to adjust the irradiation angle of the headlamp. However, due to the differences in driving habits of different drivers, when the driver is used to driving along the boundary of the curve, if this technical solution is still adopted, the same irradiation angle will be generated as when the driver is driving along the center line of the curve, which will make it difficult for the driver to judge the distance between the curve boundary and the vehicle at night. For example, for a vehicle driving along the center line of the curve, the distance from the vehicle to the curve boundary is relatively far, and only an irradiation angle that focuses more on the center of the curve is required. For a vehicle driving along the boundary of the curve, the distance from the vehicle to the curve boundary is relatively close. If the same irradiation angle is still adopted, it will make it difficult for the driver to clearly see the curve boundary at night, resulting in the inability to judge the distance between the vehicle and the curve boundary. Summary of the Invention
[0005] The present invention provides a lane lighting method, storage medium and system based on vehicle vision perception, so as to accurately adjust the lighting angle of the headlamp in a curved road scenario, facilitate the driver to clearly see the boundary of the curve at night, assist the driver in judging the distance between the vehicle and the curve boundary, and improve driving safety.
[0006] To solve the above problems, the present invention adopts the following technical solutions:
[0007] The present invention provides a lane lighting method based on vehicle vision perception, including:
[0008] Analyze the road image collected by the vehicle front view camera to obtain an analysis result, where the analysis result includes the lane type and road curvature in front of the vehicle;
[0009] When it is recognized that the lane type in front of the vehicle is a curve, determine the position of the center line of the curve entrance;
[0010] Calculate the initial lighting angle according to the road curvature and the current lighting angle of the headlamp;
[0011] Calculate the lateral offset of the vehicle in the lane according to the position of the center line and the real-time position of the vehicle;
[0012] Calculate the angle adjustment coefficient of the headlamp according to the lateral offset and the vehicle speed, and adjust the initial lighting angle according to the angle adjustment coefficient to obtain the target lighting angle;
[0013] Control the headlamp to illuminate according to the target lighting angle.
[0014] Preferably, the calculating the initial lighting angle according to the road curvature and the current lighting angle of the headlamp includes:
[0015]
[0016] where, θ2 is the initial lighting angle, θ1 is the current lighting angle of the headlamp, γ is the curvature adjustment coefficient, and R is the road curvature.
[0017] Preferably, the calculating the angle adjustment coefficient of the headlamp according to the lateral offset and the vehicle speed includes:
[0018]
[0019] where, is the angle adjustment coefficient of the headlamp, α is the weight coefficient of the lateral offset, indicating the influence degree of the lateral offset on the angle adjustment, β is the weight coefficient of the vehicle speed, indicating the influence degree of the vehicle speed on the angle adjustment, and d offsetis the lateral offset of the vehicle in the lane, and the v is the vehicle speed.
[0020] Further, after controlling the headlamp to illuminate according to the target illumination angle, it further includes:
[0021] Obtain the brightness distribution data of the area illuminated by the headlamp;
[0022] Calculate the average brightness according to the brightness distribution data, divide the average brightness by the difference between the maximum brightness and the minimum brightness, and obtain the original brightness uniformity of the illuminated area;
[0023] Calculate the first target weight coefficient according to the weight coefficient of the lateral offset, the original brightness uniformity and the target brightness uniformity, and adjust the weight coefficient of the lateral offset to the first target weight coefficient;
[0024] and / or
[0025] Calculate the area of the illuminated area according to the brightness distribution data, calculate the ratio of the area of the illuminated area to the area of the lane, and obtain the original coverage ratio of the illuminated area covering the lane;
[0026] Calculate the second target weight coefficient according to the weight coefficient of the vehicle speed, the original coverage ratio and the target coverage ratio, and adjust the weight coefficient of the vehicle speed to the second target weight coefficient.
[0027] Preferably, controlling the headlamp to illuminate according to the target illumination angle includes:
[0028] Adjust the current illumination brightness of the headlamp according to the vehicle speed to obtain the target illumination brightness, including the following formula:
[0029]
[0030] wherein, the B2 is the target illumination brightness, the B1 is the current illumination brightness of the headlamp, the δ is the vehicle speed adjustment coefficient, the v is the vehicle speed greater than the preset speed, and the v max is the maximum speed allowed on the current road;
[0031] Control the headlamp to illuminate according to the target illumination angle and the target illumination brightness.
[0032] Preferably, analyzing the road image collected by the vehicle front view camera to obtain the analysis result includes:
[0033] Convert the road image into a bird's-eye view according to the perspective transformation method;
[0034] Starting from the bottom of the bird's-eye view, use a sliding window to search for pixel points of the lane lines in the image, and find the initial position of the lane lines by statistical histogram. Search upward along the initial position of the lane lines to gradually determine the pixel area of the lane lines;
[0035] Perform polynomial fitting on the pixel points in the pixel area of the detected lane lines to obtain the equations of the left and right lane lines;
[0036] Calculate the road curvature of the lane lines according to the coefficients of the polynomial fitting;
[0037] Judge whether the lane type in front of the vehicle is a curve by comparing the road curvature and direction of the left and right lane lines;
[0038] When the curvatures of the left and right lane lines are greater than the preset curvature and the directions are the same, it is determined that the lane type in front of the vehicle is a curve.
[0039] Preferably, the calculating the road curvature of the lane lines according to the coefficients of the polynomial fitting includes:
[0040]
[0041] Wherein, the R is the road curvature, the A and C are the coefficients of the polynomial fitting, and the y is the ordinate of the pixel points on the lane line.
[0042] Furthermore, before converting the road image into a bird's-eye view according to the perspective transformation method, it further includes:
[0043] Convert the road image into a grayscale image containing only luminance information, and process the grayscale image using the Gaussian smoothing algorithm to reduce the noise in the image.
[0044] The present invention also provides a lane lighting system based on vehicle vision perception, including:
[0045] An analysis module for analyzing the road image collected by the vehicle front-view camera to obtain an analysis result, and the analysis result includes the lane type and road curvature in front of the vehicle;
[0046] A determination module for determining the position of the center line of the curve entrance when it is recognized that the lane type in front of the vehicle is a curve;
[0047] A first calculation module for calculating an initial lighting angle according to the road curvature and the current lighting angle of the headlight;
[0048] A second calculation module for calculating the lateral offset of the vehicle in the lane according to the position of the center line and the real-time position of the vehicle;
[0049] An adjustment module is configured to calculate an angle adjustment coefficient of the headlamp according to the lateral offset and the vehicle speed, and adjust the initial illumination angle according to the angle adjustment coefficient to obtain a target illumination angle;
[0050] A control module is configured to control the headlamp to illuminate according to the target illumination angle.
[0051] The present invention also provides a computer storage medium, in which a computer program is stored. When the computer program is executed by a processor, the lane lighting method based on vehicle vision perception described in any one of the above is implemented.
[0052] Compared with the prior art, the technical solution of the present invention has at least the following advantages:
[0053] A lane lighting method, storage medium and system based on vehicle vision perception provided by the present invention can more accurately understand the position and driving trend of the vehicle in the curve by determining the center line position of the curve entrance, providing a key reference point for lighting angle adjustment, ensuring that the headlamp can illuminate the curve boundary in advance, and improving driving safety; by combining the road curvature and the current illumination angle, the initial illumination angle is calculated, which also ensures that the headlamp can adjust the illumination direction according to the bending degree of the road when driving in the curve, avoiding insufficient illumination or over-illumination, and improving the adaptability and accuracy of the illumination effect; in addition, by calculating the lateral offset of the vehicle in the lane, combining the lateral offset and the vehicle speed, calculating the angle adjustment coefficient of the headlamp, and adjusting the target illumination angle according to the angle adjustment coefficient, it is possible to understand in real time whether the vehicle deviates from the lane center line, providing dynamic data support for lighting angle adjustment, ensuring that the headlamp can be dynamically adjusted according to the actual driving state of the vehicle, so as to accurately adjust the illumination angle of the headlamp in the curve scene, facilitating the driver to clearly see the curve boundary at night, assisting the driver to judge the distance between the vehicle and the curve boundary, and improving driving safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of an embodiment of a lane lighting method based on vehicle vision perception of the present invention;
[0055] Figure 2 It is an illumination effect diagram of the headlamp when the vehicle of the present invention travels along the center line of the curve;
[0056] Figure 3 It is an illumination effect diagram of the headlamp when the vehicle of the present invention deviates to the left from the center line of the curve;
[0057] Figure 4 It is a flowchart of another embodiment of a lane lighting method based on vehicle vision perception of the present invention;
[0058] Figure 5 This is a structural block diagram of an embodiment of a lane lighting system based on vehicle vision perception according to the present invention. Specific embodiments
[0059] 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 in conjunction with the accompanying drawings in the embodiments of the present invention.
[0060] In some processes described in the specification, claims and above-mentioned drawings of the present invention, there are multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order in which they appear herein or may be executed in parallel. The serial numbers of the operations, such as S11, S12, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions such as "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, nor do they limit that "first" and "second" are of different types.
[0061] Those of ordinary skill in the art can understand that unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "including" used in the specification of the present invention means that there are the described features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.
[0062] Those of ordinary skill in the art can understand that unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.
[0063] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions from beginning to end. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0064] Please refer to Figure 1 As shown, the present invention provides a lane lighting method based on vehicle vision perception, including the following steps:
[0065] S11. Analyze the road image collected by the vehicle front view camera to obtain an analysis result, where the analysis result includes the lane type and road curvature in front of the vehicle;
[0066] S12. When it is recognized that the lane type in front of the vehicle is a curve, determine the position of the center line of the curve entrance;
[0067] S13. Calculate the initial lighting angle according to the road curvature and the current lighting angle of the headlight;
[0068] S14. Calculate the lateral offset of the vehicle in the lane according to the position of the center line and the real-time position of the vehicle;
[0069] S15. Calculate the angle adjustment coefficient of the headlight according to the lateral offset and the vehicle speed, and adjust the initial lighting angle according to the angle adjustment coefficient to obtain the target lighting angle;
[0070] S16. Control the headlight to illuminate according to the target lighting angle.
[0071] This embodiment realizes the precise dynamic adjustment of the lighting angle of the vehicle headlight, significantly improving the safety and comfort of night driving. Specifically, the front view camera collects the road image in front of the vehicle at a certain frame rate (such as 30 frames per second) and ensures that the image resolution of the road image is high enough (such as 1280×720 pixels) to meet the image analysis requirements.
[0072] Among them, the vehicle front view camera is an important part of the vehicle vision perception system. It is installed at the front of the vehicle and is used to capture the image of the road in front of the vehicle in real time. This image can be used for various functions such as lane line detection, obstacle recognition, and traffic sign recognition. Preferably, the installation position of the front view camera can be at the top center behind the front windshield to provide a good view, cover the road in front of the vehicle, and not be directly affected by the external environment of the vehicle (such as rain and dust).
[0073] Perform preprocessing operations such as denoising (e.g., Gaussian filtering) and image enhancement (e.g., histogram equalization) on the collected road images to improve the image quality of the road images and highlight the lane line features. Among them, Gaussian filtering is used to smooth the image to reduce noise and details. Histogram equalization is used to enhance the contrast of the image, making the details of the image clearer. It redistributes the pixel values of the image to make the histogram of the image more uniform, thereby improving the overall contrast of the image.
[0074] This embodiment can analyze the preprocessed road images using a deep learning-based lane line detection algorithm to identify the position and shape of the lane lines. For example, a convolutional neural network (CNN) can be used to extract the image features of the road images, and the shape of the lane lines can be constrained by a loss function to ensure the continuity and smoothness of the detection results. Among them, the position of the lane lines can be represented by pixel coordinates, and the shape can be fitted with a quadratic polynomial. By analyzing the shape and distribution of the lane lines, the lane types (such as straight lanes, left curves, right curves) can be identified. For example, if the curvature of the lane lines is large and the directions are consistent, it can be judged as a curve, otherwise it is judged as a straight driving lane.
[0075] For curved roads, calculate their road curvature, and detect the starting point of the curve (i.e., the curve entrance) by analyzing the curvature change of the lane lines. At the same time, according to the equations of the left and right lane lines, calculate the position of the lane center line at the curve entrance. The position of this lane center line can be determined by the midpoint of the left and right lane lines, and convert the position of the center line of the curve entrance into the position in the vehicle coordinate system for subsequent calculations.
[0076] In one embodiment, calculating the initial illumination angle according to the road curvature and the current illumination angle of the headlight includes the following formula:
[0077]
[0078] Among them, θ2 is the initial illumination angle, θ1 is the current illumination angle of the headlight. Usually, when the vehicle is driving straight, the corresponding current illumination angle of the headlight is 0 degrees. γ is the curvature adjustment coefficient, which can be set according to actual needs, and R is the road curvature.
[0079] In addition, in this embodiment, the real-time position of the vehicle can be obtained through the vehicle's positioning system (such as GPS and IMU), and converted into the position in the lane coordinate system. The lateral offset of the vehicle in the lane is calculated based on the position of the center line and the real-time position of the vehicle. The lateral offset of the vehicle refers to the degree of deviation of the position of the moving vehicle in the lane relative to the center line of the curve. When the lateral offset is small, the vehicle deviates less from the center line of the lane and is farther away from the boundary of the curve; when the lateral offset is larger, the vehicle deviates farther from the center line of the lane and is closer to the boundary of the curve on one side.
[0080] In one embodiment, calculating the angle adjustment coefficient of the headlamp according to the lateral offset and the vehicle speed may include the following formula:
[0081]
[0082] Wherein, the is the angle adjustment coefficient of the headlamp, the α is the weight coefficient of the lateral offset, indicating the influence degree of the lateral offset on the angle adjustment. The larger the weight coefficient of the lateral offset, the greater the influence degree of the lateral offset on the angle adjustment. The β is the weight coefficient of the vehicle speed, indicating the influence degree of the vehicle speed on the angle adjustment. The larger the weight coefficient of the vehicle speed, the greater the influence degree of the vehicle speed on the angle adjustment. The d offset is the lateral offset of the vehicle in the lane, and the v is the vehicle speed.
[0083] Finally, the initial illumination angle is adjusted according to the angle adjustment coefficient to obtain the target illumination angle. For example, the target illumination angle can be obtained by adding the angle adjustment coefficient to the initial illumination angle, or by multiplying the angle adjustment coefficient by the initial illumination angle. Through the vehicle's lighting control system, the current illumination angle of the headlamp is adjusted to the calculated target illumination angle. Thus, through steps such as real-time analyzing the road image, identifying the lane type and road curvature, calculating the lateral offset and speed adjustment coefficient, etc., the precise dynamic adjustment of the headlamp illumination angle is realized to adapt to different road environments and driving conditions, which can significantly improve the safety and comfort of night driving.
[0084] For example, as shown in Figure 2 , when the vehicle deviates less from the center line of the lane and is farther away from the boundary of the curve, only the illumination angle a that focuses more light on the center of the curve is required. As shown in Figure 3 , when the lateral offset is larger, the vehicle deviates farther from the center line of the lane, and the headlamp needs a larger illumination angle b to illuminate the lane edge to assist the driver in judging the distance between the vehicle and the boundary of the curve, ensuring that the vehicle can safely drive within the lane, where the illumination angle b is greater than a.
[0085] For example, assume a car is driving on a highway at night. The vehicle's front-view camera captures road images in real time at a rate of 30 frames per second, with a resolution set to 1280×720 pixels. The preprocessed images are analyzed to identify the left and right lane lines, and the shape of the lane lines is fitted with a quadratic polynomial. By analyzing the curvature change of the lane lines, it is determined that the road ahead of the vehicle is a left curve. Based on the polynomial fitting coefficients of the lane lines, the curvature of the road is calculated to be 500 meters, and the curve entrance is detected. The position of the lane centerline at the curve entrance is calculated to be approximately 50 meters ahead of the vehicle. Combining the road curvature and the current illumination angle of the headlight (assumed to be 0 degrees), the initial illumination angle is calculated. Assume the curvature adjustment coefficient γ is 1000, then the initial illumination angle θ2 = 0 + 1000×(1 / 500) = 2 degrees. Then, the real-time position of the vehicle is obtained through the vehicle positioning system, and the lateral offset of the vehicle in the lane is calculated to be 0.5 meters (offset to the left). Combining the lateral offset and the vehicle speed (assumed to be 80 km / h), the angle adjustment coefficient is calculated. Assume the weight coefficient α of the lateral offset is 0.1 and the weight coefficient β of the vehicle speed is 0.05, then the angle adjustment coefficient Target illumination angle θ target = 2 + 0.45 = 2.45 degrees. The vehicle's lighting control system adjusts the lighting direction of the headlight according to the calculated target illumination angle of 2.45 degrees, causing the headlight to deflect to the left, illuminating the inner side of the curve in advance, ensuring that the driver can clearly see the road surface on the inner side of the curve, and improving driving safety.
[0086] In addition, during the vehicle's driving process, the road conditions and vehicle status can be monitored in real time, and the lighting angle of the headlight can be continuously adjusted to ensure that the lighting effect is always in the best state. Through real-time feedback and optimization, it can continuously adapt to different road conditions and vehicle status, provide a continuously optimized lighting effect, and offer a better driving experience for the driver.
[0087] A lane lighting method based on vehicle vision perception provided by the present invention can more precisely understand the position and driving trend of the vehicle in a curve by determining the center line position of the curve entrance, providing a key reference point for lighting angle adjustment, ensuring that the headlight can illuminate the curve boundary in advance, and improving driving safety; by combining the road curvature and the current lighting angle, the initial lighting angle is calculated, which also ensures that the headlight can adjust the lighting direction according to the bending degree of the road during curve driving, avoiding insufficient lighting or over-illumination, and improving the adaptability and accuracy of the lighting effect; in addition, by calculating the lateral offset of the vehicle in the lane, and combining the lateral offset and the vehicle speed, the angle adjustment coefficient of the headlight is calculated, and the target lighting angle is adjusted according to the angle adjustment coefficient, so as to be able to understand in real time whether the vehicle deviates from the lane center line, providing dynamic data support for lighting angle adjustment, ensuring that the headlight can be dynamically adjusted according to the actual driving state of the vehicle, so as to achieve precise adjustment of the lighting angle of the headlight in the curve scene, facilitating the driver to clearly see the curve boundary at night, assisting the driver to judge the distance between the vehicle and the curve boundary, and improving driving safety.
[0088] In one embodiment, after controlling the headlight to illuminate according to the target lighting angle, it further includes:
[0089] Obtain the brightness distribution data of the area illuminated by the headlight;
[0090] Calculate the average brightness according to the brightness distribution data, and divide the average brightness by the difference between the maximum brightness and the minimum brightness to obtain the original brightness uniformity of the illuminated area;
[0091] Calculate the first target weight coefficient according to the weight coefficient of the lateral offset, the original brightness uniformity and the target brightness uniformity, and adjust the weight coefficient of the lateral offset to the first target weight coefficient;
[0092] and / or
[0093] Calculate the area of the illuminated area according to the brightness distribution data, calculate the ratio of the area of the illuminated area to the area of the lane to obtain the original coverage ratio of the illuminated area covering the lane;
[0094] Calculate the second target weight coefficient according to the weight coefficient of the vehicle speed, the original coverage ratio and the target coverage ratio, and adjust the weight coefficient of the vehicle speed to the second target weight coefficient.
[0095] In this embodiment, multiple brightness sensors can be arranged in the area illuminated by the vehicle headlight. The sensor can be a CCD or CMOS image sensor, which is used to collect the brightness information of the illuminated area in real time. The brightness distribution data of the illuminated area is collected through the brightness sensor, and the brightness of each pixel point is usually represented in the form of a gray value.
[0096] When adjusting the weight coefficient of the horizontal offset, first calculate the average brightness of all pixel points in the illuminated area, and calculate the difference between the maximum brightness and the minimum brightness among all pixel points in the illuminated area. Divide the average brightness by the difference between the maximum brightness and the minimum brightness to calculate the original brightness uniformity of the illuminated area.
[0097] Then, set the target brightness uniformity, which represents the desired brightness uniformity. Calculate the ratio of the target brightness uniformity to the original brightness uniformity. After multiplying the weight coefficient of the horizontal offset by the ratio of the target brightness uniformity to the original brightness uniformity, calculate the first target weight coefficient, and adjust the weight coefficient of the horizontal offset to the first target weight coefficient. By adjusting the weight coefficient, optimize the lighting angle, improve the brightness uniformity of the illuminated area, and reduce visual fatigue caused by uneven brightness. At the same time, the optimized lighting angle can better illuminate the lane, improve the visibility of the road ahead for the driver, and reduce the accident risk. In addition, by adjusting the weight coefficient in real time, adapt to different road conditions and vehicle states, and provide a more accurate lighting effect.
[0098] When adjusting the weight coefficient of the vehicle speed, first identify the area illuminated by the headlight through threshold segmentation or edge detection method, and calculate the area of the illuminated area, usually expressed in the number of pixels or the actual area (such as square meters). Determine the area of the lane through the lane line detection algorithm, and calculate the ratio of the area of the illuminated area to the area of the lane to obtain the original coverage ratio.
[0099] Then, set the target coverage ratio, which represents the desired ratio of the illuminated area covering the lane. Calculate the ratio of the target coverage ratio to the original coverage ratio. After multiplying the weight coefficient of the vehicle speed by the ratio of the target coverage ratio to the original coverage ratio, calculate the second target weight coefficient, and adjust the weight coefficient of the vehicle speed to the second target weight coefficient. By adjusting the weight coefficient, optimize the lighting angle, increase the ratio of the illuminated area covering the lane, reduce the lighting blind area, and improve driving safety.
[0100] In one embodiment, controlling the headlight to illuminate according to the target lighting angle may specifically include:
[0101] Adjust the current lighting brightness of the headlight according to the vehicle speed to obtain the target lighting brightness, including the following formula:
[0102]
[0103] Among them, B2 is the target lighting brightness, B1 is the current lighting brightness of the headlight, δ is the vehicle speed adjustment coefficient, v is the vehicle speed greater than the preset speed, and v max is the maximum speed allowed on the current road;
[0104] Control the headlamp to illuminate according to the target illumination angle and target illumination brightness.
[0105] In this embodiment, the driving speed of the vehicle can be obtained in real time through the vehicle speed sensor, and the maximum speed allowed on the current road can be determined, such as 60 km / h for urban roads, 120 km / h for highways, etc. A vehicle speed adjustment coefficient is introduced to represent the influence degree of speed on brightness. According to the vehicle speed, the maximum speed allowed on the current road, and the vehicle speed adjustment coefficient, the target illumination brightness is calculated.
[0106] Through the vehicle lighting control system, adjust the illumination angle of the headlamp to the target illumination angle and adjust the brightness to the target illumination brightness. In addition, during the vehicle driving process, the vehicle speed and road conditions are monitored in real time, and the illumination angle and brightness of the headlamp are dynamically adjusted to ensure that the illumination effect is always in the best state.
[0107] In this embodiment, the illumination brightness can be dynamically adjusted according to the vehicle speed to ensure a farther illumination distance when driving at high speed, improving driving safety. When driving at low speed, the brightness is appropriately reduced to reduce energy consumption and extend the service life of the headlamp. In addition, by adjusting the illumination brightness and angle in real time, it adapts to different road conditions and vehicle states, providing a more accurate illumination effect.
[0108] Reference Figure 4 As shown, in one embodiment, analyzing the road image collected by the vehicle front-view camera to obtain an analysis result may specifically include:
[0109] S111. Convert the road image into a bird's-eye view according to the perspective transformation method;
[0110] S112. Starting from the bottom of the bird's-eye view, use a sliding window to search for the pixel points of the lane line in the image, and find the initial position of the lane line by statistical histogram. Search upward along the initial position of the lane line to gradually determine the pixel area of the lane line;
[0111] S113. Perform polynomial fitting on the pixel points in the pixel area of the detected lane line to obtain the equations of the left and right lane lines;
[0112] S114. Calculate the road curvature of the lane line according to the coefficients of the polynomial fitting;
[0113] S115. Judge whether the lane type in front of the vehicle is a curve by comparing the road curvature and direction of the left and right lane lines;
[0114] S116. When the curvatures of the left and right lane lines are greater than the preset curvature and the directions are the same, determine that the lane type in front of the vehicle is a curve.
[0115] Perspective transformation is a linear transformation that converts an image from one perspective to another. In lane line detection, perspective transformation is used to convert the road image captured by the front-view camera into a bird's-eye view, making the lane lines appear as parallel lines in the image for easy analysis and processing.
[0116] Specifically, first, select four non-collinear points on the road image, which are usually located at the four corners of the lane. Calculate the perspective transformation matrix using all the reference points, and apply the perspective transformation matrix to the image to generate a bird's-eye view.
[0117] Starting from the bottommost part of the bird's-eye view, use a sliding window to search for the pixel points of the lane lines in the image. Find the initial position of the lane lines by statistical histogram, and then search upward along the lane lines to gradually determine the pixel region of the lane lines. For example, determine the width and height of the sliding window. The width of the sliding window is selected to be about 1.5 times the width of the lane line to ensure that most of the pixel points of the lane line can be covered. The height of the sliding window can be adjusted according to the road curvature of the lane line and the driving direction of the vehicle, and the initial value is set to be about 2 times the width of the window. Starting from the bottom of the image, slide the window upward with a fixed step size, and count the non-zero pixels in each window. If the number of non-zero pixels in the window exceeds the threshold, update the center position of the window to the average abscissa of the non-zero pixels in the current window to gradually determine the pixel region of the lane lines.
[0118] Then, perform polynomial fitting on the detected lane line pixel points, usually using a quadratic polynomial because the lane lines appear as quadratic curves in the bird's-eye view. For example, the detected lane line pixel points can be collected, and the polynomial fitting algorithm can be used to fit the pixel points to obtain the equation of the lane line.
[0119] In one embodiment, calculating the road curvature of the lane line according to the coefficients of the polynomial fitting may include the following formula:
[0120]
[0121] Wherein, R is the road curvature, A and C are the coefficients of the polynomial fitting, and y is the ordinate of the pixel points on the lane line.
[0122] By comparing the road curvatures and directions of the left and right lane lines, determine whether the lane type in front of the vehicle is a curve. If the curvatures of the left and right lane lines are large and the directions are the same, it can be determined as a curve. For example, set a curvature threshold. When the curvatures of the left and right lane lines exceed the threshold and the directions are the same, determine that the lane type in front of the vehicle is a curve.
[0123] This embodiment can use perspective transformation and the sliding window method to more accurately detect lane lines, improve detection accuracy, quickly detect lane lines in real-time processing, and meet the requirements of autonomous driving and advanced driver assistance systems. At the same time, through polynomial fitting and curvature calculation, misjudgment is reduced and the reliability of the system is improved.
[0124] In one embodiment, before converting the road image into a bird's-eye view according to the perspective transformation method, the following may further be included:
[0125] Convert the road image into a grayscale image containing only luminance information, and process the grayscale image using the Gaussian smoothing algorithm to reduce noise in the image.
[0126] This embodiment converts the color image into a grayscale image, which can reduce computational complexity while retaining the main structural information of the image. For example, use the grayscale conversion function in the image processing library to convert the RGB image into a grayscale image.
[0127] Then, process the grayscale image using the Gaussian smoothing algorithm to reduce noise in the image. Specifically, generate a two-dimensional Gaussian kernel according to the Gaussian function. The size and standard deviation of the kernel determine the degree of smoothing. Convolve the Gaussian kernel with each pixel in the grayscale image and its neighborhood to obtain the smoothed pixel value, and assign the result of the convolution operation to the current pixel to complete the smoothing process of the pixel.
[0128] This embodiment can effectively remove noise in the image and improve image quality through grayscale conversion and Gaussian smoothing, providing a clearer input for subsequent lane line detection. In addition, grayscale conversion can reduce computational complexity, improve processing speed, and meet the requirements of real-time processing.
[0129] Please refer to Figure 5 , and in one embodiment of the present invention, a lane lighting system based on vehicle vision perception is further provided, including:
[0130] An analysis module 51, configured to analyze the road image collected by the vehicle front-view camera to obtain an analysis result, where the analysis result includes the lane type and road curvature in front of the vehicle;
[0131] A determination module 52, configured to determine the position of the center line of the bend entrance when it is recognized that the lane type in front of the vehicle is a bend;
[0132] A first calculation module 53, configured to calculate an initial lighting angle according to the road curvature and the current lighting angle of the headlight;
[0133] A second calculation module 54, configured to calculate the lateral offset of the vehicle in the lane according to the position of the center line and the real-time position of the vehicle;
[0134] An adjustment module 55, configured to calculate an angle adjustment coefficient of the headlamp according to the lateral offset and the vehicle speed, and adjust the initial illumination angle according to the angle adjustment coefficient to obtain a target illumination angle;
[0135] A control module 56, configured to control the headlamp to perform illumination according to the target illumination angle.
[0136] A lane lighting system based on vehicle vision perception provided by the present invention can more accurately understand the position and driving trend of the vehicle in a curve by determining the center line position of the curve entrance, providing a key reference point for lighting angle adjustment, ensuring that the headlamp can illuminate the curve boundary in advance, and improving driving safety; by combining the road curvature and the current illumination angle, the initial illumination angle is calculated, which also ensures that the headlamp can adjust the illumination direction according to the bending degree of the road during curve driving, avoiding insufficient illumination or over-illumination, and improving the adaptability and accuracy of the illumination effect; in addition, by calculating the lateral offset of the vehicle in the lane, and by combining the lateral offset and the vehicle speed, the angle adjustment coefficient of the headlamp is calculated, and the target illumination angle is adjusted according to the angle adjustment coefficient, so as to be able to understand in real time whether the vehicle deviates from the lane center line, providing dynamic data support for lighting angle adjustment, ensuring that the headlamp can be dynamically adjusted according to the actual driving state of the vehicle, so as to achieve precise adjustment of the illumination angle of the headlamp in a curve scene, facilitating the driver to clearly see the curve boundary at night, assisting the driver in judging the distance between the vehicle and the curve boundary, and improving driving safety.
[0137] Regarding the system in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0138] In one embodiment, the present invention also proposes a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to execute the above-mentioned lane lighting method based on vehicle vision perception. Wherein, the storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0139] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0140] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0141] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it cannot be construed as a limitation on the scope of the patent for the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be subject to the appended claims.
Claims
1. A lane lighting method based on vehicle visual perception, characterized in that: include: Analyzing the road image collected by the vehicle's front-view camera to obtain an analysis result, wherein the analysis result includes the lane type and road curvature in front of the vehicle; When the lane type in front of the vehicle is identified as a curve, determining the position of the center line of the curve entrance; Calculating an initial lighting angle according to the road curvature and a current lighting angle of the headlamp; Calculating the lateral offset of the vehicle in the lane according to the position of the center line and the real-time position of the vehicle; Calculating an angle adjustment coefficient of the headlight according to the lateral offset and the vehicle speed, and adjusting the initial lighting angle according to the angle adjustment coefficient to obtain a target lighting angle; The headlamp is controlled to illuminate according to the target lighting angle.
2. The method according to claim 1, characterized in that The calculating the initial lighting angle according to the road curvature and the current lighting angle of the headlamp comprises: Wherein, θ2 is the initial lighting angle, θ1 is the current lighting angle of the headlight, γ is the curvature adjustment coefficient, and R is the road curvature.
3. The method according to claim 1, characterized in that The calculating the angle adjustment coefficient of the headlamp according to the lateral offset and the vehicle speed includes: Among them, the is the angle adjustment coefficient of the headlight, α is the weight coefficient of the lateral offset, indicating the influence of the lateral offset on the angle adjustment, β is the weight coefficient of the vehicle speed, indicating the influence of the vehicle speed on the angle adjustment, and d offset is the lateral offset of the vehicle in the lane, and v is the vehicle speed.
4. The method according to claim 3, characterized in that After controlling the headlamp to illuminate according to the target illumination angle, the method further includes: Obtaining brightness distribution data of the area illuminated by the headlamp; Calculating average brightness according to the brightness distribution data, dividing the average brightness by the difference between the maximum brightness and the minimum brightness to obtain the original brightness uniformity of the illuminated area; Calculating a first target weight coefficient according to a weight coefficient of the lateral offset, original brightness uniformity, and target brightness uniformity, and adjusting the weight coefficient of the lateral offset to the first target weight coefficient; and / or Calculating the illuminated area according to the brightness distribution data, calculating the ratio of the illuminated area to the lane area, and obtaining the original coverage ratio of the illuminated area to the lane; A second target weight coefficient is calculated according to the weight coefficient of the vehicle speed, the original coverage ratio and the target coverage ratio, and the weight coefficient of the vehicle speed is adjusted to the second target weight coefficient.
5. The method according to claim 1, characterized in that The controlling the headlamp to illuminate according to the target illumination angle comprises: The current illumination brightness of the headlight is adjusted according to the vehicle speed to obtain the target illumination brightness, including the following formula: Wherein, B2 is the target lighting brightness, B1 is the current lighting brightness of the headlight, δ is the vehicle speed adjustment coefficient, v is the vehicle speed greater than the preset speed, and v max The maximum speed allowed on the current road; The headlights are controlled to illuminate according to the target illumination angle and target illumination brightness.
6. The method according to claim 1, characterized in that The road image collected by the vehicle's front-view camera is analyzed to obtain analysis results, including: Converting the road image into a bird's-eye view according to a perspective transformation method; Starting from the bottom of the bird's-eye view, use a sliding window to search for lane line pixels in the image, find the initial position of the lane line through statistical histogram, search upward along the initial position of the lane line, and gradually determine the pixel area of the lane line; Perform polynomial fitting on the pixel points in the pixel area of the detected lane line to obtain the equations of the left and right lane lines; Calculating the road curvature of the lane line according to the coefficients of the polynomial fitting; By comparing the road curvature and direction of the left and right lane lines, determine whether the lane type in front of the vehicle is a curve; When the curvature of the left and right lane lines is greater than the preset curvature and the directions are consistent, it is determined that the lane type in front of the vehicle is a curve.
7. The method according to claim 6, characterized in that The calculating the road curvature of the lane line according to the coefficients of the polynomial fitting includes: Wherein, R is the road curvature, A and C are coefficients of polynomial fitting, and y is the ordinate of the pixel point on the lane line.
8. The method according to claim 6, characterized in that Before converting the road image into a bird's-eye view according to the perspective transformation method, the method further includes: The road image is converted into a grayscale image containing only brightness information, and the grayscale image is processed using a Gaussian smoothing algorithm to reduce noise in the image.
9. A lane lighting system based on vehicle visual perception, characterized in that: include: An analysis module, used to analyze the road image collected by the vehicle's front-view camera to obtain an analysis result, wherein the analysis result includes the lane type and road curvature in front of the vehicle; A determination module, for determining the position of the center line of the entrance of the curve when the lane type in front of the vehicle is identified as a curve; A first calculation module, used for calculating an initial lighting angle according to the road curvature and the current lighting angle of the headlamp; A second calculation module, used for calculating the lateral offset of the vehicle in the lane according to the position of the center line and the real-time position of the vehicle; an adjustment module, configured to calculate an angle adjustment coefficient of the headlamp according to the lateral offset and the vehicle speed, and adjust the initial lighting angle according to the angle adjustment coefficient to obtain a target lighting angle; The control module is used to control the headlight to illuminate according to the target lighting angle.
10. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the lane lighting method based on vehicle visual perception according to any one of claims 1 to 8 is performed.
Citation Information
Patent Citations
Adaptive bend auxiliary lighting method and device
CN101879881A
Vehicle lamp illumination method, vehicle lamp illumination system and computer storage medium
CN116552369A
Lane departure warning system and method and vehicle
CN110329253A
Vehicle steering method and device, electronic equipment, storage medium and vehicle
CN118322987A
Method for adjusting a vehicle headlamp, headlamp adjustment device, and motor vehicle comprising such a device
FR3031480A1
Cited By
Vehicle driving night vision auxiliary sensing system
CN120635864A
A vehicle driving night vision auxiliary perception system
CN120635864B