A method, system, device and medium for detecting a highway lane marking line
By extracting features and adjusting weights from lane images, the accuracy problem of lane marking detection under low light conditions was solved, achieving high reliability and high accuracy of lane marking detection in low-light environments and reducing the risk of traffic accidents.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2026-03-31
AI Technical Summary
In low-light conditions, lane markings are difficult to identify accurately, leading to misjudgments or the inability to obtain accurate lane information in a timely manner, increasing the risk of traffic accidents.
By preprocessing the lane image, extracting the color, texture, and edge features of each pixel, adjusting the weight ratio of the feature vector based on the illumination intensity information, and performing binarization based on the weighted average and the optimal threshold, the accuracy and robustness of detection are improved.
In low-light conditions, it can more accurately detect lane markings, providing drivers with accurate lane information and reducing the risk of traffic accidents.
Smart Images

Figure CN117115771B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, system, device and medium for detecting highway lane markings. Background Technology
[0002] With the rapid economic development and rising living standards in recent years, the number of vehicles on the road has increased dramatically, and people are paying more and more attention to vehicle safety. Statistics show that approximately 50% of traffic accidents each year are caused by vehicles deviating from their lanes, making research into driver assistance technologies (ADAS) extremely valuable. Lane marking detection, as a crucial component, plays a vital role in the development of ADAS.
[0003] Currently, in low-light environments, such as at night or under adverse weather conditions, lane markings may become indistinguishable, potentially leading to misjudgments or the inability to obtain accurate lane information in a timely manner. This can affect drivers' driving decisions and increase the risk of traffic accidents. Summary of the Invention
[0004] To improve the detection accuracy of lane markings under low light conditions, this application provides a method, system, equipment, and medium for detecting highway lane markings.
[0005] Firstly, this application provides a method for detecting highway lane markings, employing the following technical solution:
[0006] A method for detecting highway lane markings, the method comprising:
[0007] Real-time acquisition of images of the highway lanes to be detected;
[0008] Image preprocessing is performed on the highway lane image to be detected;
[0009] Feature extraction is performed on each pixel in the preprocessed highway lane image to obtain a feature vector for each pixel; wherein, the feature vector includes color features, texture features and edge features;
[0010] Obtain the illumination intensity information of the highway lane image;
[0011] Determine the preset weight ratio between each feature vector based on the light intensity information;
[0012] Based on a preset weight ratio, a weighted average is calculated according to the feature vector of each pixel to obtain the comprehensive feature value of each pixel.
[0013] The optimal threshold is determined based on the comprehensive feature value of each pixel;
[0014] The preprocessed highway lane image is binarized according to the optimal threshold to obtain the lane marking detection result image.
[0015] By adopting the above technical solution, in low-light environments, the color, texture, and edge features of each pixel can be extracted to detect lane markings by utilizing the color and texture differences between lane markings and the surrounding environment. This also allows for better capture of lane marking edge information. Furthermore, by setting preset weight values for each feature vector based on the current ambient light intensity, and by determining the weighted average of the preset weight ratios and the optimal threshold, the system can more accurately adapt to the lane marking detection needs in low-light environments, improving the reliability and accuracy of detection. This provides drivers with accurate lane information and reduces the risk of traffic accidents.
[0016] Optionally, the image preprocessing step for the highway lane image to be detected includes:
[0017] Gaussian filtering is applied to the highway lane image;
[0018] The Gaussian-filtered image is then subjected to histogram equalization.
[0019] The histogram-equalized image is then enhanced at multiple scales to obtain a preprocessed highway lane image.
[0020] By adopting the above technical solution, image preprocessing operations such as filtering, denoising, and enhancement are performed on the highway lane image to be detected, so as to obtain the best image quality and feature highlighting effect, which makes it easier to capture the feature vector of lane marking lines more comprehensively and accurately.
[0021] Optionally, the step of determining the preset weight ratio between each feature vector based on the illumination intensity information includes:
[0022] The light intensity information is mapped to a range of 0-1 to obtain a grayscale correction factor;
[0023] The initial weight ratios between each feature vector are pre-configured, where the initial weight ratios include the ratios of the initial weight values of color features, texture features, and edge features;
[0024] The initial weight values of color features in the initial weight ratio are adjusted according to the grayscale correction factor to obtain the preset weight ratio.
[0025] By adopting the above technical solution, under strong light conditions, color features may become less reliable due to the influence of light intensity; therefore, reducing their weight can reduce their impact on the results. Conversely, under weak light conditions, color features may become more prominent and important; therefore, increasing their weight can enhance their impact on the results. Adaptively adjusting the weight of color features according to changes in light intensity can better meet the lane marking detection needs under different lighting conditions, thereby improving the accuracy and robustness of detection.
[0026] Optionally, the step of obtaining the comprehensive feature value of each pixel by performing a weighted average based on the feature vector of each pixel according to a preset weight ratio includes:
[0027] Based on the feature vector of each pixel, determine the color feature value, texture feature value, and edge feature value respectively;
[0028] Based on the preset weight ratio, the comprehensive feature value of each pixel is obtained according to the color feature value, texture feature value, and edge feature value:
[0029] Overall feature value = W1 * color feature value + W2 * texture feature value + W3 * edge feature value;
[0030] Where W1 represents the preset weight value corresponding to the color feature, W2 represents the preset weight value corresponding to the texture feature, and W3 represents the preset weight value corresponding to the edge feature.
[0031] By adopting the above technical solution, multiple feature information such as color features, texture features and edge features are integrated, and the feature values of each feature vector are weighted and averaged. The accuracy and robustness of lane marking detection are improved through multimodal feature information.
[0032] Optionally, the step of determining the optimal threshold based on the comprehensive feature value of each pixel includes:
[0033] Based on the comprehensive feature value of each pixel, the average feature value of the comprehensive feature values of all pixels in the highway lane image is obtained;
[0034] Based on the average feature value, the optimal threshold is obtained as follows:
[0035] The optimal threshold t = argmax_t{∑(t-comprehensive eigenvalue_i)^2 / ∑(t-average eigenvalue)^2};
[0036] Wherein, the comprehensive feature value_i represents the comprehensive feature value of the i-th pixel in the highway lane image, the average feature value represents the average value of the comprehensive feature values of all pixels in the highway lane image, and t represents the optimal threshold.
[0037] By adopting the above technical solution, and comprehensively considering multimodal features such as color, texture and edge features, the optimal threshold is determined to facilitate image binarization, thereby realizing the detection and extraction of lane marking lines.
[0038] Optionally, after obtaining the lane marking detection result image, the following may also be included:
[0039] Post-processing is performed on the lane marking detection result image;
[0040] The post-processed lane marking detection result image is sent to the vehicle terminal.
[0041] By adopting the above technical solution, the lane marking detection result image can be post-processed to clarify the lane markings and send them to the vehicle terminal to provide the driver with accurate lane information in real time, thereby helping the driver to judge the vehicle's driving status and improving driving safety.
[0042] Secondly, this application provides a highway lane marking detection system, which adopts the following technical solution:
[0043] A highway lane marking detection system, the detection system comprising:
[0044] The image acquisition module is used to acquire images of the highway lanes to be detected in real time.
[0045] The preprocessing module is used to perform image preprocessing on the highway lane image to be detected;
[0046] The feature extraction module is used to extract features from each pixel in the preprocessed highway lane image to obtain a feature vector for each pixel; wherein, the feature vector includes color features, texture features and edge features;
[0047] The illumination intensity acquisition module is used to acquire the illumination intensity information of the highway lane image;
[0048] A preset weight ratio determination module is used to determine the preset weight ratio between each feature vector based on the light intensity information;
[0049] The comprehensive feature value generation module is used to perform a weighted average based on the feature vector of each pixel according to a preset weight ratio to obtain the comprehensive feature value of each pixel.
[0050] The optimal threshold determination module is used to determine the optimal threshold based on the comprehensive feature value of each pixel.
[0051] The detection result image generation module is used to perform binarization processing on the preprocessed highway lane image according to the optimal threshold to obtain the lane marking line detection result image.
[0052] By adopting the above technical solution, in low-light environments, the color, texture, and edge features of each pixel can be extracted to detect lane markings by utilizing the color and texture differences between lane markings and the surrounding environment. This also allows for better capture of lane marking edge information. Furthermore, by setting preset weight values for each feature vector based on the current ambient light intensity, and by determining the weighted average of the preset weight ratios and the optimal threshold, the system can more accurately adapt to the lane marking detection needs in low-light environments, improving the reliability and accuracy of detection. This provides drivers with accurate lane information and reduces the risk of traffic accidents.
[0053] Optionally, the detection system further includes:
[0054] The post-processing module is used to perform image post-processing on the lane marking detection result image;
[0055] The detection result image sending module is used to send the post-processed lane marking detection result image to the vehicle terminal.
[0056] By adopting the above technical solution, the lane marking detection result image can be post-processed to clarify the lane markings and send them to the vehicle terminal to provide the driver with accurate lane information in real time, thereby helping the driver to judge the vehicle's driving status and improving driving safety.
[0057] Thirdly, this application provides a computer device, which adopts the following technical solution:
[0058] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in the first aspect.
[0059] Fourthly, this application provides a computer-readable storage medium, which adopts the following technical solution:
[0060] A computer-readable storage medium storing a computer program that can be loaded by a processor and executed as in any of the methods in the first aspect.
[0061] In summary, this application includes at least one of the following beneficial technical effects:
[0062] 1. In low-light environments, by extracting the color, texture, and edge features of each pixel, lane markings can be detected using the color and texture differences between them and the surrounding environment. This also allows for better capture of the edge information of lane markings. Furthermore, by setting preset weight values for each feature vector based on the current ambient light intensity, and by determining the weighted average of the preset weight ratios and the optimal threshold, lane marking detection can be more accurately adapted to low-light conditions, improving reliability and accuracy. This provides drivers with accurate lane information and reduces the risk of traffic accidents.
[0063] 2. By adaptively adjusting the weight of color features according to changes in light intensity, the detection requirements of lane markings under different lighting conditions can be better met, thereby improving the accuracy and robustness of detection. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of the first process of a highway lane marking detection method according to one embodiment of this application.
[0065] Figure 2 This is a second flowchart illustrating a highway lane marking detection method according to one embodiment of this application.
[0066] Figure 3 This is a schematic diagram of the third process of a highway lane marking detection method according to one embodiment of this application.
[0067] Figure 4 This is a schematic diagram of the fourth process of a highway lane marking detection method according to one embodiment of this application. Detailed Implementation
[0068] To make the purpose, technical solution, and advantages of this application clearer, the following description is provided in conjunction with the appendix. Figure 1-4 The present application will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the application.
[0069] This application discloses a method for detecting highway lane markings.
[0070] Reference Figure 1 A method for detecting highway lane markings, the method comprising:
[0071] Step S101: Acquire images of the highway lanes to be detected in real time;
[0072] Among them, highway lane images can be obtained in real time through cameras on vehicles;
[0073] Step S102: Perform image preprocessing on the highway lane image to be detected;
[0074] Among them, image preprocessing can make lane markings more obvious, making it easier to capture the feature vectors of lane markings comprehensively and accurately.
[0075] Step S103: Extract features from each pixel in the preprocessed highway lane image to obtain a feature vector for each pixel; wherein, the feature vector includes color features, texture features and edge features;
[0076] In some embodiments, the color features of lane markings can be extracted by calculating the color distribution of pixels in an image, such as the mean and variance. In some embodiments, the RGB values of pixels can be used for calculation, the RGB values of pixels can be converted into grayscale values, and then the mean and standard deviation of the grayscale values can be calculated to reflect the color features of the image.
[0077] In low-light conditions, the color of lane markings may become blurred or indistinct due to the limitations of light conditions; by extracting color features, the color difference between lane markings and the surrounding environment can be better distinguished, thereby enhancing the accuracy of detection.
[0078] In some embodiments, texture features can be extracted using methods such as wavelet transform and Gabor filter, such as texture contrast and entropy, to reflect the texture features of the image; edge features can be extracted by detecting edges in the image, such as Canny operator and Sobel operator, to extract the edge features of lane markings, such as the gradient magnitude and direction of the edge.
[0079] In low-light environments, the texture of lane markings may become blurred or unclear due to lighting conditions. By extracting texture features, the difference in texture between lane markings and the surrounding environment can be used for detection, thereby improving the robustness of the detection.
[0080] In low-light conditions, the edges of lane markings may become blurred or indistinct; by extracting edge features, the edge information of lane markings can be better captured, thereby enhancing the accuracy of detection.
[0081] Step S104: Obtain the illumination intensity information of the highway lane image;
[0082] The average gray value of the image can be calculated to represent the light intensity. A higher average gray value indicates stronger light, while a lower average gray value indicates weaker light.
[0083] Step S105: Determine the preset weight ratio between each feature vector based on the light intensity information;
[0084] The preset weight ratio includes the ratio of preset weight values for color features, texture features, and edge features. The preset weight value of each feature vector is set according to the current ambient light intensity information, which can more accurately adapt to the lane marking detection needs under low light conditions and improve the robustness and accuracy of detection.
[0085] In one embodiment of this application, after obtaining the light intensity information, the weight ratio can be preset in combination with experimental data or experience; for example, under weak light, color features may become more obvious and prominent, so the weight of color features can be increased and the weight of texture and edge features can be reduced, thereby making better use of color information to detect lane markings.
[0086] Step S106: Based on the preset weight ratio, perform a weighted average of the feature vectors of each pixel to obtain the comprehensive feature value of each pixel.
[0087] Among them, the comprehensive feature value is an abstract representation of the features of each pixel in the image, which integrates multiple feature information such as color, texture and edge; by utilizing the multimodal feature information in the image, the accuracy and robustness of lane marking detection can be improved.
[0088] Step S107: Determine the optimal threshold based on the comprehensive feature value of each pixel;
[0089] The optimal threshold is a key parameter used in image processing and computer vision for tasks such as binarization and segmentation. It represents the boundary line that divides pixels in an image into two different categories. In the lane marking detection process of this application, the optimal threshold can be used to distinguish between lane marking areas and non-lane marking areas.
[0090] Specifically, the optimal threshold is to select a value within the range of image pixel values (usually 0-255), classify pixels with pixel values greater than the threshold into one category, such as lane marking areas, and classify pixels with pixel values less than the threshold into another category, such as non-lane marking areas.
[0091] Step S108: Binarize the preprocessed highway lane image according to the optimal threshold to obtain the lane marking detection result image.
[0092] The binarization process results in a binary image containing only lane markings and non-lane markings. Therefore, the lane marking detection result image is a highway lane image marked with both lane markings and non-lane markings.
[0093] In one embodiment of this application, regions in the image where the pixel value is greater than the optimal threshold can be marked in white to represent lane markings; regions where the pixel value is less than the optimal threshold can be marked in black to represent non-lane markings.
[0094] In the above embodiments, under low-light conditions, by extracting the color features, texture features, and edge features of each pixel, the lane markings can be detected using the color and texture differences between the lane markings and the surrounding environment. This also allows for better capture of the lane markings' edge information. Furthermore, by setting preset weight values for each feature vector based on the current ambient light intensity, and by determining the weighted average of the preset weight ratios and the optimal threshold, the system can more accurately adapt to the lane marking detection needs under low-light conditions, improving the reliability and accuracy of detection. This provides drivers with accurate lane information and reduces the risk of traffic accidents.
[0095] Reference Figure 2 As one implementation of step S102, the step of image preprocessing of the highway lane image to be detected includes:
[0096] Step S1021: Perform Gaussian filtering on the highway lane image;
[0097] Gaussian filtering can be used to smooth images to remove noise.
[0098] Step S1022: Perform histogram equalization on the Gaussian filtered image;
[0099] Histogram equalization is used to enhance image contrast, making lane markings more visible.
[0100] Step S1023: Perform multi-scale enhancement on the histogram equalized image to obtain the preprocessed highway lane image.
[0101] Among these methods, multi-scale image enhancement algorithms (such as wavelet transform and pyramid methods) can be used to enhance the details and features of images at different scales, thereby helping to capture multi-scale information of lane markings, such as edge and texture information.
[0102] In the above embodiments, image preprocessing operations such as filtering, denoising, and enhancement are performed on the highway lane image to be detected in order to obtain the best image quality and feature prominence effect, so as to capture the feature vector of the lane marking line more comprehensively and accurately.
[0103] Reference Figure 3 As one implementation of step S105, the step of determining the preset weight ratio between each feature vector based on the light intensity information includes:
[0104] Step S1051: Map the light intensity information to the range of 0-1 to obtain the grayscale correction factor;
[0105] Among them, the grayscale correction factor is a weight value related to the light intensity, which is used to adjust the weight of color features and maps the average grayscale value to the range of 0-1 as the grayscale correction factor.
[0106] In some embodiments, for example, assuming the light intensity range is 0-255, the grayscale correction factor can be calculated using the following formula: Grayscale correction factor = 255 / average grayscale value.
[0107] Step S1052: Pre-configure the initial weight ratio between each feature vector; wherein, the initial weight ratio includes the ratio of the initial weight values of color features, texture features and edge features;
[0108] It should be noted that the initial weight values of each feature vector can be preset according to the actual situation, combined with historical experimental data or experience;
[0109] Step S1053: Adjust the initial weight value of the color feature in the initial weight ratio according to the grayscale correction factor to obtain the preset weight ratio.
[0110] In one embodiment of this application, after obtaining the grayscale correction factor, the initial weight value of the color feature can be multiplied by the grayscale correction factor to obtain the preset weight value of the color feature. The initial weight values of the texture feature and the edge feature can remain unchanged and be directly used as the preset weight value to increase or decrease the contribution of the color feature to the comprehensive feature value.
[0111] In the above embodiments, under strong light, color features may become less reliable due to the influence of light intensity; therefore, reducing their weight can reduce their impact on the results. Conversely, under weak light, color features may become more prominent and important; therefore, increasing their weight can enhance their impact on the results. Adaptively adjusting the weight of color features according to changes in light intensity can better meet the lane marking detection needs under different lighting conditions, thereby improving detection accuracy and robustness.
[0112] As one implementation of step S106, the step of obtaining the comprehensive feature value of each pixel by performing a weighted average based on the feature vector of each pixel according to a preset weight ratio includes:
[0113] Step S1061: Determine the color feature value, texture feature value, and edge feature value based on the feature vector of each pixel.
[0114] Color features can be represented by the grayscale value of a pixel; texture features can be extracted using methods such as wavelet transform and Gabor filter, such as texture contrast and entropy; edge features can be detected using operators such as Canny and Sobel to detect the edge features of lane markings, such as the gradient magnitude and direction of the edge.
[0115] Step S1062: Based on a preset weight ratio, the comprehensive feature value of each pixel is obtained according to the color feature value, texture feature value, and edge feature value:
[0116] Overall feature value = W1 * color feature value + W2 * texture feature value + W3 * edge feature value;
[0117] Where W1 represents the preset weight value corresponding to the color feature, W2 represents the preset weight value corresponding to the texture feature, and W3 represents the preset weight value corresponding to the edge feature.
[0118] In the above implementation, multiple feature information such as color features, texture features and edge features are integrated, and the feature values of each feature vector are weighted and averaged. The accuracy and robustness of lane marking detection are improved by using multimodal feature information.
[0119] As one implementation of step S107, the step of determining the optimal threshold based on the comprehensive feature value of each pixel includes:
[0120] Step S1071: Based on the comprehensive feature value of each pixel, obtain the average feature value of the comprehensive feature values of all pixels in the highway lane image;
[0121] Step S1072, based on the average feature value, the optimal threshold is obtained as follows:
[0122] The optimal threshold t = argmax_t{∑(t-comprehensive eigenvalue_i)^2 / ∑(t-average eigenvalue)^2};
[0123] Wherein, the comprehensive feature value _i represents the comprehensive feature value of the i-th pixel in the highway lane image, the average feature value represents the average value of the comprehensive feature values of all pixels in the highway lane image, and t represents the optimal threshold.
[0124] It should be noted that the argmax_t function is used to return the t value that maximizes the expression, which is the optimal threshold. This optimal threshold can make the distribution of pixels in different regions of the highway lane image to be detected as uniform as possible.
[0125] In the above implementation, multimodal features such as color, texture and edge features are comprehensively considered to determine the optimal threshold to facilitate image binarization, thereby realizing the detection and extraction of lane markings.
[0126] Reference Figure 4 As a further implementation of the detection method, after obtaining the lane marking detection result image in step S108, the method further includes:
[0127] Step S109: Perform image post-processing on the lane marking detection result image;
[0128] Image post-processing includes operations such as removing isolated points, removing small regions, filling holes, connecting broken parts, and refining edges to improve image quality, thereby enabling a more accurate representation of the position and shape of lane markings.
[0129] Step S110: Send the post-processed lane marking detection result image to the vehicle terminal.
[0130] Among them, the information sent to the vehicle terminal can provide lane information to the driver and assist the driver in driving.
[0131] In the above embodiments, post-processing of the lane marking detection result image can clarify the lane markings and send them to the vehicle terminal to provide the driver with accurate lane information in real time, thereby helping the driver to judge the vehicle's driving status and improving driving safety.
[0132] This application also discloses a highway lane marking detection system.
[0133] A highway lane marking detection system, the detection system includes:
[0134] The image acquisition module is used to acquire images of the highway lanes to be detected in real time.
[0135] The preprocessing module is used to preprocess the images of the highway lanes to be detected.
[0136] The feature extraction module is used to extract features from each pixel in the preprocessed highway lane image to obtain a feature vector for each pixel; the feature vector includes color features, texture features and edge features.
[0137] The illumination intensity acquisition module is used to acquire illumination intensity information of highway lane images;
[0138] The preset weight ratio determination module is used to determine the preset weight ratio between each feature vector based on the light intensity information.
[0139] The comprehensive feature value generation module is used to perform a weighted average based on the feature vector of each pixel according to a preset weight ratio to obtain the comprehensive feature value of each pixel.
[0140] The optimal threshold determination module is used to determine the optimal threshold based on the comprehensive feature value of each pixel.
[0141] The detection result image generation module is used to binarize the preprocessed highway lane image according to the optimal threshold to obtain the lane marking detection result image.
[0142] In the above embodiments, the determination of the weighted average based on the preset weight ratio and the optimal threshold can more accurately adapt to the lane marking detection needs in low-light environments, improve the reliability and accuracy of detection, thereby providing drivers with accurate lane information and reducing the risk of traffic accidents.
[0143] As a further implementation of the highway lane marking detection system, the detection system also includes:
[0144] The post-processing module is used to perform image post-processing on the lane marking detection result image;
[0145] The detection result image sending module is used to send the post-processed lane marking detection result image to the vehicle terminal.
[0146] In the above embodiments, the lane marking detection result image is post-processed and sent to the vehicle terminal to provide the driver with accurate lane information in real time, thereby helping the driver to judge the vehicle's driving status and improving driving safety.
[0147] The highway lane marking detection system of this application embodiment can implement any of the above-described highway lane marking detection methods, and the specific working process of each module in the highway lane marking detection system can be referred to the corresponding process in the above-described method embodiments.
[0148] In the several embodiments provided in this application, it should be understood that the provided methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for example, the division of a certain module is merely a logical functional division, and in actual implementation there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0149] This application also discloses a computer device.
[0150] A computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the highway lane marking detection method described above.
[0151] This application also discloses a computer-readable storage medium.
[0152] A computer-readable storage medium storing a computer program that can be loaded by a processor and executed as any of the methods described above for detecting highway lane markings.
[0153] The computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device; the program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0154] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0155] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.
Claims
1. A method of detecting a highway lane marking line, characterized by, The detection method comprises: real-time acquisition of a highway lane image to be detected; image preprocessing of the highway lane image to be detected; feature extraction of each pixel point on the preprocessed highway lane image to obtain a feature vector of each pixel point; wherein the feature vector comprises color features, texture features and edge features; acquisition of illumination intensity information of the highway lane image; determination of a preset weight ratio between the feature vectors according to the illumination intensity information; weighted average of the feature vectors of each pixel point based on the preset weight ratio to obtain a comprehensive feature value of each pixel point; determination of an optimal threshold value according to the comprehensive feature value of each pixel point; binaryzation of the preprocessed highway lane image according to the optimal threshold value to obtain a lane marking line detection result image; The step of determining the optimal threshold value according to the comprehensive feature value of each pixel point comprises: obtaining an average feature value of the comprehensive feature values of all pixel points in the highway lane image according to the comprehensive feature value of each pixel point; based on the average feature value, the optimal threshold value is: optimal threshold t = argmax_t {∑(t-comprehensive feature value_i)^2 / ∑(t-average feature value)^2}; wherein comprehensive feature value_i represents the comprehensive feature value of the i-th pixel point in the highway lane image, average feature value represents the average value of the comprehensive feature values of all pixel points in the highway lane image, and t represents the optimal threshold value.
2. The method of claim 1, wherein, The step of image preprocessing of the highway lane image to be detected comprises: Gaussian filtering of the highway lane image; histogram equalization of the Gaussian filtered image; multi-scale enhancement of the histogram equalized image to obtain the preprocessed highway lane image.
3. The method of claim 1, wherein, The step of determining the preset weight ratio between the feature vectors according to the illumination intensity information comprises: mapping the illumination intensity information to the range of 0-1 to obtain a gray correction factor; pre-configuring an initial weight ratio between the feature vectors, wherein the initial weight ratio comprises a ratio of initial weight values of color features, texture features and edge features; adjusting the initial weight value of the color features in the initial weight ratio according to the gray correction factor to obtain the preset weight ratio.
4. The method of claim 3, wherein The step of weighted average of the feature vectors of each pixel point based on the preset weight ratio to obtain the comprehensive feature value of each pixel point comprises: determining color feature values, texture feature values and edge feature values respectively according to the feature vectors of each pixel point; based on the preset weight ratio, the comprehensive feature value of each pixel point is obtained according to the color feature value, the texture feature value and the edge feature value as: comprehensive feature value = W1*color feature value + W2*texture feature value + W3*edge feature value; wherein W1 represents the preset weight value corresponding to the color features, W2 represents the preset weight value corresponding to the texture features, and W3 represents the preset weight value corresponding to the edge features.
5. A method of detecting a highway lane marking line according to any one of claims 1 to 4, characterized in that, After obtaining the lane marking line detection result image, it further comprises: image post-processing of the lane marking line detection result image; The post-processed lane mark line detection result image is sent to a vehicle terminal.
6. A highway lane marking line detection system characterized by, The detection system comprises: An image acquisition module is configured to acquire a highway lane image to be detected in real time. A preprocessing module is configured to perform image preprocessing on the highway lane image to be detected. A feature extraction module is configured to perform feature extraction on each pixel point on the preprocessed highway lane image to obtain a feature vector of each pixel point, wherein the feature vector comprises color features, texture features and edge features. An illumination intensity acquisition module is configured to acquire illumination intensity information of the highway lane image. A preset weight ratio determination module is configured to determine a preset weight ratio between the feature vectors according to the illumination intensity information. A comprehensive feature value generation module is configured to perform weighted averaging on the feature vectors of each pixel point based on the preset weight ratio to obtain a comprehensive feature value of each pixel point. A best threshold determination module is configured to determine a best threshold value according to the comprehensive feature value of each pixel point, wherein an average feature value of the comprehensive feature values of all pixel points in the highway lane image is obtained according to the comprehensive feature value of each pixel point, and the best threshold value is obtained based on the average feature value, that is, best threshold value t = argmax_t{∑(t-comprehensive feature value_i)^2 / ∑(t-average feature value)^2}, wherein comprehensive feature value_i represents the comprehensive feature value of the i-th pixel point in the highway lane image, average feature value represents the average value of the comprehensive feature values of all pixel points in the highway lane image, and t represents the best threshold value. A detection result image generation module is configured to perform binaryzation processing on the preprocessed highway lane image according to the best threshold value to obtain a lane mark line detection result image.
7. A highway lane marking line detection system according to claim 6, wherein The detection system further comprises: A post-processing module is configured to perform image post-processing on the lane mark line detection result image. A detection result image sending module is configured to send the post-processed lane mark line detection result image to a vehicle terminal.
8. A computer device, comprising: It comprises: A memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method of any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer program stored in the memory can be loaded and executed by the processor to implement the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Lane line recognition method and device, storage medium and electronic equipment
CN112418187A
Vehicle and lane mark recognition apparatus
US20090123065A1