Lane identification and warning board control method based on improved Canny algorithm
By improving the Canny algorithm and PID algorithm, the accuracy and robustness of lane line detection are improved, and the problem of insufficient accuracy of lane line detection under complex road conditions is solved, efficient identification and automatic control in bad weather is achieved, and the improvement of efficiency is improved. The security of smart warning signs.
Patent Information
- Application Number
- CN202411196541.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-01-03
AI Technical Summary
The existing lane line detection technology is difficult to provide accurate identification results under complex and uncertain road conditions, and requires manual adjustment of parameters, which is large in workload and poor in robustness, especially in bad weather conditions.
The lane recognition method based on the improved Canny algorithm is adopted to obtain real-time lane images for grayscale processing, bilateral filtering smoothing, edge enhancement operators calculate edge gradients, and double threshold detection and positioning edges. In combination with the improved PID algorithm, the placement of warning signs is controlled and the placement of warning signs is controlled. Automatic return.
It improves the accuracy and robustness of lane line detection under complex road conditions, reduces the need for manual adjustment of parameters, enhances the detection capability in severe weather, and provides innovative solutions for safety prevention after vehicle accidents.
Smart Images

Figure CN119251786A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing and intelligent traffic technology, and in particular to a lane recognition and warning sign control method based on an improved Canny algorithm. Background Art
[0002] At present, with the development of automobile intelligence and the continuous improvement of road traffic, the demand for intelligent warning tripods is getting higher and higher. Lane line detection is one of the important technologies for the safe operation of intelligent warning signs, and researchers have been paying attention to this issue.
[0003] Existing lane detection technologies have made significant progress to some extent, but there are still certain challenges in terms of accuracy and stability under complex road conditions. Most lane detection technologies use traditional image processing, computer vision and deep learning methods to identify lane lines on roads under different environmental conditions. Lane detection algorithms based on traditional image processing mainly detect lane line areas through edge detection, filtering and other methods, and then perform lane line detection in combination with algorithms such as Hough transform and RANSAC. However, they still face some challenges under complex and uncertain road conditions. In particular, under severe weather conditions, such as rain, snow or fog, traditional lane detection technologies usually have difficulty in providing accurate recognition results, and require manual adjustment of filter operators and manual adjustment of parameters according to the characteristics of the street scenes targeted by the algorithm, which is a huge workload and has poor robustness. In addition, road markings may become blurred or damaged due to long-term use, further increasing the difficulty of lane detection.
[0004] Therefore, in the related technology, there is an urgent need for a method that can improve the accuracy of lane line detection under complex road conditions. Summary of the invention
[0005] Based on this, it is necessary to provide a lane recognition and warning sign control method based on an improved Canny algorithm that can improve the accuracy of lane line detection under complex road conditions in order to address the above technical problems.
[0006] In a first aspect, the present application provides a lane recognition and warning sign control method based on an improved Canny algorithm. The method comprises:
[0007] Acquire a real-time lane image, and perform grayscale processing on the real-time lane image;
[0008] Bilateral filtering is used to smooth the grayscale lane image;
[0009] Calculate the edge gradient of the lane image after smoothing based on the edge enhancement operator;
[0010] Use dual threshold detection to locate edges and extract lane lines;
[0011] The placement of warning signs and automatic return are controlled based on the lane line information combined with an improved PID algorithm.
[0012] Optionally, in one embodiment of the present application, the formula for bilateral filtering is:
[0013]
[0014] Among them, g(i,j) is the value of the output pixel, (i,j) is the pixel position currently considered, f(k,l) is the value of all pixels in the input image, and w(i,j,k,l) is the weight function.
[0015] Optionally, in one embodiment of the present application, the edge enhancement operator is a Sobel operator in 8 directions.
[0016] Optionally, in one embodiment of the present application, the edge gradient is calculated as follows:
[0017]
[0018] Among them, G(x,y) is the edge gradient at the point (x,y) of the image, G x (x,y) and G y The two functions (x, y) represent the gradient of the image in the horizontal direction x and the vertical direction y respectively. and G x (x,y) and G y The square of (x, y) is used to calculate the square of the edge gradient. θ represents the direction of the edge at the point (x, y), usually expressed in radians.
[0019] Optionally, in one embodiment of the present application, the method further includes:
[0020] Perform non-maximum suppression on the gradient image.
[0021] Optionally, in one embodiment of the present application, the expression of the improved PID algorithm is:
[0022]
[0023] Among them, k p1 For the ratio, is the differential, is the integral, e n and e n-1 The values of the current moment and the previous moment.
[0024] In a second aspect, the present application also provides a lane recognition and warning sign control device based on an improved Canny algorithm. The device comprises:
[0025] An image acquisition preprocessing module, used to acquire a real-time lane image and perform grayscale processing on the real-time lane image;
[0026] An image smoothing processing module is used to smooth the grayscale lane image using bilateral filtering;
[0027] An edge gradient calculation module, used for calculating the edge gradient of the lane image after smoothing based on an edge enhancement operator;
[0028] The edge positioning module is used to locate the edge and extract the lane line using dual threshold detection;
[0029] The warning sign control module is used to control the placement of warning signs and automatic return based on the lane line information combined with the improved PID algorithm.
[0030] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the methods described in the above embodiments.
[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in each of the above embodiments are implemented.
[0032] The lane recognition and warning sign control method based on the improved Canny algorithm first obtains a real-time lane image and grayscales the real-time lane image; then, bilateral filtering is used to smooth the grayscale lane image; then, the edge gradient of the smoothed lane image is calculated based on the edge enhancement operator; then, the edge is located using dual threshold detection to extract the lane line; finally, the placement of the warning sign and automatic return are controlled based on the information of the lane line combined with the improved PID algorithm. That is to say, after grayscale preprocessing of the real-time image, the Sobel operator edge enhancement in 8 directions is performed, the Sobel operator is increased by 1 times, the edge positioning effect after filtering is improved, and then the Canny algorithm is used to extract the lane line, which improves the speed of lane extraction. At the same time, the improved PID algorithm is combined to control the movement of the vehicle carrying the warning sign, and the warning sign is placed and automatically returned, which effectively solves the problems of position uncertainty, time delay and high risk factor, improves the accuracy of lane line detection under complex road conditions, and provides an innovative and effective solution for safety prevention after vehicle accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is an application environment diagram of a lane recognition and warning sign control method based on an improved Canny algorithm in one embodiment;
[0034] Figure 2 1 is a flow chart of a lane recognition and warning sign control method based on an improved Canny algorithm in one embodiment;
[0035] Figure 3 is a schematic diagram of an image smoothing effect in one embodiment;
[0036] Figure 4 is a schematic diagram of Sobel operators in eight directions in one embodiment;
[0037] Figure 5 A schematic diagram showing a comparison of the extraction effects of the improved Canny algorithm in one embodiment;
[0038] Figure 6 A schematic diagram of the structure of an improved PID algorithm in one embodiment;
[0039] Figure 7 It is a structural block diagram of a lane recognition and warning sign control device based on an improved Canny algorithm in one embodiment;
[0040] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] The lane recognition and warning sign control method based on the improved Canny algorithm provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0043] In one embodiment, Figure 2 As shown in FIG. 1 , a lane recognition and warning sign control method based on an improved Canny algorithm is provided. The method is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0044] S201: Acquire a real-time lane image, and perform grayscale processing on the real-time lane image.
[0045] In the embodiment of the present application, first of all, the lane lines that need to be identified in the present application are mainly lane lines with straight line features. A picture with a pixel size of 672×37 is captured in the driving recorder. The lanes in this picture are mainly lane lines with straight line features. Afterwards, since the original image has three channels of RGB, such an image is not convenient to process. Therefore, in order to facilitate the subsequent operation, the collected real-time lane image is grayed. Specifically, since the human eye is most sensitive to green and least sensitive to blue, a more reasonable grayscale image can be obtained by weighted averaging the three components of RGB. The grayscale value calculation formula is as follows.
[0046] Gray=0.114×B+0.587×G+0.299×R
[0047] S203: Use bilateral filtering to smooth the grayscale lane image.
[0048] In the embodiment of the present application, after graying the real-time lane image, bilateral filtering is used to smooth the grayed lane image in order to eliminate noise interference in the image. Bilateral filtering distinguishes and processes edge and non-edge parts by adaptive weights, retaining edge information in the image while also retaining detail information in the image. Figure 3 The figure shows the effect of smoothing.
[0049] Specifically, in one embodiment of the present application, the formula for bilateral filtering is:
[0050]
[0051] Among them, g(i,j) is the value of the output pixel, (i,j) is the position of the pixel currently being considered, f(k,l) is the value of all pixels in the input image, and w(i,j,k,l) is a weight function, which is usually calculated based on the spatial proximity of the pixels and the similarity of the pixel values (brightness or color). This weight function is the product of two Gaussian functions, one based on spatial distance and the other based on the difference in pixel values.
[0052] S205: Calculate the edge gradient of the lane image after the smoothing process based on the edge enhancement operator.
[0053] In an embodiment of the present application, a finite difference method is used to calculate the gradient value around each pixel in the lane image after smoothing based on an edge enhancement operator to obtain edge information in the image.
[0054] Specifically, in one embodiment of the present application, the edge enhancement operator is a Sobel operator in 8 directions.
[0055] In one embodiment of the present application, the edge enhancement operator is a Sobel operator in 8 directions. The Sobel detection operator is an edge detection method based on a gradient operator, which uses horizontal and vertical templates to convolve with corresponding image data and performs weighted calculation on discrete data, which is defined as:
[0056] ΔG x =f(x-1,y+1)+2f(x,y+1)+f(x+1,y+1)-f(x-1,y-1)
[0057] -2f(x-1,y-1)-f(x-1,y-1)
[0058] ΔG y =f(x-1,y-1)+2f(x-1,y)+f(x-1,y+1)-f(x+1,y-1)
[0059] -2f(x+1,y-1)-f(x+1,y+1)
[0060] G[f(x,y)]=|ΔG x |+|ΔG y |
[0061] Where f(x,y) is the pixel value of the image at point (x,y), ΔG x and ΔG y Represent the approximate gradient of the image in the horizontal direction x and vertical direction y respectively, which are obtained by convolving the template of the Sobel operator with the image data. f(x-1,y+1), f(x,y+1), f(x+1,y+1), f(x-1,y-1), f(x-1,y), f(x+1,y-1) are the pixel values around the midpoint (x,y) in the image, which are used to calculate the gradient of the Sobel operator. G[f(x,y)] is the final edge intensity value, which is calculated by taking ΔG x and ΔG y The sum of the absolute values of .
[0062] In addition to the traditional horizontal and vertical directions, the 8-direction Sobel operator also includes 22.5°, 45°, 67.5°, 112°, 5°, 135°, and 157° directions. Figure 4As shown, a 5×5 template is used, which is a schematic diagram of the Sobel operator in 8 directions.
[0063] In one embodiment of the present application, the calculation formula of the edge gradient is:
[0064]
[0065] Among them, G(x,y) is the edge gradient at the point (x,y) of the image, G x (x,y) and G y The two functions (x, y) represent the gradient of the image in the horizontal direction x and the vertical direction y respectively. and G x (x,y) and G y The square of (x, y) is used to calculate the square of the edge gradient. θ represents the direction of the edge at the point (x, y), usually expressed in radians.
[0066] In one embodiment of the present application, the method further includes:
[0067] Perform non-maximum suppression on the gradient image.
[0068] In one embodiment of the present application, by comparing the gradient magnitudes of a pixel point with those of surrounding pixels in the gradient direction, the maximum value is selected and retained to emphasize the edge.
[0069] In the embodiment of the present application, by performing non-maximum suppression on the gradient image, edge positioning can be made more accurate.
[0070] S207: Use dual threshold detection to locate edges and extract lane lines.
[0071] In the embodiment of the present application, the gradient value is divided into two thresholds: a high threshold and a low threshold. If the gradient value of a pixel point is higher than the high threshold, it is considered a strong edge point; if the gradient value is between the high threshold and the low threshold, it is considered a weak edge point; and the pixel point below the low threshold is considered the background. Afterwards, by connecting the strong edge point and the weak edge point connected to it, the edge can be finally located, and the lane line can be extracted based on the edge. Figure 5 As shown in FIG. 1 , a comparison diagram of the extraction effect of the improved Canny algorithm is shown.
[0072] S209: Control the placement of warning signs and automatic return based on the lane line information combined with an improved PID algorithm.
[0073] In the embodiment of the present application, based on the lane line information, combined with the improved PID algorithm, such as Figure 6As shown in the figure, it is a schematic diagram of the structure of the improved PID algorithm. By reading the speed in real time from the encoder, the incremental PID algorithm (whose output value is the increment of the control quantity) is combined with the speed loop controlled by proportional integral (PI) to achieve the effect of acceleration on straight roads and deceleration on curves, control the movement of the trolley carrying the warning sign, and thus control the placement of the warning sign and automatic return.
[0074] Specifically, in one embodiment of the present application, the expression of the improved PID algorithm is:
[0075]
[0076] Among them, k p1 For the ratio, is the differential, is the integral, e n and e n-1 The values of the current moment and the previous moment.
[0077] In the lane recognition and warning sign control method based on the improved Canny algorithm, first, a real-time lane image is obtained and grayscaled; then, the grayscaled lane image is smoothed by using bilateral filtering; then, the edge gradient of the smoothed lane image is calculated based on the edge enhancement operator; then, the edge is located by using dual threshold detection to extract the lane line; finally, the placement and automatic return of the warning sign are controlled based on the information of the lane line combined with the improved PID algorithm. That is to say, after grayscale preprocessing of the real-time image, the Sobel operator edge enhancement is performed in 8 directions, the Sobel operator is increased by 1 times, the edge positioning effect after filtering is improved, and then the lane line extraction is performed using the Canny algorithm to increase the speed of lane extraction. At the same time, the movement of the vehicle carrying the warning sign is controlled by combining the improved PID algorithm, and the placement and automatic return of the warning sign are performed, which effectively solves the problems of position uncertainty, time delay and high risk factor, improves the accuracy of lane line detection under complex road conditions, and provides an innovative and effective solution for safety precautions after vehicle accidents.
[0078] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0079] Based on the same inventive concept, the embodiment of the present application also provides a lane recognition and warning sign control device based on an improved Canny algorithm for implementing the lane recognition and warning sign control method based on an improved Canny algorithm. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the lane recognition and warning sign control device based on the improved Canny algorithm provided below can refer to the limitations of the lane recognition and warning sign control method based on the improved Canny algorithm above, and will not be repeated here.
[0080] In one embodiment, Figure 7 As shown, a lane recognition and warning sign control device 700 based on an improved Canny algorithm is provided, comprising: an image acquisition preprocessing module 701, an image smoothing processing module 703, an edge gradient calculation module 705, an edge positioning module 707 and a warning sign control module 709, wherein:
[0081] An image acquisition preprocessing module 701 is used to acquire a real-time lane image and perform grayscale processing on the real-time lane image;
[0082] An image smoothing processing module 703 is used to smooth the grayscale lane image using bilateral filtering;
[0083] An edge gradient calculation module 705, used to calculate the edge gradient of the lane image after smoothing based on an edge enhancement operator;
[0084] Edge positioning module 707, used to detect and locate edges using dual thresholds and extract lane lines;
[0085] The warning sign control module 709 is used to control the placement of warning signs and automatic return based on the lane line information combined with the improved PID algorithm.
[0086] In one embodiment of the present application, the formula for bilateral filtering is:
[0087]
[0088] Among them, g(i,j) is the value of the output pixel, (i,j) is the pixel position currently considered, f(k,l) is the value of all pixels in the input image, and w(i,j,k,l) is the weight function.
[0089] In one embodiment of the present application, the edge enhancement operator is a Sobel operator in 8 directions.
[0090] In one embodiment of the present application, the calculation formula of the edge gradient is:
[0091]
[0092] Among them, G(x,y) is the edge gradient at the point (x,y) of the image, G x (x,y) and G y The two functions (x, y) represent the gradients of the image in the horizontal direction x and the vertical direction y respectively. and G x (x,y) and G y The square of (x, y) is used to calculate the square of the edge gradient. θ represents the direction of the edge at the point (x, y), usually expressed in radians.
[0093] In one embodiment of the present application, the method further includes:
[0094] Perform non-maximum suppression on the gradient image.
[0095] In one embodiment of the present application, the expression of the improved PID algorithm is:
[0096]
[0097] Among them, k p1 For the ratio, is the differential, is the integral, e n and e n-1 The values of the current moment and the previous moment.
[0098] Each module in the lane recognition and warning sign control device based on the improved Canny algorithm can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0099] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a lane recognition and warning sign control method based on an improved Canny algorithm is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0100] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0101] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0102] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0103] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0104] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0105] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0106] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.
[0107] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A lane recognition and warning sign control method based on an improved Canny algorithm, characterized in that: The method comprises: Acquire a real-time lane image, and perform grayscale processing on the real-time lane image; Bilateral filtering is used to smooth the grayscale lane image; Calculate the edge gradient of the lane image after smoothing based on the edge enhancement operator; Use dual threshold detection to locate edges and extract lane lines; The placement of warning signs and automatic return are controlled based on the lane line information combined with an improved PID algorithm.
2. The lane recognition and warning sign control method based on the improved Canny algorithm according to claim 1 is characterized in that: The formula for the bilateral filtering is: Among them, g(i,j) is the value of the output pixel, (i,j) is the pixel position currently considered, f(k,l) is the value of all pixels in the input image, and w(i,j,k,l) is the weight function.
3. The lane recognition and warning sign control method based on the improved Canny algorithm according to claim 1 is characterized in that: The edge enhancement operator is a Sobel operator in 8 directions.
4. The lane recognition and warning sign control method based on the improved Canny algorithm according to claim 1 is characterized in that: The calculation formula of the edge gradient is: Among them, G(x,y) is the edge gradient at the point (x,y) of the image, G x (x,y) and G y The two functions (x, y) represent the gradient of the image in the horizontal direction x and the vertical direction y respectively. and G x (x,y) and G y The square of (x, y) is used to calculate the square of the edge gradient. θ represents the direction of the edge at the point (x, y), usually expressed in radians.
5. The lane recognition and warning sign control method based on the improved Canny algorithm according to claim 1 is characterized in that: The method further comprises: Perform non-maximum suppression on the gradient image.
6. The lane recognition and warning sign control method based on the improved Canny algorithm according to claim 1 is characterized in that: The expression of the improved PID algorithm is: Among them, k p1 For the ratio, is the differential, is the integral, e n and e n-1 The values of the current moment and the previous moment.
7. A lane recognition and warning sign control device based on an improved Canny algorithm, characterized in that: The device comprises: An image acquisition preprocessing module, used to acquire a real-time lane image and perform grayscale processing on the real-time lane image; An image smoothing processing module is used to smooth the grayscale lane image using bilateral filtering; An edge gradient calculation module, used for calculating the edge gradient of the lane image after smoothing based on an edge enhancement operator; The edge positioning module is used to locate the edge and extract the lane line using dual threshold detection; The warning sign control module is used to control the placement of warning signs and automatic return based on the lane line information combined with the improved PID algorithm.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
