A lane lighting method, storage medium, and system based on vehicle visual perception.
The vehicle's visual perception system analyzes road images, identifies curve types and curvatures, and adjusts the headlight angle and brightness based on lateral offset and vehicle speed. This solves the problem of insufficient or excessive lighting in curved scenes in traditional lane lighting solutions, improving nighttime driving safety and comfort.
Patent Information
- Application Number
- CN202510429629.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-04-08
AI Technical Summary
Traditional lane lighting solutions cannot accurately adjust the headlight angle in curved scenarios, making it difficult for drivers to judge the distance between the vehicle and the curve boundary at night, thus affecting driving safety.
By analyzing road images through a vehicle vision perception system, identifying lane types and curvature, calculating the initial illumination angle, and combining lateral offset and vehicle speed, the angle and brightness of the headlights are adjusted to achieve dynamic and precise adjustment.
It improves the driver's visibility in curved situations, ensuring that the vehicle can safely judge the distance to the curve boundary, and enhances the safety and comfort of nighttime driving.
Smart Images

Figure CN120191284B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle lighting technology, and in particular to a lane lighting method, storage medium, and system based on vehicle visual perception. Background Technology
[0002] Visual perception refers to the process of capturing image or video data using visual sensors (such as cameras) and then using algorithms to process and analyze that data in order to identify, understand, and interpret information such as targets, objects, and environmental features in a scene. In the field of vehicle driving, visual perception is one of the key technologies in autonomous driving and driver assistance systems. It mainly uses a camera mounted in the center of the vehicle's windshield to perceive the scene in front of the vehicle.
[0003] Traditional lane lighting solutions based on vehicle vision perception typically determine the road type based on visual information and switch the headlight illumination mode accordingly. For example, a patent with publication number CN116552369A, which discloses a vehicle lighting method, a vehicle lighting system, and a computer storage medium, acquires vehicle motion information and visual information about the road ahead, determines the road type based on the vehicle motion and visual information, generates a target control command based on the road type, and switches the headlight illumination mode according to the target control command, thereby changing the headlight lighting effect. However, this technical solution does not precisely adjust the headlight illumination angle in curved scenarios, making it difficult for drivers to see the curve boundary clearly at night, resulting in an inability to judge the distance between the vehicle and the curve boundary, thus affecting driving safety.
[0004] The patent CN101879881A, which discloses an adaptive cornering auxiliary lighting method and device, calculates the required headlight illumination angle based on the vehicle's illumination range requirements, the calculated corner radius, and the vehicle's distance from the corner's starting position. It then controls the actuator to adjust the headlight illumination angle accordingly. However, due to differences in driving habits, if a driver habitually drives along the corner's edge, using this technology will produce the same illumination angle as when driving along the corner's centerline. This makes it difficult for the driver to judge the distance between the corner's edge and the vehicle at night. For example, a vehicle driving along the corner's centerline is farther from the corner's edge, requiring only a more focused illumination angle at the corner's center. Conversely, a vehicle driving along the corner's edge is closer; using the same illumination angle at the same point makes it difficult for the driver to clearly see the corner's edge at night, hindering their ability to judge the distance between the vehicle and the corner's edge. Summary of the Invention
[0005] This invention provides a lane lighting method, storage medium, and system based on vehicle visual perception, which can precisely adjust the illumination angle of headlights in a curved scene, making it easier for the driver to see the curve boundary at night, thereby assisting the driver in judging the distance between the vehicle and the curve boundary and improving driving safety.
[0006] To solve the above problems, the present invention adopts the following technical solution:
[0007] This invention provides a lane lighting method based on vehicle visual perception, comprising:
[0008] The road images captured by the vehicle's forward-facing camera are analyzed to obtain analysis results, which include the lane type and road curvature in front of the vehicle.
[0009] When the lane type in front of the vehicle is identified as a curve, the position of the centerline at the curve entrance is determined.
[0010] The initial illumination angle is calculated based on the road curvature and the current illumination angle of the headlights;
[0011] 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.
[0012] Calculate the headlight angle adjustment coefficient based on the lateral offset and vehicle speed, and adjust the initial illumination angle according to the angle adjustment coefficient to obtain the target illumination angle.
[0013] Control the headlights to illuminate according to the target illumination angle.
[0014] Preferably, the step of calculating the initial illumination angle based on the road curvature and the current illumination angle of the headlights includes:
[0015]
[0016] Wherein, θ2 is the initial illumination angle, θ1 is the current illumination angle of the headlight, γ is the curvature adjustment coefficient, and R is the road curvature.
[0017] Preferably, the step of calculating the headlight angle adjustment coefficient based on the lateral offset and vehicle speed includes:
[0018]
[0019] Among them, the Here, α is the headlight angle adjustment coefficient, β is the weighting coefficient for lateral offset, representing the degree of influence of lateral offset on angle adjustment, and d is the weighting coefficient for vehicle speed, representing the degree of influence of vehicle speed on angle adjustment. offsetv represents the lateral offset of the vehicle in the lane, where v is the vehicle speed.
[0020] Furthermore, after controlling the headlights to illuminate according to the target illumination angle, the method further includes:
[0021] Acquire the brightness distribution data of the area illuminated by the headlights;
[0022] The average brightness is calculated based on the brightness distribution data, and the average brightness is divided by the difference between the maximum brightness and the minimum brightness to obtain the original brightness uniformity of the illuminated area.
[0023] Calculate the first target weight coefficient based on the weight coefficient of the lateral offset, the original brightness uniformity, and the target brightness uniformity, and then adjust the weight coefficient of the lateral offset to the first target weight coefficient.
[0024] and / or
[0025] The illuminated area is calculated based on the brightness distribution data, and the ratio of the illuminated area to the lane area is calculated to obtain the original coverage ratio of the lane covered by the illuminated area.
[0026] The second target weight coefficient is calculated based on the weight coefficient of vehicle speed, the original coverage ratio, and the target coverage ratio, and the weight coefficient of vehicle speed is adjusted to the second target weight coefficient.
[0027] Preferably, controlling the headlights to illuminate according to the target illumination angle includes:
[0028] The target illumination brightness is obtained by adjusting the current illumination brightness of the headlights based on the vehicle speed, using the following formula:
[0029]
[0030] Wherein, B2 is the target illumination brightness, B1 is the current illumination brightness of the headlights, δ is the vehicle speed adjustment coefficient, v is the vehicle speed greater than a preset speed, and v max The maximum speed currently allowed on the road;
[0031] Control the headlights to illuminate according to the target illumination angle and target illumination brightness.
[0032] Preferably, the analysis of the road images captured by the vehicle's forward-facing camera to obtain the analysis results includes:
[0033] The road image is converted into a bird's-eye view using perspective transformation.
[0034] Starting from the bottom of the bird's-eye view, use a sliding window to search for lane line pixels in the image, and find the initial position of the lane line by statistical histogram. Search upwards along the initial position of the lane line to gradually determine the pixel area of the lane line.
[0035] Polynomial fitting is performed on the pixels in the detected lane lines to obtain the equations for the left and right lane lines.
[0036] The road curvature of the lane line is calculated based on the coefficients of the polynomial fitting.
[0037] By comparing the road curvature and direction of the left and right lane lines, it can be determined whether the lane ahead of the vehicle is a curve.
[0038] When the curvature of the left and right lane lines is greater than the preset curvature and they are in the same direction, the lane type in front of the vehicle is determined to be a curve.
[0039] Preferably, calculating the road curvature of the lane line based on the coefficients of the polynomial fitting includes:
[0040]
[0041] Wherein, R is the road curvature, A and C are the coefficients of the polynomial fitting, and y is the ordinate of the pixel on the lane line.
[0042] Furthermore, before converting the road image into a bird's-eye view using perspective transformation, the process further includes:
[0043] 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.
[0044] The present invention also provides a lane lighting system based on vehicle visual perception, comprising:
[0045] The analysis module is used to analyze the road images captured by the vehicle's forward-facing camera and obtain analysis results, including the lane type and road curvature in front of the vehicle.
[0046] The determination module is used to determine the position of the centerline of the curve entrance when the type of lane in front of the vehicle is identified as a curve.
[0047] The first calculation module is used to calculate the initial illumination angle based on the road curvature and the current illumination angle of the headlights;
[0048] The second calculation module is used to calculate the lateral offset of the vehicle in the lane based on the position of the center line and the real-time position of the vehicle.
[0049] The adjustment module is used to calculate the headlight angle adjustment coefficient based on the lateral offset and vehicle speed, and adjust the initial illumination angle according to the angle adjustment coefficient to obtain the target illumination angle.
[0050] The control module is used to control the headlights to illuminate according to the target illumination angle.
[0051] The present invention also provides a computer storage medium storing a computer program that, when executed by a processor, implements the lane lighting method based on vehicle visual perception as described in any of the preceding claims.
[0052] Compared with the prior art, the technical solution of the present invention has at least the following advantages:
[0053] This invention provides a lane lighting method, storage medium, and system based on vehicle visual perception. By determining the centerline position of the curve entrance, it can more accurately understand the vehicle's position and driving trend in the curve, providing a key reference point for adjusting the lighting angle. This ensures that the headlights can illuminate the curve boundary in advance, improving driving safety. By combining the road curvature and the current lighting angle, the initial lighting angle is calculated, ensuring that the headlights can adjust the lighting direction according to the curvature of the road when driving in a curve, avoiding insufficient or excessive lighting, 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 with the vehicle speed, the headlight angle adjustment coefficient is calculated. The target lighting angle is obtained by adjusting the angle adjustment coefficient, thereby enabling real-time monitoring of whether the vehicle deviates from the lane centerline. This provides dynamic data support for lighting angle adjustment, ensuring that the headlights can be dynamically adjusted according to the actual driving state of the vehicle. This allows for precise adjustment of the headlight lighting angle in curve scenarios, making it easier for the driver to see the curve boundary at night, assisting the driver in judging the distance between the vehicle and the curve boundary, and improving driving safety. Attached Figure Description
[0054] Figure 1 This is a flowchart of one embodiment of a lane lighting method based on vehicle visual perception according to the present invention;
[0055] Figure 2 This is a diagram illustrating the lighting effect of the headlights when the vehicle of the present invention is traveling along the center line of a curve;
[0056] Figure 3 This is a diagram illustrating the lighting effect of the headlights when the vehicle of the present invention is traveling to the left, deviating from the center line of a curve.
[0057] Figure 4 This is a flowchart of another embodiment of the lane lighting method based on vehicle visual perception of the present invention;
[0058] Figure 5 This is a structural block diagram of one embodiment of a lane lighting system based on vehicle visual perception according to the present invention. Detailed Implementation
[0059] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0060] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as S11, S12, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0061] It will be understood by those skilled in the art that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0062] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within 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 visual perception, comprising the following steps:
[0065] S11. Analyze the road images captured by the vehicle's forward-facing camera to obtain analysis results, including the lane type and road curvature in front of the vehicle.
[0066] S12. When the lane type in front of the vehicle is identified as a curve, determine the position of the center line at the entrance of the curve.
[0067] S13. Calculate the initial illumination angle based on the road curvature and the current illumination angle of the headlights;
[0068] S14. Calculate the lateral offset of the vehicle in the lane based on the position of the center line and the real-time position of the vehicle.
[0069] S15. Calculate the headlight angle adjustment coefficient based on the lateral offset and vehicle speed, and adjust the initial illumination angle according to the angle adjustment coefficient to obtain the target illumination angle.
[0070] S16. Control the headlights to illuminate according to the target illumination angle.
[0071] This embodiment enables precise dynamic adjustment of the illumination angle of the vehicle's headlights, significantly improving the safety and comfort of nighttime driving. Specifically, the forward-facing camera acquires real-time images of the road ahead of the vehicle at a certain frame rate (e.g., 30 frames / second), ensuring that the image resolution of the road images is sufficiently high (e.g., 1280×720 pixels) to meet image analysis requirements.
[0072] The forward-facing camera is a crucial component of the vehicle's visual perception system. Mounted at the front of the vehicle, it captures real-time images of the road ahead. These images can be used for various functions, including lane detection, obstacle recognition, and traffic sign recognition. Preferably, the forward-facing camera is positioned at the top center behind the windshield to provide a good field of view, covering the road ahead and minimizing the impact of external environmental factors such as rain and dust.
[0073] Preprocessing operations such as denoising (e.g., Gaussian filtering) and image enhancement (e.g., histogram equalization) are performed on the acquired road images to improve image quality and highlight lane line features. Gaussian filtering smooths the image, reducing noise and detail. Histogram equalization enhances image contrast, making details clearer. It redistributes pixel values to create a more uniform histogram, thus improving overall image contrast.
[0074] This embodiment utilizes a deep learning-based lane detection algorithm to analyze preprocessed road images and identify the position and shape of lane lines. For example, a convolutional neural network (CNN) can be used to extract image features from the road image, and a loss function can be used to constrain the shape of the lane lines, ensuring the continuity and smoothness of the detection results. The position of the lane lines can be represented by pixel coordinates, and the shape can be fitted using a quadratic polynomial. By analyzing the shape and distribution of the lane lines, the lane type (such as a straight road, a left curve, or a right curve) can be identified. For example, if the lane lines have a large curvature and a consistent direction, they can be identified as a curve; otherwise, they are identified as a straight lane.
[0075] For curved roads, the road curvature is calculated, and the starting point of the curve (i.e., the curve entrance) is detected by analyzing the curvature changes of the lane lines. Simultaneously, the position of the lane centerline at the curve entrance is calculated based on the equations of the left and right lane lines. This position can be determined by the midpoint of the left and right lane lines. The position of the centerline at the curve entrance is then converted to a position in the vehicle coordinate system for subsequent calculations.
[0076] In one embodiment, calculating the initial illumination angle based on the road curvature and the current illumination angle of the headlights includes the following formula:
[0077]
[0078] Wherein, θ2 is the initial illumination angle, θ1 is the current illumination angle of the headlight, which is usually 0 degrees when the vehicle is traveling in a straight line, γ is the curvature adjustment coefficient, which can be set according to actual needs, and R is the road curvature.
[0079] Furthermore, this embodiment can obtain the vehicle's real-time position through the vehicle's positioning system (such as GPS and IMU) and convert it into a position in the lane coordinate system. Based on the position of the centerline and the vehicle's real-time position, the lateral offset of the vehicle in the lane is calculated. The lateral offset of the vehicle refers to the degree to which the vehicle's position in the lane deviates from the centerline of the curve. When the lateral offset is small, the vehicle deviates less from the lane centerline and is farther from the curve boundary; when the lateral offset is large, the vehicle deviates further from the lane centerline and is closer to the curve boundary on one side.
[0080] In one embodiment, calculating the headlight angle adjustment coefficient based on the lateral offset and vehicle speed may include the following formula:
[0081]
[0082] Among them, the Here, α is the headlight angle adjustment coefficient, and β is the weighting coefficient for lateral offset, representing the degree of influence of lateral offset on angle adjustment. A larger weighting coefficient for lateral offset indicates a greater influence of lateral offset on angle adjustment. Similarly, β is the weighting coefficient for vehicle speed, representing the degree of influence of vehicle speed on angle adjustment. A larger weighting coefficient for vehicle speed indicates a greater influence of vehicle speed on angle adjustment. The d... offset v represents the lateral offset of the vehicle in the lane, where 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 angle adjustment coefficient can be added to the initial illumination angle to obtain the target illumination angle, or the angle adjustment coefficient can be multiplied by the initial illumination angle to obtain the target illumination angle. Through the vehicle's lighting control system, the current illumination angle of the headlights is adjusted to the calculated target illumination angle. By analyzing road images in real time, identifying lane types and road curvature, and calculating lateral offset and speed adjustment coefficients, precise dynamic adjustment of the headlight illumination angle is achieved to adapt to different road environments and driving conditions, significantly improving the safety and comfort of nighttime driving.
[0084] For example, refer to Figure 2 As shown, when a vehicle deviates less from the lane centerline and is farther from the curve edge, it only needs to focus its headlights more on the center of the curve at angle 'a'. (Reference) Figure 3 As shown, the greater the lateral offset, the farther the vehicle deviates from the center line of the lane, and the greater the illumination angle b required by the headlights to illuminate the edge of the lane, in order to help the driver judge the distance between the vehicle and the edge of the curve and ensure that the vehicle can drive safely within the lane. The illumination angle b is greater than a.
[0085] For example, suppose a car is driving on a highway at night. The vehicle's forward-facing camera captures road images in real time at a rate of 30 frames per second, with a resolution of 1280×720 pixels. The preprocessed images are analyzed to identify the left and right lane lines, and the lane line shapes are fitted using a quadratic polynomial. By analyzing the curvature changes of the lane lines, it is determined that there is a left curve ahead of the vehicle. Based on the polynomial fitting coefficients of the lane lines, the road curvature 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 headlights (assumed to be 0 degrees), the initial illumination angle is calculated. Assuming the curvature adjustment coefficient γ is 1000, the initial illumination angle θ2 = 0 + 1000 × (1 / 500) = 2 degrees. Then, the vehicle's real-time position is obtained through the vehicle positioning system, and the lateral offset of the vehicle in the lane is calculated to be 0.5 meters (shifting to the left). Combining the lateral offset and the vehicle speed (assumed to be 80 km / h), the angle adjustment coefficient is calculated. Assuming the weighting coefficient α for lateral offset is 0.1 and the weighting coefficient β for vehicle speed is 0.05, then the angle adjustment coefficient... Target illumination angle θ target =2 + 0.45 = 2.45 degrees. Based on the calculated target illumination angle of 2.45 degrees, the vehicle's lighting control system adjusts the headlights' illumination direction, causing them to deflect to the left, illuminating the inside of the curve in advance. This ensures the driver can clearly see the road surface on the inside of the curve, improving driving safety.
[0086] In addition, during vehicle operation, road conditions and vehicle status can be monitored in real time, and the headlights can be continuously adjusted to ensure that the lighting effect is always optimal. Through real-time feedback and optimization, it can continuously adapt to different road conditions and vehicle status, providing continuously optimized lighting effects and a better driving experience for the driver.
[0087] This invention provides a lane lighting method based on vehicle visual perception. By determining the centerline position of the curve entrance, it can more accurately understand the vehicle's position and driving trend in the curve, providing a key reference point for adjusting the lighting angle. This ensures that the headlights can illuminate the curve boundary in advance, improving driving safety. By combining the road curvature and the current lighting angle, the initial lighting angle is calculated, ensuring that the headlights can adjust the lighting direction according to the curvature of the road when driving in a curve, avoiding insufficient or excessive lighting, 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 with the vehicle speed, the headlight angle adjustment coefficient is calculated. The target lighting angle is obtained by adjusting the angle adjustment coefficient, thereby enabling real-time monitoring of whether the vehicle deviates from the lane centerline. This provides dynamic data support for lighting angle adjustment, ensuring that the headlights can be dynamically adjusted according to the actual driving state of the vehicle. This allows for precise adjustment of the headlight lighting angle in curve scenarios, making it easier for the driver to see the curve boundary at night, assisting the driver in judging the distance between the vehicle and the curve boundary, and improving driving safety.
[0088] In one embodiment, after controlling the headlights to illuminate according to the target illumination angle, the method further includes:
[0089] Acquire the brightness distribution data of the area illuminated by the headlights;
[0090] The average brightness is calculated based on the brightness distribution data, and the average brightness is divided 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 based on the weight coefficient of the lateral offset, the original brightness uniformity, and the target brightness uniformity, and then adjust the weight coefficient of the lateral offset to the first target weight coefficient.
[0092] and / or
[0093] The illuminated area is calculated based on the brightness distribution data, and the ratio of the illuminated area to the lane area is calculated to obtain the original coverage ratio of the lane covered by the illuminated area.
[0094] The second target weight coefficient is calculated based on the weight coefficient of vehicle speed, the original coverage ratio, and the target coverage ratio, and the weight coefficient of vehicle speed is adjusted to the second target weight coefficient.
[0095] In this embodiment, multiple brightness sensors can be arranged within the illuminated area of the vehicle headlight. These sensors can be CCD or CMOS image sensors, used to collect brightness information of the illuminated area in real time. The brightness distribution data of the illuminated area is collected by the brightness sensors, and the brightness of each pixel is usually represented in the form of grayscale values.
[0096] When adjusting the weighting coefficient of the lateral offset, first calculate the average brightness of all pixels in the illuminated area, and then calculate the difference between the maximum and minimum brightness of all pixels in the illuminated area. Divide the average brightness by the difference between the maximum and minimum brightness to calculate the original brightness uniformity of the illuminated area.
[0097] Next, a target brightness uniformity is set, representing the desired brightness uniformity. The ratio of the target brightness uniformity to the original brightness uniformity is calculated. The weighting coefficient of the lateral offset is multiplied by this ratio to obtain a first target weighting coefficient. The weighting coefficient of the lateral offset is then adjusted to match this first target weighting coefficient. By adjusting the weighting coefficient, the illumination angle is optimized, improving the brightness uniformity of the illuminated area and reducing visual fatigue caused by uneven brightness. Simultaneously, the optimized illumination angle better illuminates the lane, improving the driver's visibility of the road ahead and reducing the risk of accidents. Furthermore, by adjusting the weighting coefficient in real time, it adapts to different road conditions and vehicle states, providing a more precise lighting effect.
[0098] When adjusting the weighting coefficient of vehicle speed, the area illuminated by the headlights is first identified by threshold segmentation or edge detection methods, and the area of the illuminated area is calculated, usually expressed in pixels or actual area (such as square meters). The area of the lane is determined by the lane line detection algorithm, and the ratio of the illuminated area area to the lane area is calculated to obtain the original coverage ratio.
[0099] Next, a target coverage ratio is set, representing the desired proportion of the illuminated area covering the lane. The ratio of the target coverage ratio to the original coverage ratio is calculated. After multiplying the vehicle speed weighting coefficient by this ratio, a second target weighting coefficient is calculated. The vehicle speed weighting coefficient is then adjusted to the second target weighting coefficient. By adjusting the weighting coefficient, the lighting angle is optimized, increasing the proportion of the illuminated area covering the lane, reducing blind spots, and improving driving safety.
[0100] In one embodiment, controlling the headlights to illuminate according to the target illumination angle may specifically include:
[0101] The target illumination brightness is obtained by adjusting the current illumination brightness of the headlights based on the vehicle speed, using the following formula:
[0102]
[0103] Wherein, B2 is the target illumination brightness, B1 is the current illumination brightness of the headlights, δ is the vehicle speed adjustment coefficient, v is the vehicle speed greater than a preset speed, and v max The maximum speed currently allowed on the road;
[0104] Control the headlights to illuminate according to the target illumination angle and target illumination brightness.
[0105] This embodiment uses the vehicle's speed sensor to obtain the vehicle's speed in real time and determine the maximum permissible speed on the current road, such as 60 km / h on urban roads and 120 km / h on highways. A vehicle speed adjustment coefficient is introduced to represent the degree of influence of speed on brightness. Based on the vehicle speed, the maximum permissible speed on the current road, and the vehicle speed adjustment coefficient, the target illumination brightness is calculated.
[0106] The vehicle's lighting control system adjusts the headlights' beam angle and brightness to the target beam angle and brightness. Furthermore, during vehicle operation, the system monitors vehicle speed and road conditions in real time, dynamically adjusting the headlight beam angle and brightness to ensure optimal lighting performance at all times.
[0107] This embodiment dynamically adjusts the headlight brightness according to vehicle speed, ensuring a longer illumination distance at high speeds and improving driving safety. At low speeds, the brightness is appropriately reduced to decrease energy consumption and extend the headlight's lifespan. Furthermore, by adjusting the brightness and angle in real time, it adapts to different road conditions and vehicle statuses, providing more precise lighting effects.
[0108] refer to Figure 4 As shown, in one embodiment, the analysis of the road image captured by the vehicle's forward-facing camera to obtain the analysis result may specifically include:
[0109] S111. Convert the road image into a bird's-eye view using the perspective transformation method;
[0110] S112. Starting from the bottom of the bird's-eye view, use a sliding window to search for the pixels of the lane lines in the image, and find the initial position of the lane lines by statistical histogram. Search upwards along the initial position of the lane lines to gradually determine the pixel area of the lane lines.
[0111] S113. Perform polynomial fitting on the pixels of the detected lane lines to obtain the equations for the left and right lane lines.
[0112] S114. Calculate the road curvature of the lane line based on the coefficients of the polynomial fitting;
[0113] S115. By comparing the road curvature and direction of the left and right lane lines, determine whether the lane ahead of the vehicle is a curve.
[0114] S116. When the curvature of the left and right lane lines is greater than the preset curvature and the directions are the same, the lane type in front of the vehicle is determined to be a curve.
[0115] Perspective transformation is a linear transformation that converts an image from one viewpoint to another. In lane detection, perspective transformation is used to convert road images captured by a forward-looking camera into a bird's-eye view, making lane lines appear as parallel lines in the image, which facilitates analysis and processing.
[0116] Specifically, first, four non-collinear points are selected on the road image, which are usually located at the four corners of the lane. The perspective transformation matrix is calculated using all reference points, and then applied to the image to generate a bird's-eye view.
[0117] Starting from the bottom of the bird's-eye view, a sliding window is used to search for lane line pixels in the image. The initial position of the lane lines is determined by statistical histogram analysis. Then, the search proceeds upwards along the lane lines, progressively defining the pixel region of the lane lines. For example, the width and height of the sliding window are determined. The width of the sliding window is chosen to be approximately 1.5 times the width of the lane lines to ensure that most of the lane line pixels are covered. The height of the sliding window can be adjusted based on the road curvature and the direction of vehicle travel, with an initial value set to approximately twice the window width. Starting from the bottom of the image, the window slides upwards in fixed steps, counting the non-zero pixels within each window. If the number of non-zero pixels in a window exceeds a threshold, the center position of the window is updated to the average x-coordinate of the non-zero pixels within that window, thus progressively defining the pixel region of the lane lines.
[0118] Then, a polynomial fitting is performed on the detected lane line pixels, typically a quadratic polynomial, because lane lines appear as quadratic curves in a bird's-eye view. For example, the detected lane line pixels can be collected, and a polynomial fitting algorithm can be used to fit the pixels to obtain the equation of the lane lines.
[0119] In one embodiment, calculating the road curvature of the lane line based on 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 on the lane line.
[0122] By comparing the road curvature and direction of the left and right lane lines, it can be determined whether the lane ahead of the vehicle is a curve. If the curvature of the left and right lane lines is greater and their directions are consistent, it can be identified as a curve. For example, a curvature threshold can be set; when the curvature of the left and right lane lines exceeds this threshold and their directions are consistent, the lane ahead of the vehicle is determined to be a curve.
[0123] This embodiment utilizes perspective transformation and the sliding window method to more accurately detect lane lines, improving detection precision and enabling rapid lane line detection in real-time processing, thus meeting the needs of autonomous driving and advanced driver assistance systems. Simultaneously, polynomial fitting and curvature calculation reduce false positives and improve system reliability.
[0124] In one embodiment, before converting the road image into a bird's-eye view according to the perspective transformation method, the following may be included:
[0125] 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.
[0126] This embodiment converts a color image to a grayscale image, which reduces computational complexity while preserving the image's main structural information. For example, a grayscale conversion function from an image processing library can be used to convert an RGB image to a grayscale image.
[0127] Then, the grayscale image is processed using a Gaussian smoothing algorithm to reduce noise. Specifically, a two-dimensional Gaussian kernel is generated based on the Gaussian function. The size and standard deviation of the kernel determine the degree of smoothing. The Gaussian kernel is convolved with each pixel in the grayscale image and its neighborhood to obtain the smoothed pixel value. The result of the convolution operation is then assigned to the current pixel, completing the smoothing process for that pixel.
[0128] This embodiment effectively removes noise from images and improves image quality through grayscale conversion and Gaussian smoothing, providing clearer input for subsequent lane line detection. Furthermore, grayscale conversion reduces computational complexity, increases processing speed, and meets the demands of real-time processing.
[0129] Please refer to Figure 5 In one embodiment of the present invention, a lane lighting system based on vehicle visual perception is also provided, comprising:
[0130] Analysis module 51 is used to analyze the road images captured by the vehicle's forward-facing camera and obtain analysis results, including the lane type and road curvature in front of the vehicle.
[0131] The determination module 52 is used to determine the position of the center line of the curve entrance when the type of lane in front of the vehicle is identified as a curve.
[0132] The first calculation module 53 is used to calculate the initial lighting angle based on the road curvature and the current lighting angle of the headlights;
[0133] The second calculation module 54 is used to calculate the lateral offset of the vehicle in the lane based on the position of the center line and the real-time position of the vehicle.
[0134] Adjustment module 55 is used to calculate the headlight angle adjustment coefficient based on the lateral offset and vehicle speed, and adjust the initial illumination angle based on the angle adjustment coefficient to obtain the target illumination angle;
[0135] The control module 56 is used to control the headlights to illuminate according to the target illumination angle.
[0136] This invention provides a lane lighting system based on vehicle visual perception. By determining the centerline position of the curve entrance, it can more accurately understand the vehicle's position and driving trend in the curve, providing a key reference point for adjusting the lighting angle. This ensures that the headlights can illuminate the curve boundary in advance, improving driving safety. By combining the road curvature and the current lighting angle, the initial lighting angle is calculated, ensuring that the headlights can adjust the lighting direction according to the curvature of the road when driving in a curve, avoiding insufficient or excessive lighting 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 with the vehicle speed, the headlight angle adjustment coefficient is calculated. The target lighting angle is obtained by adjusting the angle adjustment coefficient, thereby enabling real-time monitoring of whether the vehicle deviates from the lane centerline. This provides dynamic data support for lighting angle adjustment, ensuring that the headlights can be dynamically adjusted according to the actual driving state of the vehicle. This allows for precise adjustment of the headlight lighting angle in curve scenarios, making it easier for the driver to 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 ways in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0138] In one embodiment, the present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the aforementioned lane lighting method based on vehicle visual perception. The storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0139] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0140] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this specification.
[0141] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A lane lighting method based on vehicle visual perception, characterized in that, include: The road images captured by the vehicle's forward-facing camera are analyzed to obtain analysis results, which include 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, the position of the centerline at the curve entrance is determined. The initial illumination angle is calculated based on the road curvature and the current illumination angle of the headlights; 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. Calculate the headlight angle adjustment coefficient based on the lateral offset and vehicle speed, and adjust the initial illumination angle according to the angle adjustment coefficient to obtain the target illumination angle. Control the headlights to illuminate according to the target illumination angle; The step of calculating the headlight angle adjustment coefficient based on the lateral offset and vehicle speed includes: ; Among them, the The headlight angle adjustment coefficient, the The weighting coefficient for the lateral offset represents the degree of influence of the lateral offset on the angle adjustment. The weighting coefficient for vehicle speed represents the degree to which vehicle speed affects angle adjustment. The lateral offset of the vehicle in the lane, the For vehicle speed; The method of controlling the headlights to illuminate according to the target illumination angle further includes: Acquire the brightness distribution data of the area illuminated by the headlights; The average brightness is calculated based on the brightness distribution data, and the average brightness is divided by the difference between the maximum and minimum brightness to obtain the original brightness uniformity of the illuminated area. Calculate the first target weight coefficient based on the weight coefficient of the lateral offset, the original brightness uniformity, and the target brightness uniformity, and then adjust the weight coefficient of the lateral offset to the first target weight coefficient. and / or The illuminated area is calculated based on the brightness distribution data, and the ratio of the illuminated area to the lane area is calculated to obtain the original coverage ratio of the lane covered by the illuminated area. The second target weight coefficient is calculated based on the weight coefficient of vehicle speed, the original coverage ratio, and the target coverage ratio, and the weight coefficient of vehicle speed is adjusted to the second target weight coefficient.
2. The method according to claim 1, characterized in that, The calculation of the initial illumination angle based on the road curvature and the current illumination angle of the headlights includes: ; Among them, the For the initial illumination angle, the The current illumination angle of the headlight, the The curvature adjustment coefficient, the The curvature of the road.
3. The method according to claim 1, characterized in that, The control of the headlights to illuminate according to the target illumination angle includes: The target illumination brightness is obtained by adjusting the current illumination brightness of the headlights based on the vehicle speed, using the following formula: ; Among them, the For the target illumination brightness, the The current illumination brightness of the headlights, the The vehicle speed adjustment coefficient, the For a vehicle speed greater than a preset speed, the The maximum speed currently allowed on the road; Control the headlights to illuminate according to the target illumination angle and target illumination brightness.
4. The method according to claim 1, characterized in that, The analysis of road images captured by the vehicle's forward-facing camera yields the following results: The road image is converted into a bird's-eye view using perspective transformation. Starting from the bottom of the bird's-eye view, use a sliding window to search for lane line pixels in the image, and find the initial position of the lane line by statistical histogram. Search upwards along the initial position of the lane line to gradually determine the pixel area of the lane line. Polynomial fitting is performed on the pixels in the detected lane lines to obtain the equations for the left and right lane lines. The road curvature of the lane line is calculated based on the coefficients of the polynomial fitting. By comparing the road curvature and direction of the left and right lane lines, it can be determined whether the lane ahead of the vehicle is a curve. When the curvature of the left and right lane lines is greater than the preset curvature and they are in the same direction, the lane type in front of the vehicle is determined to be a curve.
5. The method according to claim 4, characterized in that, The step of calculating the road curvature of the lane line based on the coefficients of the polynomial fitting includes: ; Among them, the For the road curvature, the and These are the coefficients of the polynomial fitting, the... It is the ordinate of the pixel on the lane line.
6. The method according to claim 4, characterized in that, Before converting the road image into a bird's-eye view using perspective transformation, 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.
7. A lane lighting system based on vehicle visual perception, characterized in that, include: The analysis module is used to analyze the road images captured by the vehicle's forward-facing camera and obtain analysis results, including the lane type and road curvature in front of the vehicle. The determination module is used to determine the position of the centerline of the curve entrance when the type of lane in front of the vehicle is identified as a curve. The first calculation module is used to calculate the initial illumination angle based on the road curvature and the current illumination angle of the headlights; The second calculation module is used to calculate the lateral offset of the vehicle in the lane based on the position of the center line and the real-time position of the vehicle. The adjustment module is used to calculate the headlight angle adjustment coefficient based on the lateral offset and vehicle speed, and adjust the initial illumination angle according to the angle adjustment coefficient to obtain the target illumination angle. The control module is used to control the headlights to illuminate according to the target illumination angle; The step of calculating the headlight angle adjustment coefficient based on the lateral offset and vehicle speed includes: ; Among them, the The headlight angle adjustment coefficient, the The weighting coefficient for the lateral offset represents the degree of influence of the lateral offset on the angle adjustment. The weighting coefficient for vehicle speed represents the degree to which vehicle speed affects angle adjustment. The lateral offset of the vehicle in the lane, the For vehicle speed; The method of controlling the headlights to illuminate according to the target illumination angle further includes: Acquire the brightness distribution data of the area illuminated by the headlights; The average brightness is calculated based on the brightness distribution data, and the average brightness is divided by the difference between the maximum and minimum brightness to obtain the original brightness uniformity of the illuminated area. Calculate the first target weight coefficient based on the weight coefficient of the lateral offset, the original brightness uniformity, and the target brightness uniformity, and then adjust the weight coefficient of the lateral offset to the first target weight coefficient. and / or The illuminated area is calculated based on the brightness distribution data, and the ratio of the illuminated area to the lane area is calculated to obtain the original coverage ratio of the lane covered by the illuminated area. The second target weight coefficient is calculated based on the weight coefficient of vehicle speed, the original coverage ratio, and the target coverage ratio, and the weight coefficient of vehicle speed is adjusted to the second target weight coefficient.
8. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it performs the lane lighting method based on vehicle visual perception as described in any one of claims 1 to 6.
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