An Autonomous Driving Method for Smart Cars Based on Image Processing and Machine Learning

The intelligent vehicle autonomous driving method, which combines Bézier curve fitting and binarized lane contour retrieval with a deep learning framework, solves the generalization ability and stability problems of traditional models, improves the efficiency of AI solutions, reduces hardware costs, and realizes efficient autonomous driving of intelligent vehicles.

CN117132963BActive Publication Date: 2025-11-14BEIJING SAISHU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311093631.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-11-14
Estimated Expiration
2043-08-29

AI Technical Summary

Technical Problem

Traditional image processing and control models have poor generalization ability and low stability in autonomous driving of intelligent vehicles, while relying solely on AI solutions is time-consuming and costly.

Method used

Lane line detection is performed using Bézier curve fitting and binary lane contour retrieval. A target detection AI model is built using a deep learning framework to recognize traffic signs. Intelligent vehicle control is achieved through traditional vector PID and position PID algorithms.

Benefits of technology

It achieves efficient and accurate lane line detection and traffic sign recognition, improves the generalization ability and stability of autonomous driving for intelligent vehicles, and reduces hardware costs and computational burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117132963B_ABST
    Figure CN117132963B_ABST
Patent Text Reader

Abstract

This invention provides an autonomous driving method for intelligent vehicles based on image processing and machine learning, comprising: lane line detection based on Bézier curve fitting and binarized lane contour retrieval; building an object detection AI model based on a deep learning framework and deploying it to the intelligent vehicle for traffic sign recognition; lane condition detection based on lane line information and traffic sign information; and intelligent vehicle control based on corresponding logical analysis of lane line information and lane condition information. The autonomous driving method for intelligent vehicles based on image processing and machine learning provided by this invention can achieve autonomous driving control of intelligent vehicles, solving both the problems of poor generalization ability and low stability of traditional image processing and control models, and the time-consuming and costly problems of relying solely on AI solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous driving technology, and in particular to an autonomous driving method for intelligent vehicles based on image processing and machine learning. Background Technology

[0002] As people's demands for traffic safety, comfort, and efficiency increase, the development of autonomous driving technology has become increasingly important, emerging as a hot area for the application of artificial intelligence. Against this backdrop, intelligent vehicles for competitions have become a key platform for driving innovation and progress in autonomous driving technology. With continuous technological advancements and innovation, intelligent vehicles have evolved from simple online simulations into comprehensive technological products encompassing offline physical experiments, intelligent algorithm design, sensor system optimization, and hardware engineering. These competitions primarily assess the vehicle's intelligence level and the quality of its algorithms, including image recognition, motion planning, and path planning. Designers need to fully consider factors such as the vehicle's dynamic parameters and changes in road conditions to ensure efficient operation.

[0003] Currently, most intelligent vehicles still employ traditional image processing and control models. On one hand, traditional models rely heavily on manual feature extraction and rule construction to optimize and process target tasks. These methods are easily affected by input patterns and domain variations, leading to insufficient generalization and sustainability. On the other hand, algorithms based on traditional control theory tend to treat the physical system as a fixed system for research and modeling. When facing complex and nonlinear physical systems, their stability and accuracy are significantly limited, and they struggle to flexibly respond to system and environmental changes. However, in recent years, the rise of technologies such as machine learning has brought new ideas and methods to the field of intelligent vehicle image processing and control. These algorithms, characterized by data-driven approaches, high precision, and high efficiency, help intelligent vehicles quickly transmit information, make decisions, and provide real-time feedback—key functions. Compared to traditional control algorithms, these new technologies also have greater advantages in generalization and adaptability, addressing the shortcomings of traditional models in various scenarios and providing better solutions for future intelligent vehicle control. Therefore, designing an autonomous driving method for intelligent vehicles based on image processing and machine learning is essential. Summary of the Invention

[0004] The purpose of this invention is to provide an intelligent vehicle autonomous driving method based on image processing and machine learning, which can realize the autonomous driving control of intelligent vehicles. It solves the problems of poor generalization ability and low stability of traditional image processing and control models, as well as the problems of time consumption and high cost of relying solely on AI solutions.

[0005] An autonomous driving method for smart cars based on image processing and machine learning includes the following steps:

[0006] Step 1: Lane line detection is performed based on Bézier curve fitting and binarized lane contour retrieval;

[0007] Step 2: Build an object detection AI model based on a deep learning framework and deploy it to a smart car to perform traffic sign recognition and lane condition detection based on lane line information and traffic sign information;

[0008] Step 3: The intelligent vehicle performs corresponding logical analysis based on lane line information and lane condition information to control the vehicle.

[0009] Optionally, in step 1, lane line detection is performed based on Bézier curve fitting and binarized lane contour retrieval, including the following steps:

[0010] Step 101: Acquire the road image and preprocess it, converting the original image into a black and white binarized image;

[0011] Step 102: Extract edges from the black and white binarized image based on the Candy visual contour extraction algorithm;

[0012] Step 103: Perform dynamic image segmentation of the drivable vehicle area based on the OpenCV-FloodFill algorithm;

[0013] Step 104: Lane line detection based on AreaBlocks area planning algorithm.

[0014] Optionally, in step 101, a road image is acquired and preprocessed to convert the original image into a black-and-white binary image, specifically:

[0015] Real-time road images are acquired using a color camera mounted on the vehicle body. Camera distortion coefficients are calibrated and image distortion correction is performed based on the OpenCV toolchain and Zhang Zhengyou calibration method to restore the true pixel image of the road. Salt-and-pepper noise and deblurring of the restored original image are filtered using a Gauss filter. Black and white binarized images are extracted based on the USTC probability histogram method, and the original image is converted into a black and white binarized image.

[0016] Optionally, in step 102, edge extraction is performed on the black and white binarized image based on the Candy visual contour extraction algorithm, specifically as follows:

[0017] By applying the Sobel operator to calculate the magnitude and direction of the image gradient, refining the edges using a non-maximum suppression strategy while preserving their elongated nature, and using a dual threshold algorithm to classify edge pixels into strong edges, weak edges, and non-edge pixels based on set high and low thresholds, and using a connection algorithm to form edge connected regions starting from strong edge pixels and along weak edge pixels connected to strong edges, edge information of road conditions is extracted from the black and white binarized image.

[0018] Optionally, in step 103, dynamic image segmentation of the drivable area is performed based on the OpenCV-FloodFill algorithm, specifically as follows:

[0019] Create a mask image of the same size as the input black-and-white binary image and initialize it to all zeros. Randomly select a seed point as the starting point and set the pixel value of the corresponding position in the mask image to 255, i.e., white. Use this as the starting point for the flooding algorithm to expand. Use OpenCV's floodFill function to perform flooding. Set the parameters of the floodFill function, including the input image, mask image, seed point, fill color or intensity range, and related parameters. Call the floodFill function to perform the flooding operation. Based on the filled mask image, extract the driveable region, which is the connected region connected to the seed point. The filled pixels in the driveable region are all marked as white.

[0020] Optionally, in step 104, lane line detection is performed based on the AreaBlocks area planning algorithm, specifically as follows:

[0021] Starting from the middle pixel of the lowest row of the image, similar consecutive pixels in that row are divided into connected regions, or blocks, based on the probability distribution of the gray-level histogram. Using a breadth-first search strategy, the connected regions of each row are completely searched, and their starting coordinates are recorded. Based on the midpoint coordinates of the first row's connected region, the search moves upwards to retrieve the block with the nearest center coordinates of the connected regions in adjacent rows as the effective pixel region of that row. When multiple rows of unconnected regions appear consecutively, or when the center coordinates of the blocks do not satisfy the historical least squares regression function, the effective path search for the current image is completed. Finally, the Bezier third-order fitting algorithm is used to fit the starting and ending coordinate distributions of the unique block pixel regions in each row to obtain the left and right lane lines.

[0022] Optionally, in step 2, an object detection AI model is built based on a deep learning framework and deployed to the intelligent vehicle for traffic sign recognition. Lane condition detection is performed based on lane line information and traffic sign information. Specifically:

[0023] The lane line information is converted to a top-down perspective using OpenCV's perspective transformation method.

[0024] In the top-down perspective, lane condition recognition and intersection information detection are performed in complex scenarios by combining lane line information, path segmentation information, and traffic sign information recognized by the SSD object detection model.

[0025] A state machine was built, and the Bezier fitting method was used to refit and correct the lane lines under different conditions.

[0026] For complex intersections and traffic scenarios where lane lines are obscured, the MovingWindows algorithm is introduced to predict the position of the actual lane lines.

[0027] The mean-weighted method and the Bezier fitting method are used to fit the driving path of the lane line, and the control quantity is calculated by the weighted method.

[0028] Optionally, in step 3, the intelligent vehicle performs corresponding logical analysis based on lane line information and lane condition information to control the vehicle, specifically as follows:

[0029] Intelligent vehicles use traditional vector PID and position PID algorithms to complete closed-loop control of vehicle speed and direction based on lane line information and lane condition information.

[0030] According to specific embodiments provided by the present invention, the following technical effects are disclosed: The intelligent vehicle autonomous driving method based on image processing and machine learning provided by the present invention includes lane line detection based on Bezier curve fitting and binarized lane contour retrieval, building an object detection AI model based on a deep learning framework and deploying it to the intelligent vehicle for traffic sign recognition, lane condition detection based on lane line information and traffic sign information, and intelligent vehicle control based on corresponding logical analysis of lane line information and lane condition information. This method effectively and accurately achieves lane line detection targets using the traditional CV processing method of Bezier curve fitting + binarized lane contour retrieval (LaneDet). At the same time, an SSD-Mobilenet object detection AI model is designed to process complex traffic roads and traffic sign information. Finally, the processing results of the two computing models are integrated for vehicle autonomous driving control. This method not only solves the problems of poor generalization ability and low stability of traditional image processing and control models, but also improves the problems of low efficiency (time consumption) and high hardware cost (computing power) of purely AI-based solutions. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram of the autonomous driving method for intelligent vehicles based on image processing and machine learning, according to an embodiment of the present invention.

[0033] Figure 2 This is an architecture diagram of an intelligent vehicle autonomous driving method based on image processing and machine learning, according to an embodiment of the present invention.

[0034] Figure 3 A flowchart of a traditional image lane line recognition method;

[0035] Figure 4 The flowchart shows the garage identification method. Detailed Implementation

[0036] The purpose of this invention is to provide an intelligent vehicle autonomous driving method based on image processing and machine learning, which can realize the autonomous driving control of intelligent vehicles. It solves the problems of poor generalization ability and low stability of traditional image processing and control models, as well as the problems of time consumption and high cost of relying solely on AI solutions.

[0037] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0038] like Figure 1 and Figure 2 As shown in the figure, the intelligent vehicle autonomous driving method based on image processing and machine learning provided in this embodiment of the invention includes the following steps:

[0039] Step 1: Lane line detection is performed based on Bézier curve fitting and binarized lane contour retrieval;

[0040] Step 2: Build an object detection AI model based on a deep learning framework and deploy it to a smart car to perform traffic sign recognition and lane condition detection based on lane line information and traffic sign information;

[0041] Step 3: The intelligent vehicle performs corresponding logical analysis based on lane line information and lane condition information to control the vehicle.

[0042] The lane detection design operates on a quad-core ARM CPU (two A53 cores + two A57 cores) to achieve low-latency, high-efficiency processing, processing 480P color images and vehicle control models at a frame rate of 100 FPS. The target detection AI model is deployed on an FPGA, simultaneously realizing dozens of traffic scenarios and sign recognition. On an FPGA edge computing card with a target computing power of 1.2T, the image detection accuracy (mAP) is >87%, and the processing frame rate is 29.4 FPS.

[0043] In step 1, lane line detection is performed based on Bézier curve fitting and binarized lane contour retrieval, including the following steps:

[0044] Step 101: Acquire the road image and preprocess it, converting the original image into a black and white binarized image;

[0045] Step 102: Extract edges from the black and white binarized image based on the Candy visual contour extraction algorithm;

[0046] Step 103: Perform dynamic image segmentation of the drivable vehicle area based on the OpenCV-FloodFill algorithm;

[0047] Step 104: Lane line detection based on AreaBlocks area planning algorithm.

[0048] In step 101, a road image is acquired and preprocessed to convert the original image into a black-and-white binary image, specifically as follows:

[0049] Real-time road images are captured by a color camera mounted on the vehicle body. Initially, it is necessary to ensure that the camera is compatible with the processing platform. At the same time, the necessary libraries and dependencies need to be installed in the OpenCV development environment to capture and process the images. Real-time color image frames are obtained by calling the camera interface methods. Continuous real-time capture can be achieved by continuously capturing image frames in a loop. The captured images are saved for subsequent processing.

[0050] This paper implements camera distortion coefficient calibration and image distortion correction based on the OpenCV toolchain and Zhang Zhengyou calibration method to restore the true pixel image of the road. First, calibration images are collected by taking a set of calibration images containing a checkerboard pattern using a camera, ensuring that the entire image area is covered. Multiple shots are taken at various angles, distances, and focal lengths to extract the checkerboard corner points. The coordinates of the checkerboard corner points in each calibration image are extracted to ensure that all corner points can be correctly detected and saved as a list. Camera parameters are calibrated by using the Zhang Zhengyou calibration method to calculate the camera distortion coefficients, camera intrinsic and extrinsic parameters, etc. Information such as the actual physical size of the checkerboard corner points, the coordinates of the corner points extracted in the image, and the pixel resolution of the camera is required. The calibration results are evaluated by observing the reprojection error to assess the accuracy of the calibration results. The reprojection error can be used to measure the distortion correction effect after calibration. Distortion correction is performed by using the calibrated camera parameters (distortion coefficients, camera intrinsic and extrinsic parameters) and OpenCV interface functions to correct the distortion of the input image. The above steps will restore the true pixel image of the road and eliminate the distortion effect caused by the camera lens.

[0051] Based on the filtering and deblurring of the original image after restoration using a Gaussian filter, the following steps are taken: First, the original image to be filtered is loaded into the program. Salt-and-pepper noise is added using a random function, randomly changing some pixels to black or white to simulate potential bad pixels or noise in the image. A Gaussian filter is designed, and its size (i.e., convolution kernel size) and standard deviation are determined. Filtering is then performed by applying the Gaussian filter to the image with added salt-and-pepper noise. Filtering is achieved through convolution operations on the image. Specifically, each element of the filter is weighted and averaged with the corresponding pixel and its neighboring pixels. Deblurring is then performed, using the filtered image as the initial input. An appropriate deblurring algorithm is applied for further image restoration. In this invention, the least squares method is chosen as the deblurring algorithm. The filtered and deblurred images are then output for subsequent processing.

[0052] This invention extracts a black-and-white binary image based on the USTC probability histogram method, converts the original image into a grayscale image, and performs Gaussian smoothing on the grayscale image to reduce noise interference. Based on the image histogram, the probability distribution of pixel grayscale levels is calculated, and the image is binarized according to a threshold. The threshold selection can be determined based on the probability histogram. This invention uses an adaptive thresholding method to further process the binarized image to fill holes or remove noise for subsequent processing.

[0053] Convert the original image into a black and white binary image.

[0054] In step 102, edge extraction is performed on the black and white binarized image based on the Candy visual contour extraction algorithm, specifically as follows:

[0055] By applying the Sobel operator to calculate the magnitude and direction of the image gradient, refining the edges using a non-maximum suppression strategy while preserving their elongated nature, and using a dual threshold algorithm to classify edge pixels into strong edges, weak edges, and non-edge pixels based on set high and low thresholds, and using a connection algorithm to form edge connected regions starting from strong edge pixels and along weak edge pixels connected to strong edges, edge information of road conditions is extracted from the black and white binarized image.

[0056] In step 103, dynamic image segmentation of the drivable area is performed based on the OpenCV-FloodFill algorithm, specifically as follows:

[0057] Create a mask image of the same size as the input black-and-white binary image and initialize it to all zeros. Randomly select a seed point as the starting point and set the pixel value of the corresponding position in the mask image to 255, i.e., white. Use this as the starting point for the flooding algorithm to expand. Use OpenCV's floodFill function to perform flooding. Set the parameters of the floodFill function, including the input image, mask image, seed point, fill color or intensity range, and related parameters. Call the floodFill function to perform the flooding operation. Based on the filled mask image, extract the driveable region, which is the connected region connected to the seed point. The filled pixels in the driveable region are all marked as white.

[0058] In step 104, lane line detection is performed based on the AreaBlocks area planning algorithm, specifically as follows:

[0059] Starting from the middle pixel of the lowest row of the image, similar consecutive pixels in that row are divided into connected regions, or blocks, based on the probability distribution of the gray-level histogram. Using a breadth-first search strategy, the connected regions of each row are completely searched, and their starting coordinates are recorded. Based on the midpoint coordinates of the first row's connected region, the search moves upwards to retrieve the block with the nearest center coordinates of the connected regions in adjacent rows as the effective pixel region of that row. When multiple rows of unconnected regions appear consecutively, or when the center coordinates of the blocks do not satisfy the historical least squares regression function, the effective path search for the current image is completed. Finally, the Bezier third-order fitting algorithm is used to fit the starting and ending coordinate distributions of the unique block pixel regions in each row to obtain the left and right lane lines.

[0060] In step 2, an AI model for object detection is built based on a deep learning framework and deployed to an intelligent vehicle for traffic sign recognition. Lane condition detection is performed based on lane line information and traffic sign information. Specifically:

[0061] An AI model for object detection, namely the SSD-Mobilenet object detection AI model (or simply SSD object detection model), is built based on a deep learning framework. It is used to process complex traffic road and traffic sign information. A detailed explanation follows: First, images of intelligent vehicles in different lane scenarios are collected and labeled manually to ensure all lane information and obstacles are correctly marked. Then, the SSD-Mobilenet model is built using a deep learning framework. The labeled images are input into the model for training until the model reaches the expected accuracy. Parameters of the poorly performing model during training are adjusted to achieve the best performance on the test set. Finally, the trained model is deployed in the intelligent vehicle to detect lane conditions in real time. The intelligent vehicle performs corresponding logical analysis based on lane information, such as turning or obstacle signs. Based on the trained model, various complex lane scenarios are detected and processed in real time.

[0062] The lane line information is converted to a top-down perspective using OpenCV perspective transformation methods, specifically including:

[0063] 1. Define the lane area as the region of interest in the source image;

[0064] 2. Based on the lane line edge information or feature points in the source image, extract the four key points that need to be transformed by perspective;

[0065] 3. Define the coordinates of four corresponding points in the target image, that is, define a new rectangular area to represent the shape of the lane line in the top-view dimension;

[0066] 4. Use the cv2.getPerspectiveTransform() function to calculate the transformation matrix required for perspective transformation;

[0067] 5. Use the cv2.warpPerspective() function to perform a perspective transformation on the source image to obtain the transformed top view image;

[0068] In the top-down dimension, lane line information, path segmentation information, and traffic sign information based on the SSD target detection model are combined to identify lane conditions and detect intersection information in complex scenarios. The algorithm determines the current road conditions, such as whether there are obstacles, traffic signs or traffic lights, and detects the existence and location of intersections or junctions.

[0069] A state machine was built, and the Bezier fitting method was used to refit and correct the lane lines under different conditions. Specifically, this included:

[0070] 1. Build a state machine: Use a state machine model to divide the lane line situation into different states, such as straight, left turn, right turn, etc., and determine the current state based on the state of the vehicle at the time of travel;

[0071] 2. Bezier Fitting Correction: For the detected lane lines, the Bezier curve fitting method is applied to further optimize and correct them. The Bezier curve is a smooth and flexible curve representation method. By selecting appropriate control points and degrees, the curvature of the lane lines can be accurately fitted.

[0072] 3. Parameter adjustment and optimization: Based on feedback information during vehicle operation, such as camera data and trajectory deviation, the parameters of Bezier fitting are continuously optimized to make the lane line fitting results more accurate and stable.

[0073] For complex intersections and traffic scenarios where lane lines are obscured, the MovingWindows algorithm is introduced to predict the actual position of lane lines, specifically including:

[0074] 1. Setting the initial position of the sliding window: Based on prior knowledge, set the initial position of the sliding window and determine the size and step size of the sliding window;

[0075] 2. Sliding window search and evaluation: Starting from the bottom of the image, the sliding window is moved sequentially along the vertical direction, and the evaluation metrics (including pixel intensity, edge gradient, etc.) inside each sliding window are calculated. The evaluation metrics can be used to determine whether lane line information is contained.

[0076] 3. Determining the optimal position: Based on the internal evaluation indicators of the sliding window, select the sliding window position with the highest score as the current lane line position;

[0077] 4. Update sliding window position: Update the position and range of the sliding window according to the current lane line position to adapt to changes in the lane line in the image;

[0078] 5. Predicting the actual lane lines: By iteratively moving the sliding window, the actual lane line positions in the image can be predicted;

[0079] The mean-weighted method and the Bezier fitting method are used to fit the driving path of the lane lines, and the control quantity is calculated through a weighted method, specifically including:

[0080] 1. The mean-weighted method is a simple way to calculate the position of lane lines. It estimates the driving path of lane lines by weighting discrete points on the lane line. The Bezier fitting method, on the other hand, uses the Bezier curve to fit the lane line to approximate its shape. It usually achieves a better fit by selecting appropriate control points and interpolation points and optimizing the Bezier curve parameters. The mean-weighted method estimates the position of lane lines, while the Bezier fitting method is used to fit the shape of lane lines more accurately.

[0081] 2. Use the number of lane line data points as weights, that is, the more data points, the greater the weight, and the fewer data points, the smaller the weight. Based on the relationship between the weighted data points and the vehicle position, use an appropriate method to calculate the control quantity.

[0082] In step 3, the intelligent vehicle performs corresponding logical analysis based on lane line information and lane condition information to control the vehicle, specifically as follows:

[0083] Intelligent vehicles use traditional vector PID and position PID algorithms to complete closed-loop control of vehicle speed and direction based on lane line information and lane condition information, specifically including:

[0084] 1. Taking PID control of speed as an example: The desired position and the actual position are used as inputs. The difference between them is the position error. The control quantity is calculated using the formula: "Directional control quantity = Proportional term * Position error + Integral term * Cumulative position error + Derivative term * Previous position error". The vehicle's steering angle is adjusted to approach the desired position. These parameters need to be debugged and optimized to adapt to specific vehicle and control requirements. The logic for controlling speed is similar.

[0085] 2. Use the above control variables to adjust the vehicle speed and direction to achieve closed-loop control. This allows the vehicle's trajectory to be dynamically adjusted according to the actual situation, keeping it on the expected lane line.

[0086] The above method can achieve parallel computing by building a C++ multithreaded programming platform, using only a deep learning AI method to complete the automatic control task of the vehicle, and replacing AI image segmentation and complex traffic scene recognition methods with traditional digital image processing methods, which greatly improves the computational efficiency of the algorithm and the deployment capability of terminal hardware.

[0087] This invention provides an example of a traditional image lane line recognition method, such as... Figure 3 As shown, an example of a garage recognition method is as follows: Figure 4 As shown.

[0088] This invention provides an autonomous driving method for intelligent vehicles based on image processing and machine learning. The method includes lane line detection based on Bezier curve fitting and binarized lane contour retrieval; building an object detection AI model based on a deep learning framework and deploying it to the intelligent vehicle for traffic sign recognition; lane condition detection based on lane line and traffic sign information; and intelligent vehicle control based on corresponding logical analysis of lane line and lane condition information. This method effectively and accurately achieves lane line detection using the traditional CV processing method of Bezier curve fitting + binarized lane contour retrieval (LaneDet). Simultaneously, an SSD-Mobilenet object detection AI model is designed to handle complex traffic road and traffic sign information. Finally, the processing results of the two models are integrated for autonomous vehicle control. This method solves the problems of poor generalization ability and low stability of traditional image processing and control models, and also improves the efficiency (time-consuming) and high hardware cost (computing power) of purely AI-based solutions.

[0089] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for autonomous driving of intelligent vehicles based on image processing and machine learning, characterized in that, Includes the following steps: Step 1: Lane line detection is performed based on Bézier curve fitting and binarized lane contour retrieval; Step 2: Build an object detection AI model based on a deep learning framework and deploy it to a smart car to perform traffic sign recognition and lane condition detection based on lane line information and traffic sign information; Step 3: The intelligent vehicle performs corresponding logical analysis based on lane line information and lane condition information to control the vehicle. In step 1, lane line detection is performed based on Bézier curve fitting and binarized lane contour retrieval, specifically including the following steps: Step 101: Acquire the road image and preprocess it, converting the original image into a black and white binarized image; Step 102: Extract edges from the black and white binarized image based on the Candy visual contour extraction algorithm; Step 103: Perform dynamic image segmentation of the drivable vehicle area based on the OpenCV-FloodFill algorithm; Step 104: Lane line detection based on AreaBlocks area planning algorithm; In step 104, lane line detection is performed based on the AreaBlocks area planning algorithm, specifically as follows: Starting from the middle pixel of the lowest row of the image, similar consecutive pixels in that row are divided into connected regions, or blocks, based on the probability distribution of the gray-level histogram. Using a breadth-first search strategy, the connected regions of each row are completely searched, and their starting coordinates are recorded. Based on the midpoint coordinates of the first row's connected region, the search moves upwards to retrieve the block with the nearest center coordinates of the connected regions in adjacent rows as the effective pixel region of that row. When multiple rows of unconnected regions appear consecutively, or when the center coordinates of the blocks do not satisfy the historical least squares regression function, the effective path search for the current image is completed. Finally, the Bezier third-order fitting algorithm is used to fit the starting and ending coordinate distributions of the unique block pixel regions in each row to obtain the left and right lane lines.

2. The autonomous driving method for intelligent vehicles based on image processing and machine learning according to claim 1, characterized in that, In step 101, a road image is acquired and preprocessed to convert the original image into a black-and-white binary image, specifically as follows: Real-time road images are acquired using a color camera mounted on the vehicle body. Camera distortion coefficients are calibrated and image distortion correction is performed based on the OpenCV toolchain and Zhang Zhengyou calibration method to restore the true pixel image of the road. Salt-and-pepper noise and deblurring of the restored original image are filtered using a Gauss filter. Black and white binarized images are extracted based on the USTC probability histogram method, and the original image is converted into a black and white binarized image.

3. The autonomous driving method for intelligent vehicles based on image processing and machine learning according to claim 2, characterized in that, In step 102, edge extraction is performed on the black and white binarized image based on the Candy visual contour extraction algorithm, specifically as follows: By applying the Sobel operator to calculate the magnitude and direction of the image gradient, refining the edges using a non-maximum suppression strategy while preserving their elongated nature, and using a dual threshold algorithm to classify edge pixels into strong edges, weak edges, and non-edge pixels based on set high and low thresholds, and using a connection algorithm to form edge connected regions starting from strong edge pixels and along weak edge pixels connected to strong edges, edge information of road conditions is extracted from the black and white binarized image.

4. The autonomous driving method for intelligent vehicles based on image processing and machine learning according to claim 3, characterized in that, In step 103, dynamic image segmentation of the drivable area is performed based on the OpenCV-FloodFill algorithm, specifically as follows: Create a mask image of the same size as the input black-and-white binary image and initialize it to all zeros. Randomly select a seed point as the starting point and set the pixel value of the corresponding position in the mask image to 255, i.e., white. Use this as the starting point for the flooding algorithm to expand. Use OpenCV's floodFill function to perform flooding. Set the parameters of the floodFill function, including the input image, mask image, seed point, fill color or intensity range, and related parameters. Call the floodFill function to perform the flooding operation. Based on the filled mask image, extract the driveable region, which is the connected region connected to the seed point. The filled pixels in the driveable region are all marked as white.

5. The autonomous driving method for intelligent vehicles based on image processing and machine learning according to claim 4, characterized in that, In step 2, an AI model for object detection is built based on a deep learning framework and deployed to an intelligent vehicle for traffic sign recognition. Lane condition detection is performed based on lane line information and traffic sign information. Specifically: The lane line information is converted to a top-down perspective using OpenCV's perspective transformation method. In the top-down perspective, lane condition recognition and intersection information detection are performed in complex scenarios by combining lane line information, path segmentation information, and traffic sign information recognized by the SSD object detection model. A state machine was built, and the Bezier fitting method was used to refit and correct the lane lines under different conditions. For complex intersections and traffic scenarios where lane lines are obscured, the MovingWindows algorithm is introduced to predict the position of the actual lane lines. The mean-weighted method and the Bezier fitting method are used to fit the driving path of the lane line, and the control quantity is calculated by the weighted method.

6. The autonomous driving method for intelligent vehicles based on image processing and machine learning according to claim 5, characterized in that, In step 3, the intelligent vehicle performs corresponding logical analysis based on lane line information and lane condition information to control the vehicle, specifically as follows: Intelligent vehicles use traditional vector PID and position PID algorithms to complete closed-loop control of vehicle speed and direction based on lane line information and lane condition information.

Citation Information

Patent Citations

  • Method for detecting multi-lane line on basis of random sample consensus (RANSAC) algorithm

    CN102722705A

  • Method for recognizing lane line

    CN103295420A