Indication line detection method, system and equipment and computer readable storage medium

Through semantic segmentation and image rotation technology, the fitting process of lane lines and longitudinal parking space lines is simplified, solving the problems of fitting deviation and high complexity in the existing technology, achieving efficient and accurate parking space line detection, and supporting automatic vehicle search. Parking space function.

CN118609085APending Publication Date: 2024-09-06SHANGHAI CANTRON ROBOTICS TECH LTD CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410639556.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The existing technology cannot accurately fit the parking space lines and lane lines of the parking lot. The fitting results have large deviations, and the detection algorithm is highly complex, resulting in the inability to accurately search for parking spaces.

Method used

Semantic segmentation is performed by obtaining the parking lot image, which is processed into a lane line semantic map and a parking space line semantic map respectively. The angle between the lane line and the vehicle's forward direction is calculated and the image is rotated. The lane line and longitudinal parking space line points are extracted, using simple counting and Addition and subtraction methods are used to fit lane lines and longitudinal parking space lines, reducing resource consumption and improving accuracy.

Benefits of technology

It greatly reduces the consumption of detection resources, improves the efficiency and accuracy of lane line and parking space line fitting, makes vehicle driving paths more accurate, and facilitates automatic parking space search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609085A
    Figure CN118609085A
Patent Text Reader

Abstract

The invention provides an indication line detection method, system and device and a computer readable storage medium. An indication line comprises a longitudinal parking space line and a lane line. The indication line detection method comprises the following steps: obtaining a parking lot image, and carrying out semantic segmentation on the parking lot image to obtain a parking lot segmented image; traversing the segmented images of the parking lot, and processing the segmented images of the parking lot into a lane line semantic graph and a parking space line semantic graph; obtaining lane line points in the lane line semantic graph, fitting the lane line according to the lane line points, obtaining longitudinal parking space line points in the parking space line semantic graph, and fitting the longitudinal parking space line according to the longitudinal parking space line points; and integrating the fitted lane line and the longitudinal parking space line, and outputting the integrated lane line and the integrated longitudinal parking space line. According to the invention, in the vehicle parking process, the fitting efficiency and precision of the lane line and the parking space line can be improved, so that the vehicle driving path is more accurate, and the vehicle can conveniently and automatically search the parking space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and relates to a detection method and system, and in particular to an indicator line detection method, system, device and computer-readable storage medium. Background Art

[0002] With the continuous development of science and technology, the automatic driving technology of automobiles is a hot topic of current research. The continuous increase in the number of cars has led to the continuous increase in the number and size of parking lots. Parking space search and automatic parking in parking lots are the problems faced by self-driving cars. The automatic parking search function of vehicles in parking lots is inseparable from the detection and recognition of longitudinal parking lines and lane lines. Accurately detecting longitudinal parking lines and lane lines and reducing the amount of calculation and resource consumption in the detection process are problems that need to be solved urgently.

[0003] In the current automatic parking technologies in parking lots, parking space lines and lane lines are processed separately. The detection of parking space lines is also based on the contour lines of the entire rectangular parking space, and there is no extraction and fitting method for the longitudinal parking space edge lines. As for the detection of lane lines, the use of algorithms such as Hough transform has the defects of large amount of calculation and high resource consumption.

[0004] At present, the detection methods of parking space lines and lane lines are independent. On the one hand, the technologies related to parking spaces all detect the contour lines of the entire parking space. The main idea is to locate the parking space by detecting the corner points and straight lines of the parking space. There are also detections from the perspectives of different color spaces of the parking space. There is no extraction and fitting method for the longitudinal parking space edge line. The straight line detection basically uses Hough transform or LSD straight line detection algorithm, and the algorithm is relatively complex. In addition, the method using the parking space color space detection is easily affected by light and is limited by the color of the parking space. On the other hand, the current lane line detection methods are mainly traditional image processing methods and deep learning network detection. Traditional methods use edge detection or Hough transform algorithms combined with tracking ideas to detect lane lines, while deep learning methods build neural network models for detection. There are networks that directly detect lane lines, and there are multi-network models of semantic segmentation networks plus endpoint detection networks. Since lane line information belongs to the ground and has less information, the probability of misidentification of direct target detection is high, and the multi-network model is relatively complex.

[0005] Therefore, how to provide a detection method, system, device and computer-readable storage medium for indicator lines to solve the defects of the prior art that the parking space lines and / or lane lines cannot be accurately fitted, the fitting results have large deviations, and the detection algorithm is highly complex, resulting in the inability to accurately search for parking spaces, has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0006] In view of the shortcomings of the prior art described above, an object of the present invention is to provide a method, system, device and computer-readable storage medium for detecting indicator lines, so as to solve the problem that the prior art cannot accurately fit parking space lines and / or lane lines, the fitting results have large deviations, and the detection algorithm is highly complex, resulting in an inability to accurately search for parking spaces.

[0007] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for detecting indicator lines on one hand, wherein the indicator lines include longitudinal parking space lines and lane lines; the method for detecting indicator lines includes: acquiring a parking lot image, performing semantic segmentation on the parking lot image to acquire a parking lot segmentation image; traversing the parking lot segmentation image, and processing the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively; acquiring lane line points in the lane line semantic map, fitting the lane lines according to the lane line points, acquiring longitudinal parking space line points in the parking space line semantic map, fitting the longitudinal parking space lines according to the longitudinal parking space line points; integrating the fitted lane lines and longitudinal parking space lines, and outputting them.

[0008] In one embodiment of the present invention, the step of obtaining lane line points in the lane line semantic map and fitting the lane line according to the lane line points also includes: calculating the angle between the lane line and the vehicle's forward direction; the step of calculating the angle between the lane line and the vehicle's forward direction includes: traversing half of the lane line semantic map horizontally from the left and right sides respectively with a preset step size; recording the number of pixels in each traversed row, and saving the pixel coordinates of the pixel points in each row; adding the pixels of each row, and classifying the pixel sums of each row, and selecting the largest class including the largest number of rows; obtaining the average coordinates of each row in the largest class; calculating the tangent angle between two adjacent coordinates, and averaging all the calculated tangent angles, and defining the averaged tangent angle as the angle between the lane line and the vehicle's forward direction.

[0009] In one embodiment of the present invention, the step of obtaining lane line points in the lane line semantic map and fitting the lane lines according to the lane line points includes: rotating the lane line semantic map with the center of the image as the center according to the calculated angle between the lane line and the vehicle's forward direction; longitudinally traversing the rotated lane line semantic map, searching for lane lines, and obtaining the coordinates of the fitting points corresponding to the lane lines; reversely rotating the lane line points to obtain the coordinate points corresponding to them in the lane line semantic map, so as to fit the lane lines through the lane line points corresponding to the coordinate points in the lane line semantic map.

[0010] In one embodiment of the present invention, the lane line points are obtained in the lane line semantic map, and the step of fitting the lane line according to the lane line points includes: traversing the lane line semantic map horizontally with a preset step size, recording the coordinates of the boundary points of the lane line at each horizontal position and counting the number of boundary points of the lane line; classifying the horizontal positions with the same number of boundary points of the lane line, finding the horizontal position of the largest class and the coordinates of the boundary points of the lane line at the horizontal position, and calculating the center position coordinates between the boundary points of each two adjacent lane lines; fitting the center points belonging to the same lane line respectively to fit the lane line, and calculating the angle between the lane line and the vehicle's forward direction.

[0011] In one embodiment of the present invention, the step of processing the parking lot segmentation image into a parking space line semantic map includes: extracting longitudinal parking space lines from the parking lot segmentation image according to RGB thresholds of the longitudinal parking space lines to form the parking space line semantic map.

[0012] In one embodiment of the present invention, a longitudinal parking line point is obtained from a parking line semantic map, and the step of fitting the longitudinal parking line according to the longitudinal parking line point includes: rotating the parking line semantic map with the center of the image according to the calculated angle between the lane line and the vehicle's forward direction; traversing the rotated parking line semantic map horizontally, and filtering out the horizontal parking lines by a preset parking line threshold; traversing the rotated parking line semantic map vertically, searching for longitudinal parking lines, and obtaining the coordinates of the corresponding fitting points of the longitudinal parking lines; reversely rotating the longitudinal parking line points to obtain the corresponding coordinate points in the parking line semantic map, so as to fit the longitudinal parking lines through the longitudinal parking line points corresponding to the coordinate points in the parking line semantic map.

[0013] In an embodiment of the present invention, before the step of fitting the longitudinal parking space line, the detection method further comprises: calculating an angle between the longitudinal parking space line and the longitudinal axis of the vehicle.

[0014] In one embodiment of the present invention, the step of calculating the angle between the longitudinal parking line and the longitudinal axis of the vehicle includes: traversing half of the parking line semantic map horizontally from the left and right sides with a preset step size; recording the number of pixels in each row traversed, and saving the pixel coordinates of the pixel points in each row; adding the pixels of each row, and classifying the pixel sums of each row, and selecting the largest class including the largest number of rows; obtaining the average coordinates of each row in the largest class; calculating the angle between two adjacent coordinates, and averaging all the calculated angles, and judging whether the averaged angle is greater than a preset angle threshold; if so, defining the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle; if not, defining the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle.

[0015] In one embodiment of the present invention, a longitudinal parking line point is obtained from a parking line semantic map, and the step of fitting the longitudinal parking line according to the longitudinal parking line point includes: rotating the parking line semantic map with the center of the image according to the calculated angle between the longitudinal parking line and the longitudinal axis of the vehicle; traversing the rotated parking line semantic map horizontally, and filtering out the horizontal parking lines by a preset parking line threshold; traversing the rotated parking line semantic map vertically, searching for the longitudinal parking lines, and obtaining the coordinates of the corresponding fitting points of the longitudinal parking lines; reversely rotating the longitudinal parking line points to obtain the corresponding coordinate points in the parking line semantic map, so as to fit the longitudinal parking lines through the longitudinal parking line points corresponding to the coordinate points in the parking line semantic map.

[0016] On the other hand, the present invention provides a method for detecting an indicator line, wherein the indicator line includes a longitudinal parking space line; the method for detecting an indicator line includes: acquiring a parking lot image, performing semantic segmentation on the parking lot image to acquire a parking lot segmentation image; traversing the parking lot segmentation image, processing the parking lot segmentation image into a parking space line semantic map; acquiring longitudinal parking space line points in the parking space line semantic map, fitting the longitudinal parking space line according to the longitudinal parking space line points; and outputting the fitted longitudinal parking space line.

[0017] In one embodiment of the present invention, the step of processing the parking lot segmentation image into a parking space line semantic map includes: extracting the longitudinal parking space line from the parking lot segmentation image according to the RGB threshold of the longitudinal parking space line to form the parking space line semantic map; and calculating the angle between the longitudinal parking space line and the longitudinal axis of the vehicle.

[0018] In one embodiment of the present invention, the step of calculating the angle between the longitudinal parking line and the longitudinal axis of the vehicle includes: traversing half of the parking line semantic map horizontally from the left and right sides with a preset step size; recording the number of pixels in each row traversed, and saving the pixel coordinates of the pixel points in each row; adding the pixels of each row, and classifying the pixel sums of each row, and selecting the largest class including the largest number of rows; obtaining the average coordinates of each row in the largest class; calculating the angle between two adjacent coordinates, and averaging all the calculated angles, and judging whether the averaged angle is greater than a preset angle threshold; if so, defining the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle; if not, defining the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle.

[0019] In one embodiment of the present invention, the step of obtaining longitudinal parking line points from a parking line semantic map and fitting the longitudinal parking line according to the longitudinal parking line points includes: rotating the parking line semantic map with the center of the image according to the calculated angle between the longitudinal parking line and the longitudinal axis of the vehicle; traversing the rotated parking line semantic map horizontally, and filtering out the horizontal parking lines by a preset parking line threshold; traversing the rotated parking line semantic map vertically, searching for longitudinal parking lines, and obtaining the coordinates of the corresponding fitting points of the longitudinal parking lines; reversely rotating the longitudinal parking line points to obtain the corresponding coordinate points in the parking line semantic map, so as to fit the longitudinal parking lines through the longitudinal parking line points corresponding to the coordinate points in the parking line semantic map.

[0020] According to another aspect of the present invention, there is provided a detection system for indicating lines, wherein the indicating lines include longitudinal parking lines and lane lines or only include longitudinal parking lines; the detection system for indicating lines includes: an acquisition module for acquiring a parking lot image; a segmentation module for performing semantic segmentation on the parking lot image to acquire a parking lot segmentation image; a fitting processing module for traversing the parking lot segmentation image when the indicating lines include longitudinal parking lines and lane lines, and processing the parking lot segmentation image into a lane line semantic map and a parking line semantic map respectively; acquiring lane line points in the lane line semantic map, fitting the lane lines according to the lane line points, acquiring longitudinal parking line points in the parking line semantic map, fitting the longitudinal parking lines according to the longitudinal parking line points; or when the indicating lines include only longitudinal parking lines, acquiring longitudinal parking line points in the parking line semantic map, fitting the longitudinal parking lines according to the longitudinal parking line points; and an output module for integrating the fitted lane lines and longitudinal parking lines and outputting them or only outputting the fitted longitudinal parking lines.

[0021] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the indicator line detection method described in the claims.

[0022] The last aspect of the present invention provides an indicator line detection device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the detection device performs the indicator line detection method or the indicator line detection method described in any one of claims 11 to 14.

[0023] As described above, the indicator line detection method, system, device and computer-readable storage medium of the present invention have the following beneficial effects:

[0024] First, the present invention can greatly reduce the resource consumption of the detection task and meet the accuracy requirements. Among them, the lane line fitting method has a simple idea and does not involve complex conversion. The image traversal only involves the preset horizontal position and does not involve the entire image traversal. The calculation is a simple counting and addition and subtraction, which consumes less resources.

[0025] Secondly, the longitudinal parking line fitting method of the present invention first obtains the deflection angle, and converts it into a longitudinal search by rotating the image, which cleverly simplifies the difficulty of detecting the inclined longitudinal parking line, has a simple idea, and requires little calculation.

[0026] Third, the present invention can improve the efficiency and accuracy of lane line and parking space line fitting during vehicle parking, making the vehicle driving path more accurate and facilitating the vehicle to automatically search for parking spaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1A Shown is a schematic diagram of an implementation flow of the indicator line detection method of the present invention.

[0028] Figure 1B Shown is another implementation flow diagram of the indicator line detection method of the present invention.

[0029] Figure 1C It is a schematic diagram showing another implementation flow of the indicator line detection method of the present invention.

[0030] Figure 2A Shown is a schematic diagram of a parking lot segmentation image according to the present invention.

[0031] Figure 2B Shown is a schematic diagram of the lane line semantic graph of the present invention.

[0032] Figure 2C The display is the parking space line semantic graph of the present invention.

[0033] Figure 3 Shown is an example diagram of the fitting results of the lane lines and longitudinal parking space lines of the present invention.

[0034] Figure 4 Shown is an example diagram of the rotated parking space line semantic graph of the present invention.

[0035] Figure 5 Shown is an exemplary diagram of the longitudinal parking space line points of the present invention.

[0036] Figure 6 An exemplary diagram showing the longitudinal parking space line points after reverse rotation of the present invention is shown.

[0037] Figure 7 An example diagram of the longitudinal parking space line obtained by fitting according to the present invention is shown.

[0038] Figure 8The display is a statistical schematic diagram of boundary points of lane lines according to the present invention.

[0039] Fig. 9 Shown is a schematic diagram of the center point of the fitted lane line of the present invention.

[0040] Fig.10 Shown is a schematic flow chart of another embodiment of the method for detecting an indicator line of the present invention.

[0041] Fig.11 It is a schematic diagram showing the principle structure of detecting the indicator line of the present invention in one embodiment.

[0042] Component number description

[0043]

[0044] DETAILED DESCRIPTION

[0045] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0046] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0047] Embodiment 1

[0048] This embodiment provides a method for detecting indicator lines, wherein the indicator lines include longitudinal parking space lines and lane lines. The method for detecting indicator lines includes:

[0049] Acquire a parking lot image, and perform semantic segmentation on the parking lot image to obtain a parking lot segmentation image;

[0050] Traversing the parking lot segmentation image, and processing the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively;

[0051] Acquire lane line points in the lane line semantic map, fit the lane line according to the lane line points, and acquire longitudinal parking line points in the parking line semantic map, fit the longitudinal parking line according to the longitudinal parking line points;

[0052] Integrate the fitted lane lines and longitudinal parking space lines and output them.

[0053] It should be noted that the lane line fitting and the longitudinal parking space line fitting can be performed simultaneously or in sequence, and the present application is not limited thereto.

[0054] The following will describe in detail the detection method of the indicator lines provided in this embodiment in conjunction with the diagram. The indicator lines described in this embodiment include longitudinal parking lines and lane lines. By detecting the longitudinal parking lines and lane lines, automatic search for parking spaces can be performed based on the line information during automatic parking. In this embodiment, in order to realize automatic search for parking spaces, the vehicle needs to travel along the lane lines before finding an empty parking space. If there are no lane lines, it needs to travel along the longitudinal parking lines. When an empty parking space is found, other functions are required to realize automatic parking. Therefore, the transverse parking lines need to be shielded in this scenario.

[0055] See also Figure 1A , which is a schematic diagram of an implementation flow of the detection method of the indicator line. Figure 1A As shown, the detection method of the indicator line specifically includes the following steps:

[0056] S11, obtaining a parking lot image, and performing semantic segmentation on the parking lot image to obtain a parking lot segmentation image, for example, Figure 2A shown.

[0057] In this embodiment, semantic segmentation is performed on the parking lot image using a pre-stored semantic segmentation network model.

[0058] S12, traversing the parking lot segmentation image, and processing the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively.

[0059] Specifically, S12 includes: extracting lane lines from the parking lot segmentation image according to the RGB threshold of the lane lines to form the lane line semantic map, wherein the lane line semantic map is as follows: Figure 2B shown.

[0060] Specifically, the S12 further includes: extracting the longitudinal parking lines from the parking lot segmentation image according to the RGB threshold of the longitudinal parking lines to form the parking line semantic map, and the parking line semantic map is shown in 2C.

[0061] S13, calculating the angle between the lane line and the vehicle's forward direction. In one embodiment, the calculated angle between the lane line and the vehicle's forward direction is used to achieve lane line fitting by rotating the lane line semantic graph.

[0062] Specifically, the S13 includes:

[0063] Traversing half of the lane line semantic map horizontally from the left and right sides respectively with a preset step size;

[0064] Record the number of pixels in each row traversed and save the pixel coordinates of the pixel points in each row;

[0065] Add the pixels of each row and classify the pixel sums of each row (specifically, classify the pixels and the same or similar rows into one class), and select the largest class with the largest number of rows (selecting the largest class means that the pixel and the same or similar rows appear most frequently);

[0066] Find the average coordinates of each row in the largest class;

[0067] The tangent angle between two adjacent coordinates is calculated, and all the calculated tangent angles are averaged. The averaged tangent angle is defined as the angle between the lane line and the vehicle's forward direction.

[0068] S14, obtaining lane line points in the lane line semantic map, and fitting the lane line according to the lane line points.

[0069] In this embodiment, the S14 includes:

[0070] S141, rotating the lane line semantic map around the center of the image according to the calculated angle between the lane line and the vehicle's forward direction;

[0071] S142, longitudinally traversing the rotated lane line semantic graph, searching for lane lines, and obtaining coordinates of fitting points corresponding to the lane lines;

[0072] S143, reversely rotate the lane line points to obtain the corresponding coordinate points in the lane line semantic map, so as to fit the lane lines through the lane line points corresponding to the coordinate points in the lane line semantic map.

[0073] S15, obtaining longitudinal parking space line points from the parking space line semantic graph, and fitting the longitudinal parking space line according to the longitudinal parking space line points.

[0074] Specifically, the S15 includes:

[0075] According to the calculated angle between the lane line and the vehicle's forward direction, the parking space line semantic map is rotated around the center of the image;

[0076] Traverse the rotated parking space line semantic graph horizontally, and filter out the horizontal parking space lines by presetting the parking space line threshold;

[0077] Traverse the rotated parking space line semantic graph longitudinally, search for the longitudinal parking space line, and obtain the coordinates of the fitting points corresponding to the longitudinal parking space line;

[0078] The longitudinal parking space line points are reversely rotated to obtain the coordinate points corresponding to the longitudinal parking space line semantic graph, so as to fit the longitudinal parking space line through the coordinate points corresponding to the longitudinal parking space line points in the parking space line semantic graph.

[0079] It should be noted that, in actual applications, steps S14 and S15 can be executed simultaneously or in sequence, and the present application is not limited thereto.

[0080] S16, integrating the fitted lane lines and longitudinal parking space lines, and outputting the fitted lane lines and longitudinal parking space lines, for example Figure 3 An example of the fitting results of lane lines and longitudinal parking space lines is shown.

[0081] See also Figure 1B , which is another schematic diagram of the implementation process of the detection method of the indicator line. Figure 1B As shown, the detection method of the indicator line specifically includes:

[0082] S11 ′, obtaining a parking lot image, and performing semantic segmentation on the parking lot image to obtain a parking lot segmentation image.

[0083] In this embodiment, semantic segmentation is performed on the parking lot image using a pre-stored semantic segmentation network model.

[0084] S12', traversing the parking lot segmentation image, and processing the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively.

[0085] Specifically, the S12' includes: extracting lane lines from the parking lot segmentation image according to the RGB threshold of the lane lines to form the lane line semantic map.

[0086] Specifically, the S12' further includes: extracting the longitudinal parking space lines from the parking lot segmentation image according to the RGB threshold of the longitudinal parking space lines to form the parking space line semantic map.

[0087] S13', acquiring lane line points in the lane line semantic map, and fitting the lane line according to the lane line points.

[0088] In this embodiment, the S13' includes:

[0089] S131', traversing the lane line semantic map horizontally with a preset step length, recording the coordinates of the lane line boundary points at each horizontal position and counting the number of lane line boundary points;

[0090] S132', classify the horizontal positions with the same number of lane line boundary points, find the horizontal position of the largest class and the coordinates of the lane line boundary points at the horizontal position, and calculate the center position coordinates between any two adjacent lane line points;

[0091] S133', respectively fitting the center points belonging to the same lane line to fit the lane line, and calculating the angle between the lane line and the forward direction of the vehicle.

[0092] In this embodiment, the lane line fitting in S133' adopts the fitting function fitline() of opencv, and the distance parameter is the L2 distance, that is, the least squares fitting method.

[0093] In another lane line fitting method, the angle between the lane line and the vehicle's forward direction is calculated based on the slope k of the fitted lane line.

[0094] Specifically, the slope k is negative, and the angle between the lane line and the vehicle's forward direction = 90 + arctan (k);

[0095] The slope k is positive, and the angle between the lane line and the vehicle's forward direction = arctan(k)–90.

[0096] S14', obtaining longitudinal parking line points from the parking line semantic graph, and fitting the longitudinal parking line according to the longitudinal parking line points.

[0097] Specifically, the S14' includes:

[0098] According to the calculated angle between the lane line and the vehicle's forward direction, the parking space line semantic map is rotated around the center of the image;

[0099] Traverse the rotated parking space line semantic graph horizontally, and filter out the horizontal parking space lines by presetting the parking space line threshold;

[0100] Traverse the rotated parking space line semantic graph longitudinally, search for the longitudinal parking space line, and obtain the coordinates of the fitting points corresponding to the longitudinal parking space line;

[0101] The longitudinal parking space line points are reversely rotated to obtain the coordinate points corresponding to the longitudinal parking space line semantic graph, so as to fit the longitudinal parking space line through the coordinate points corresponding to the longitudinal parking space line points in the parking space line semantic graph.

[0102] It should be noted that, in practical applications, steps S13 ′ and S14 ′ may be performed simultaneously or in sequence, and the present application is not limited thereto.

[0103] S15', integrating the fitted lane lines and longitudinal parking space lines, and outputting the fitted lane lines and longitudinal parking space lines.

[0104] See also Figure 1C , which is a schematic diagram of another implementation flow of the detection method of the indicator line. Figure 1C As shown, the detection method of the indicator line specifically includes the following steps:

[0105] S11”, obtaining a parking lot image, and performing semantic segmentation on the parking lot image to obtain a parking lot segmentation image.

[0106] In this embodiment, semantic segmentation is performed on the parking lot image using a pre-stored semantic segmentation network model.

[0107] S12”, traverse the parking lot segmentation image, and process the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively.

[0108] Specifically, the S12" includes: extracting lane lines from the parking lot segmentation image according to the RGB threshold of the lane lines to form the lane line semantic map.

[0109] Specifically, the S12" further includes: extracting the longitudinal parking space lines from the parking lot segmentation image according to the RGB threshold of the longitudinal parking space lines to form the parking space line semantic map.

[0110] S13”, calculate the angle between the longitudinal parking space line and the longitudinal axis of the vehicle.

[0111] Specifically, S13" includes the following steps:

[0112] Traversing half of the parking space line semantic graph horizontally from the left and right sides respectively with a preset step length;

[0113] Record the number of pixels in each row traversed and save the pixel coordinates of the pixel points in each row;

[0114] Add the pixels of each row, and classify the pixel sums of each row (specifically, classify the pixels and the same or similar rows into one class), and select the largest class with the most rows (selecting the largest class means that the pixel and the same or similar rows appear most frequently);

[0115] Find the average coordinates of each row in the largest class;

[0116] Calculate the angle between two adjacent coordinates, average all the calculated angles, and determine whether the averaged angle is greater than a preset angle threshold; if so, define the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle; if not, define the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle.

[0117] S14”, the step of obtaining longitudinal parking line points in the parking line semantic graph, and fitting the longitudinal parking line according to the longitudinal parking line points includes:

[0118] S141” rotates the parking space line semantic image about the center of the image according to the calculated angle between the longitudinal parking space line and the longitudinal axis of the vehicle, such as Figure 4 An example of a rotated parking space line semantic graph is shown.

[0119] In this embodiment, the rotation matrix of the pixel coordinates can be calculated according to the image center of the parking space line semantic map and the calculated angle between the longitudinal parking space line and the longitudinal axis of the vehicle or the angle between the lane line and the forward direction of the vehicle as the rotation angle.

[0120] Specifically, point O is the center of the circle. After point P rotates r radians around point O, the coordinates of point P are transformed into the calculation formula of point Q as follows:

[0121] Qx=Px*cos(r)-Py*sin(r)

[0122] Qy=Px*sin(r)+Py*cos(r)

[0123] S142", the largest rectangle including the image after rotation can be obtained according to the rotation angle and the original height and width, and the areas without image elements are filled with black.

[0124] S143”, traverse the rotated parking space line semantic graph horizontally, and filter out the horizontal parking space lines by using a preset parking space line threshold.

[0125] S144”, longitudinally traverse the rotated parking space line semantic graph, search for the longitudinal parking space line, and obtain the coordinates of the fitting points corresponding to the longitudinal parking space line, for example, Figure 5 The longitudinal parking line points are shown.

[0126] In this embodiment, since the parking line semantic graph is rotated, the longitudinal parking line is vertical. If the sum of the pixels at a certain longitudinal position exceeds a certain pixel threshold, it is considered that there is a longitudinal parking line at this position. After searching all the positions where the longitudinal parking line is considered to exist, the positions that are close to each other are classified according to the distance. The coordinates of the fitting point corresponding to the longitudinal parking line are obtained. The position is the horizontal coordinate x, and the vertical coordinate y is obtained by customizing, that is, a point is taken at a certain distance from top to bottom.

[0127] S145", reverse the rotation of the longitudinal parking line point (see Figure 6, which is displayed as the longitudinal parking line point after reverse rotation), obtains the coordinate point corresponding to the parking line semantic map, so as to fit the longitudinal parking line through the longitudinal parking line point corresponding to the coordinate point of the parking line semantic map, and the longitudinal parking line obtained by fitting is as follows: Figure 7 shown.

[0128] S15”, obtaining lane line points in the lane line semantic map, and fitting the lane line according to the lane line points.

[0129] In this embodiment, the S15" includes:

[0130] S151”, traverse the lane line semantic map horizontally with a preset step length, record the coordinates of the lane line boundary points at each horizontal position and count the number of lane line boundary points, see Figure 8 , which is displayed as a statistical diagram of the boundary points of the lane line;

[0131] S152”, classify the horizontal positions with the same number of lane line points, find the horizontal position of the largest class and the coordinates of the boundary points of the lane line at the horizontal position, and calculate the coordinates of the center position between the boundary points of two adjacent lane lines;

[0132] S153", respectively fit the center points belonging to the same lane line, for example Fig. 9 The center point of the fitted lane line is shown to fit the lane line and calculate the angle between the lane line and the vehicle's forward direction.

[0133] In this embodiment, the lane line fitting in S153" adopts the fitting function fitline() of opencv, and the distance parameter is the L2 distance, that is, the least squares fitting method. In practical applications, steps S14" and S15" can be executed simultaneously or in sequence, such as Figure 1C As shown in , in this embodiment, steps S14" and S15" are performed simultaneously.

[0134] S16”, the fitted lane lines and longitudinal parking space lines are integrated, and the fitted lane lines and longitudinal parking space lines are output.

[0135] The indicator line detection method described in this embodiment has the following beneficial effects:

[0136] First, this embodiment can greatly reduce the resource consumption of the detection task and meet the accuracy requirements. Among them, the lane line fitting method has a simple idea and does not involve complex conversion. The image traversal only involves the preset horizontal position and does not involve the entire image traversal. The calculation is a simple count and addition and subtraction, which consumes less resources.

[0137] Second, the fitting method of the longitudinal parking space line of this embodiment is to first obtain the deflection angle, and then convert it into a longitudinal search by rotating the image, which cleverly simplifies the difficulty of detecting the inclined longitudinal parking space line, has a simple idea, and a small amount of calculation.

[0138] Third, this embodiment can improve the efficiency and accuracy of lane line and parking space line fitting during the vehicle parking process, making the vehicle driving path more accurate and facilitating the vehicle to automatically search for parking spaces.

[0139] Embodiment 2

[0140] This embodiment provides a method for detecting an indicator line, wherein the indicator line includes a longitudinal parking space line. The method for detecting an indicator line includes:

[0141] Acquire a parking lot image, and perform semantic segmentation on the parking lot image to obtain a parking lot segmentation image;

[0142] Traversing the parking lot segmentation image, and processing the parking lot segmentation image into a parking space line semantic graph;

[0143] Obtaining longitudinal parking line points from the parking line semantic graph, and fitting the longitudinal parking line according to the longitudinal parking line points;

[0144] The fitted longitudinal parking space line is output.

[0145] The following will describe in detail the detection method of the indicator line provided by this embodiment in conjunction with the diagram. This embodiment is applied to the indicator line including the longitudinal parking space line. Fig.10 , which is a schematic flow chart of another embodiment of the method for detecting the indicator line. Fig.10 As shown, the detection method of the indicator line specifically includes the following steps:

[0146] S101, obtaining a parking lot image, and performing semantic segmentation on the parking lot image to obtain a parking lot segmentation image.

[0147] S102, traversing the parking lot segmentation image, and processing the parking lot segmentation image into a parking space line semantic graph.

[0148] According to the RGB threshold of the longitudinal parking space lines, the longitudinal parking space lines are extracted from the parking lot segmentation image to form the parking space line semantic map.

[0149] S103, calculating the angle between the longitudinal parking space line and the longitudinal axis of the vehicle.

[0150] Specifically, S103 includes the following steps:

[0151] Traversing half of the parking space line semantic graph horizontally from the left and right sides respectively with a preset step length;

[0152] Record the number of pixels in each row traversed and save the pixel coordinates of the pixel points in each row;

[0153] Add the pixels of each row, and classify the pixel sums of each row (specifically, classify the pixels and the same or similar rows into one class), and select the largest class with the most rows (selecting the largest class means that the pixel and the same or similar rows appear most frequently);

[0154] Find the average coordinates of each row in the largest class;

[0155] Calculate the angle between two adjacent coordinates, average all the calculated angles, and determine whether the averaged angle is greater than a preset angle threshold; if so, define the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle; if not, define the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle.

[0156] S104, obtaining longitudinal parking space line points from the parking space line semantic graph, and fitting the longitudinal parking space line according to the longitudinal parking space line points.

[0157] Specifically, the S104 includes:

[0158] According to the calculated angle between the longitudinal parking line and the longitudinal axis of the vehicle or the angle between the lane line and the forward direction of the vehicle, the parking line semantic map is rotated about the center of the image.

[0159] In this embodiment, the rotation matrix of the pixel coordinates can be calculated according to the image center of the parking space line semantic map and the calculated angle between the longitudinal parking space line and the longitudinal axis of the vehicle or the angle between the lane line and the forward direction of the vehicle as the rotation angle.

[0160] Specifically, point O is the center of the circle. After point P rotates r radians around point O, the coordinates of point P are transformed into the calculation formula of point Q as follows:

[0161] Qx=Px*cos(r)-Py*sin(r)

[0162] Qy=Px*sin(r)+Py*cos(r)

[0163] According to the rotation angle and the original height and width, the largest rectangle that includes the image after rotation can be found, and the places without picture elements are filled with black.

[0164] The rotated parking space line semantic graph is traversed horizontally, and the horizontal parking space lines are filtered out by presetting the parking space line threshold. In this embodiment, filtering out the horizontal parking space lines can better find the point coordinates of the vertical parking space lines.

[0165] Traverse the rotated parking space line semantic graph longitudinally, search for the longitudinal parking space line, and obtain the coordinates of the fitting points corresponding to the longitudinal parking space line.

[0166] In this embodiment, since the parking line semantic graph is rotated, the longitudinal parking line is vertical. If the sum of the pixels at a certain longitudinal position exceeds a certain pixel threshold, it is considered that there is a longitudinal parking line at this position. After searching all the positions where the longitudinal parking line is considered to exist, the positions that are close to each other are classified according to the distance. The coordinates of the fitting point corresponding to the longitudinal parking line are obtained. The position is the horizontal coordinate x, and the vertical coordinate y is obtained by customizing, that is, a point is taken at a certain distance from top to bottom.

[0167] The longitudinal parking space line points are reversely rotated to obtain the coordinate points corresponding to the longitudinal parking space line semantic graph, so as to fit the longitudinal parking space line through the coordinate points corresponding to the longitudinal parking space line points in the parking space line semantic graph.

[0168] Specifically, the inverse rotation matrix is ​​obtained by inverting the obtained rotation matrix, and the longitudinal parking space line points are inversely rotated using the inverse rotation matrix.

[0169] Embodiment 3

[0170] In an embodiment, the present application provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the indicator line detection method described in Embodiment 1 and Embodiment 2 is implemented.

[0171] At any possible level of technical detail combination, the present application may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present application.

[0172] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0173] The computer-readable program described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives a computer-readable program instruction from the network, and forwards the computer-readable program instruction for storage in the computer-readable storage medium in each computing / processing device. The computer program instruction for performing the operation of the present application can be an assembly instruction, an instruction set architecture (ISA) instruction, a machine instruction, a machine-related instruction, a microcode, a firmware instruction, a state setting data, an integrated circuit configuration data, or a source code or object code written in any combination of one or more programming languages, wherein the programming language includes an object-oriented programming language, such as Smalltalk, C++, etc., and a procedural programming language, such as "C" language or similar programming language. Computer readable program instructions can be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In certain embodiments, by using the state information of computer readable program instructions to personalize electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), the electronic circuits can execute computer readable program instructions, thereby realizing various aspects of the present application.

[0174] Embodiment 4

[0175] This embodiment provides a detection system for indicator lines, wherein the indicator lines include longitudinal parking space lines and / or lane lines;

[0176] The detection system of the indicator line comprises:

[0177] An acquisition module, used for acquiring parking lot images;

[0178] A segmentation module, used for performing semantic segmentation on the parking lot image to obtain a parking lot segmentation image;

[0179] A fitting processing module is used for, when the indication line includes longitudinal parking lines and lane lines, traversing the parking lot segmentation image, processing the parking lot segmentation image into a lane line semantic map and a parking line semantic map respectively; obtaining lane line points in the lane line semantic map, fitting the lane lines according to the lane line points, and obtaining longitudinal parking line points in the parking line semantic map, fitting the longitudinal parking lines according to the longitudinal parking line points; or when the indication line includes only longitudinal parking lines, obtaining longitudinal parking line points in the parking line semantic map, fitting the longitudinal parking lines according to the longitudinal parking line points;

[0180] The output module is used to integrate the fitted lane lines and longitudinal parking space lines and output them or only output the fitted longitudinal parking space lines.

[0181] The following will describe in detail the indicator line detection system provided by this embodiment with reference to the drawings. Fig.11 , which is a schematic diagram showing the principle structure of a detection system for an indicator line in one embodiment. Fig.11 As shown, the indicator line detection system 11 includes: an acquisition module 111 , a segmentation module 112 , a fitting processing module 113 and an output module 114 .

[0182] The acquisition module 111 is used to acquire parking lot images.

[0183] The segmentation module 112 is used to perform semantic segmentation on the parking lot image to obtain a parking lot segmentation image.

[0184] In this embodiment, the segmentation module 112 performs semantic segmentation on the parking lot image by using a pre-stored semantic segmentation network model.

[0185] The fitting processing module 113 is used to traverse the parking lot segmentation image when the indication line includes a longitudinal parking space line and a lane line, and process the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively; obtain lane line points in the lane line semantic map, fit the lane lines according to the lane line points, and obtain longitudinal parking space line points in the parking space line semantic map, and fit the longitudinal parking space lines according to the longitudinal parking space line points.

[0186] Specifically, the fitting processing module 113 calculates the angle between the lane line and the vehicle's forward direction; according to the calculated angle between the lane line and the vehicle's forward direction, the lane line semantic map is rotated with the center of the image as the center; the rotated lane line semantic map is traversed longitudinally, the lane line is searched, and the coordinates of the fitting points corresponding to the lane line are obtained; the lane line points are reversely rotated to obtain the coordinate points corresponding to them in the lane line semantic map, so as to fit the lane lines through the lane line points corresponding to the coordinate points in the lane line semantic map.

[0187] The process of the fitting processing module 113 calculating the angle between the lane line and the vehicle's forward direction includes: traversing half of the lane line semantic map horizontally from the left and right sides respectively with a preset step size; recording the number of pixels in each row traversed, and saving the pixel coordinates of the pixel points in each row; adding the pixels of each row, and classifying the pixel sums of each row, and selecting the largest class including the largest number of rows; obtaining the average coordinates of each row in the largest class; calculating the tangent angle between two adjacent coordinates, and averaging all the calculated tangent angles, and defining the averaged tangent angle as the angle between the lane line and the vehicle's forward direction.

[0188] The fitting processing module 113 is also used to rotate the parking line semantic map about the center of the image according to the calculated angle between the lane line and the vehicle's forward direction; to traverse the rotated parking line semantic map horizontally, and to filter out the horizontal parking lines by using a preset parking line threshold; to traverse the rotated parking line semantic map vertically, to search for the longitudinal parking lines, and to obtain the coordinates of the fitting points corresponding to the longitudinal parking lines; to reversely rotate the longitudinal parking line points, and to obtain the coordinate points corresponding to them in the parking line semantic map, so as to fit the longitudinal parking lines by corresponding the longitudinal parking line points to the coordinate points in the parking line semantic map.

[0189] The fitting processing module 113 is also used to calculate the angle between the longitudinal parking line and the longitudinal axis of the vehicle; according to the calculated angle between the longitudinal parking line and the longitudinal axis of the vehicle, the parking line semantic map is rotated about the center of the image; the rotated parking line semantic map is traversed horizontally, and the horizontal parking lines are filtered out by a preset parking line threshold; the rotated parking line semantic map is traversed vertically, the longitudinal parking lines are searched, and the coordinates of the fitting points corresponding to the longitudinal parking lines are obtained; the longitudinal parking line points are reversely rotated to obtain the coordinate points corresponding to them in the parking line semantic map, so as to fit the longitudinal parking lines through the longitudinal parking line points corresponding to the coordinate points in the parking line semantic map.

[0190] The process of the fitting processing module 113 calculating the angle between the longitudinal parking line and the longitudinal axis of the vehicle includes: traversing half of the parking line semantic map horizontally from the left and right sides respectively with a preset step size; recording the number of pixels in each row traversed, and saving the pixel coordinates of the pixel points in each row; adding the pixels of each row, and classifying the pixel sums of each row, and selecting the largest class including the largest number of rows; obtaining the average coordinates of each row in the largest class; calculating the angle between two adjacent coordinates, and averaging all the calculated angles, and judging whether the averaged angle is greater than the preset angle threshold; if so, defining the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle; if not, defining the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle.

[0191] The output module 113 is used to integrate the fitted lane lines and longitudinal parking space lines, and output the integrated lane lines and longitudinal parking space lines.

[0192] The fitting processing module 113 is further configured to obtain longitudinal parking line points from the parking line semantic graph when the indication line only includes the longitudinal parking line, and fit the longitudinal parking line according to the longitudinal parking line points.

[0193] Specifically, when the indication line only includes the longitudinal parking line, the fitting processing module 113 calculates the angle between the longitudinal parking line and the longitudinal axis of the vehicle; according to the calculated angle between the longitudinal parking line and the longitudinal axis of the vehicle, the parking line semantic map is rotated with the center of the image; the rotated parking line semantic map is traversed horizontally, and the horizontal parking lines are filtered out by a preset parking line threshold; the rotated parking line semantic map is traversed vertically, the longitudinal parking lines are searched, and the coordinates of the corresponding fitting points of the longitudinal parking lines are obtained; the longitudinal parking line points are reversely rotated to obtain the corresponding coordinate points in the parking line semantic map, so as to fit the longitudinal parking lines through the longitudinal parking line points corresponding to the coordinate points in the parking line semantic map.

[0194] The output module 114 is used to output the fitted longitudinal parking space line.

[0195] The detection systems and detection methods of the above indicator lines correspond one to one, and will not be described in detail here.

[0196] It should be noted that it should be understood that the division of the various modules of the above system is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements, or they can all be implemented in the form of hardware, or some modules can be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example: the x module can be a separately established processing element, or it can be integrated in a certain chip of the above system. In addition, the x module can also be stored in the memory of the above system in the form of program code, and called and executed by a certain processing element of the above system. The implementation of other modules is similar. These modules can be integrated together in whole or in part, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software. The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), one or more digital singnal processors (DSP), one or more field programmable gate arrays (FPGA), etc. When a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. These modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0197] Embodiment 5

[0198] The present embodiment provides an indicator line detection device, comprising: a processor, a memory, a transceiver, a communication interface and / or a system bus; the memory and the communication interface are connected to the processor and the transceiver through the system bus and complete mutual communication, the memory is used to store computer programs, the communication interface is used to communicate with other devices, and the processor and the transceiver are used to run the computer program, so that the indicator line detection device performs the various steps of the indicator line detection method described in Embodiment 1 and Embodiment 2.

[0199] The system bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage.

[0200] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0201] The protection scope of the indicator line detection method described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0202] The present invention also provides an indicator line detection system, which can implement the indicator line detection and access method described in the present invention. However, the implementation device of the indicator line detection method described in the present invention includes but is not limited to the structure of the indicator line detection system listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.

[0203] In summary, the indicator line detection method, system, device and computer-readable storage medium of the present invention have the following features:

[0204] Beneficial effects:

[0205] First, the present invention can greatly reduce the resource consumption of the detection task and meet the accuracy requirements. Among them, the lane line fitting method has a simple idea and does not involve complex conversion. The image traversal only involves the preset horizontal position and does not involve the entire image traversal. The calculation is a simple counting and addition and subtraction, which consumes less resources.

[0206] Secondly, the longitudinal parking line fitting method of the present invention first obtains the deflection angle, and converts it into a longitudinal search by rotating the image, which cleverly simplifies the difficulty of detecting the inclined longitudinal parking line, has a simple idea, and requires little calculation.

[0207] Third, the present invention can improve the efficiency and accuracy of lane line and parking space line fitting during vehicle parking, making the vehicle driving path more accurate and facilitating the vehicle to automatically search for parking spaces. The present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

[0208] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for detecting an indicator line, characterized in that: The indicator lines include longitudinal parking space lines and lane lines; the detection method of the indicator lines includes: Acquire a parking lot image, and perform semantic segmentation on the parking lot image to obtain a parking lot segmentation image; Traversing the parking lot segmentation image, and processing the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively; Acquire lane line points in the lane line semantic map, and fit the lane line according to the lane line points; Obtaining longitudinal parking line points from the parking line semantic graph, and fitting the longitudinal parking line according to the longitudinal parking line points; Integrate the fitted lane lines and longitudinal parking space lines and output them; The step of acquiring lane line points in the lane line semantic map and fitting the lane line according to the lane line points comprises: The lane line semantic map is traversed horizontally with a preset step length, the coordinates of the lane line boundary points at each horizontal position are recorded, and the number of lane line boundary points is counted.

2. The method for detecting an indicator line according to claim 1, characterized in that: The step of acquiring lane line points in the lane line semantic map and fitting the lane line according to the lane line points further includes: Classify the horizontal positions with the same number of lane line boundary points, find the horizontal position of the largest class and the coordinates of the lane line boundary points at the horizontal position, and calculate the center position coordinates between the boundary points of two adjacent lane lines; The center points belonging to the same lane line are respectively fitted to fit the lane line.

3. The method for detecting an indicator line according to claim 1, characterized in that: The step of acquiring lane line points in the lane line semantic map and fitting the lane line according to the lane line points also includes: calculating the angle between the lane line and the vehicle's forward direction.

4. The method for detecting an indicator line according to claim 1, characterized in that: The step of processing the parking lot segmentation image into a lane line semantic map comprises: The lane lines are extracted from the parking lot segmentation image according to the RGB threshold of the lane lines to form the lane line semantic map.

5. The method for detecting an indicator line according to claim 3, characterized in that: The step of calculating the angle between the lane line and the vehicle's forward direction comprises: Traversing half of the lane line semantic map horizontally from the left and right sides respectively with a preset step size; Record the number of pixels in each row traversed and save the pixel coordinates of the pixel points in each row; Add the pixels of each row, classify the pixel sums of each row, and select the largest class with the most rows; Find the average coordinates of each row in the largest class; The tangent angle between two adjacent coordinates is calculated, and all the calculated tangent angles are averaged. The averaged tangent angle is defined as the angle between the lane line and the vehicle's forward direction.

6. The method for detecting an indicator line according to claim 1, characterized in that: The step of processing the parking lot segmentation image into a parking space line semantic map comprises: According to the RGB threshold of the longitudinal parking space lines, the longitudinal parking space lines are extracted from the parking lot segmentation image to form the parking space line semantic map.

7. The method for detecting an indicator line according to claim 3, characterized in that: The step of obtaining longitudinal parking line points from the parking line semantic graph and fitting the longitudinal parking line according to the longitudinal parking line points comprises: According to the angle between the lane line and the vehicle's forward direction, the parking space line semantic image is rotated about the center of the image; Traverse the rotated parking space line semantic graph horizontally, and filter out the horizontal parking space lines by presetting the parking space line threshold; Traverse the rotated parking space line semantic graph longitudinally, search for the longitudinal parking space line, and obtain the coordinates of the fitting points corresponding to the longitudinal parking space line; The longitudinal parking space line points are reversely rotated to obtain the coordinate points corresponding to the longitudinal parking space line semantic graph, so as to fit the longitudinal parking space line through the coordinate points corresponding to the longitudinal parking space line points in the parking space line semantic graph.

8. The method for detecting an indicator line according to claim 1, characterized in that: Before the step of fitting the longitudinal parking space line, the detection method further comprises: calculating an angle between the longitudinal parking space line and the longitudinal axis of the vehicle.

9. The method for detecting an indicator line according to claim 8, characterized in that: The step of calculating the angle between the longitudinal parking space line and the longitudinal axis of the vehicle comprises: Traversing half of the parking space line semantic graph horizontally from the left and right sides respectively with a preset step length; Record the number of pixels in each row traversed and save the pixel coordinates of the pixel points in each row; Add the pixels of each row, classify the pixel sums of each row, and select the largest class with the most rows; Find the average coordinates of each row in the largest class; Calculate the angle between two adjacent coordinates, average all the calculated angles, and determine whether the averaged angle is greater than a preset angle threshold; if so, define the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle; if not, define the complementary angle of the averaged angle as the angle between the longitudinal parking line and the longitudinal axis of the vehicle.

10. The method for detecting an indicator line according to claim 8, characterized in that: The step of obtaining longitudinal parking line points from the parking line semantic graph and fitting the longitudinal parking line according to the longitudinal parking line points comprises: According to the angle between the longitudinal parking space line and the longitudinal axis of the vehicle, the parking space line semantic image is rotated about the center of the image; Traverse the rotated parking space line semantic graph horizontally, and filter out the horizontal parking space lines by presetting the parking space line threshold; Traverse the rotated parking space line semantic graph longitudinally, search for the longitudinal parking space line, and obtain the coordinates of the fitting points corresponding to the longitudinal parking space line; The longitudinal parking space line points are reversely rotated to obtain the coordinate points corresponding to the longitudinal parking space line semantic graph, so as to fit the longitudinal parking space line through the coordinate points corresponding to the longitudinal parking space line points in the parking space line semantic graph.

11. The method for detecting an indicator line according to claim 10, characterized in that: The step of obtaining longitudinal parking line points from the parking line semantic graph and fitting the longitudinal parking line according to the longitudinal parking line points also includes: According to the rotation angle and the original height and width of the parking space line semantic map, obtaining the largest rectangle including the image after rotation; The positions without picture elements in the largest rectangle are filled with black.

12. A detection system for an indicator line, characterized in that: The indicator line includes a longitudinal parking space line and a lane line or only includes a longitudinal parking space line; the detection system of the indicator line includes: An acquisition module, used for acquiring parking lot images; A segmentation module, used for performing semantic segmentation on the parking lot image to obtain a parking lot segmentation image; The fitting processing module is used for, when the indication line includes a longitudinal parking space line and a lane line, traversing the parking lot segmentation image, processing the parking lot segmentation image into a lane line semantic map and a parking space line semantic map respectively; obtaining lane line points in the lane line semantic map, and fitting the lane lines according to the lane line points; obtaining longitudinal parking space line points in the parking space line semantic map, and fitting the longitudinal parking space lines according to the longitudinal parking space line points; wherein, obtaining lane line points in the lane line semantic map, and fitting the lane lines according to the lane line points comprises: Traversing the lane line semantic map horizontally with a preset step length, recording the coordinates of the lane line boundary points at each horizontal position and counting the number of lane line boundary points; The output module is used to integrate the fitted lane lines and longitudinal parking space lines and output them or only output the fitted longitudinal parking space lines.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the indicator line detection method according to any one of claims 1 to 11 is implemented.

14. An indicator line detection device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the detection device performs the indicator line detection method according to any one of claims 1 to 11.