A method and related device for correcting parking space corner points

By screening and classifying parking spaces in the top view of the parking spaces around the vehicle, targeted correction strategies are adopted to solve the problem of inaccurate positioning of the parking space corners, and the accuracy and user experience of automatic parking technology are improved.

CN115339436BActive Publication Date: 2025-08-15SAIC MOTOR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110528107.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-14
Publication Date
2025-08-15
Estimated Expiration
2041-05-14

AI Technical Summary

Technical Problem

In the prior art, the positioning of the corner points of the parking space is not accurate enough, resulting in a decrease in the accuracy and user experience of automatic parking technology.

Method used

Through the vehicle's top view of the parking spaces and the parking space detection algorithm, the corner coordinates and confidence of the parking spaces are obtained, and the parking spaces to be corrected are selected, and the parking spaces to be corrected according to the parking space types are classified. Different corner point correction strategies are used to correct the same row and the individual parking spaces.

Benefits of technology

It improves the accuracy of the corner points of the parking space, thereby improving the accuracy and user experience of automatic parking technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115339436B_ABST
    Figure CN115339436B_ABST
Patent Text Reader

Abstract

The present application discloses a method and related device for correcting parking space corner points. The method includes: obtaining the coordinates of the parking space corner points of multiple parking spaces and each parking space, and the parking space corner point confidence level based on a bird's-eye view of parking spaces around a vehicle and a parking space detection algorithm; determining multiple parking spaces to be corrected from the multiple parking spaces based on the parking space corner point coordinates and parking space corner point confidence level; determining the parking space type of each parking space to be corrected based on the parking space corner point coordinates of each parking space to be corrected; classifying the multiple parking spaces to be corrected into parking spaces of the same type in the same row or as individual parking spaces based on the parking space corner point coordinates, parking space corner point confidence level, and parking space type of the multiple parking spaces to be corrected; and correcting the parking space corner points of the same type in the same row and as individual parking spaces using different corner point correction strategies. The method effectively corrects the located parking space corner points in a targeted manner to improve the accuracy of the parking space corner points, thereby making the parking space determination more accurate, improving the accuracy of the automatic parking technology, and enhancing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and related device for correcting parking space corner points. Background Art

[0002] With rising living standards, most people choose to travel by car. The increasing number of vehicles has led to parking becoming a major concern for users. To alleviate this burden, automated parking technology has emerged. However, automated parking requires the identification of parking spaces, which are typically described by the coordinates of the four corner points of a parking space. The accuracy of these corner point positioning directly affects the accuracy of the parking space determination, and thus the accuracy of automated parking technology.

[0003] At present, the vehicle surround view system has been applied to most vehicles. The vehicle surround view system can detect the parking spaces around the vehicle, obtain the four-way fisheye view of the front, rear, left and right of the vehicle, and send it to the vehicle parking system. The vehicle parking system splices the four-way fisheye view of the front, rear, left and right to obtain a bird's-eye view of the parking spaces around the vehicle centered on the vehicle; based on the bird's-eye view of the parking spaces around the vehicle, the parking space corner points are located through the parking space corner point detection algorithm, so that automatic parking can be performed according to the located parking space corner points.

[0004] However, after research, the inventors found that there is a certain error between the parking space corner points located in the above method and the actual parking space corner points, that is, the located parking space corner points are not accurate enough; this leads to inaccurate determination of the parking space, reducing the accuracy of the automatic parking technology, and thus affecting the user experience. Summary of the Invention

[0005] In view of this, the embodiments of the present application provide a method and related device for correcting parking space corner points, which effectively correct the positioned parking space corner points to improve the accuracy of the parking space corner points, making the subsequent determination of parking spaces more accurate, thereby improving the accuracy of automatic parking technology and enhancing the user experience.

[0006] In a first aspect, an embodiment of the present application provides a method for correcting a parking space corner point, the method comprising:

[0007] Obtaining a plurality of parking spaces and the coordinates of parking corner points and parking corner point confidence levels of each parking space according to a top view of parking spaces surrounding the vehicle and a parking space detection algorithm;

[0008] Determining a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and parking space corner point confidence levels of each parking space;

[0009] Determining the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected;

[0010] Classifying the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces according to the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected;

[0011] Different corner point correction strategies are used to correct the corner points of the parking spaces of the same type in the same row and the individual parking spaces.

[0012] Optionally, the parking space corner point coordinates include two parking space front corner point coordinates and two parking space rear corner point coordinates, and the parking space corner point confidences include two parking space front corner point confidences and two parking space rear corner point confidences.

[0013] Optionally, determining a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and parking space corner point confidence of each parking space includes:

[0014] For each of the parking spaces, calculating the angles of the two front corner points of the parking space and the angles of the two rear corner points of the parking space according to the coordinates of the two front corner points of the parking space and the coordinates of the two rear corner points of the parking space;

[0015] If the absolute value of the difference between the angle of the front corner point of the parking space and the angle of the rear corner point of the parking space in each pair of parking space diagonal points is less than the preset angle, and the sum of the confidence levels of the two front corner points of the parking space is greater than the sum of the confidence levels of the two rear corner points of the parking space, the parking space is determined to be the parking space to be corrected.

[0016] Optionally, determining the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected includes:

[0017] For each parking space to be corrected, the lengths of the parking space entrance line, the parking space bottom line, and the two parking space side lines are calculated based on the coordinates of the two front corner points of the parking space and the coordinates of the two rear corner points of the parking space;

[0018] The parking space type of the to-be-corrected parking space is determined to be a vertical parking space, a horizontal parking space, or an oblique parking space according to the angles of the two parking space front corner points, the parking space entrance line, the parking space bottom line, and the lengths of the two parking space side lines.

[0019] Optionally, the classifying the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces according to the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected includes:

[0020] From the plurality of parking spaces to be corrected, determine the parking space to be corrected having the largest sum of confidence scores of the front corner points of the two parking spaces as the current parking space;

[0021] The coordinates of the two front corner points of the current parking space form a baseline, and the distances between the coordinates of the two front corner points of other parking spaces to be corrected and the baseline are traversed;

[0022] When the distances are all less than the preset distance, and the parking space to be corrected is of the same type as the current parking space, the parking space to be corrected and the current parking space are classified as parking spaces of the same type in the same row; and the process repeats until all parking spaces of the same type in the same row are obtained.

[0023] The parking spaces to be corrected that are not classified as the parking spaces of the same type in the same row are classified as the separate parking spaces.

[0024] Optionally, the adopting different corner point correction strategies to correct the parking space corner points of the same type of parking spaces in the same row and the single parking space includes:

[0025] Normalizing the confidence of each front corner point of the same type of parking space in the same row to obtain the coordinate weight of each front corner point of the same type of parking space in the same row;

[0026] Obtaining a fitting straight line of the front corner points of the same type of parking spaces in the same row using a weighted least squares method according to the weights of the front corner coordinates of the parking spaces and the coordinates of the front corner coordinates of the parking spaces;

[0027] Correcting the coordinates of the front corner points of the parking spaces of the same type and in the same row using the coordinates of the intersections of the side lines of the parking spaces and the fitted lines of the front corner points of the parking spaces;

[0028] Normalizing the confidence of the rear corner points of each parking space of the same type and in the same row to obtain the coordinate weight of the rear corner points of each parking space of the same type and in the same row;

[0029] Obtaining a straight line fitting the rear corner points of the same type of parking spaces in the same row using a point-slope straight line equation based on the weights of the coordinates of the rear corner points of each parking space, the coordinates of the rear corner points of each parking space, and the slope of the straight line fitting the front corner points of the parking spaces;

[0030] The coordinates of the rear corner points of the parking spaces of the same type and in the same row are corrected by using the coordinates of the intersections of the side lines of the parking spaces of the same type and in the same row with the fitting lines of the rear corner points of the parking spaces.

[0031] Optionally, the adopting different corner point correction strategies to correct the parking space corner points of the same type of parking spaces in the same row and the single parking space includes:

[0032] Obtaining the slope of a parking space entrance line of the single parking space according to the coordinates of the two front corner points of the single parking space;

[0033] Normalizing the confidences of the two rear corner points of the single parking space to obtain coordinate weights of the two rear corner points of the single parking space;

[0034] Obtaining a fitting straight line of the rear corner points of the individual parking space using a point-slope straight line equation according to the weights of the coordinates of the two rear corner points of the individual parking space, the coordinates of the two rear corner points of the individual parking space, and the slope of the parking space entrance line;

[0035] The coordinates of the two parking space rear corner points of the single parking space are corrected by using the coordinates of the two intersection points of the two parking space side lines of the single parking space and the fitting straight line of the parking space rear corner point.

[0036] In a second aspect, an embodiment of the present application provides a device for correcting a parking space corner point, the device comprising:

[0037] an obtaining unit, configured to obtain a plurality of parking spaces and the coordinates of parking corner points of each parking space and a parking corner point confidence level according to a top view of parking spaces around the vehicle and a parking space detection algorithm;

[0038] A first determining unit is configured to determine a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and parking space corner point confidence levels of each parking space;

[0039] a second determining unit, configured to determine the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected;

[0040] a classification unit, configured to classify the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces based on the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected;

[0041] The correction unit is used to correct the parking space corner points of the parking spaces of the same type in the same row and the single parking space by adopting different corner point correction strategies.

[0042] Optionally, the parking space corner point coordinates include two parking space front corner point coordinates and two parking space rear corner point coordinates, and the parking space corner point confidences include two parking space front corner point confidences and two parking space rear corner point confidences.

[0043] Optionally, the first determining unit includes:

[0044] A first calculation subunit is configured to calculate, for each parking space, two parking space front corner point angles and two parking space rear corner point angles according to the two parking space front corner point coordinates and the two parking space rear corner point coordinates;

[0045] The first determination subunit is configured to determine that the parking space is the parking space to be corrected if the absolute value of the difference between the angle of the front corner point of the parking space and the angle of the rear corner point of the parking space in each pair of diagonal points of the parking space is less than a preset angle, and the sum of the confidence levels of the two front corner points of the parking space is greater than the sum of the confidence levels of the two rear corner points of the parking space.

[0046] Optionally, the second determining unit includes:

[0047] A second calculation subunit is configured to calculate, for each of the parking spaces to be corrected, the lengths of the parking space entrance line, the parking space bottom line, and the two parking space side lines according to the coordinates of the two parking space front corner points and the coordinates of the two parking space rear corner points;

[0048] The second determining subunit is used to determine the parking space type of the parking space to be corrected as a vertical parking space, a horizontal parking space or a diagonal parking space according to the angles of the two front corner points of the parking space, the parking space entrance line, the parking space bottom line and the lengths of the two parking space side lines.

[0049] Optionally, the classification unit includes:

[0050] a third determining subunit, configured to determine, from the plurality of parking spaces to be corrected, the parking space to be corrected having the largest sum of confidences of the front corner points of the two parking spaces as the current parking space;

[0051] A traversal subunit is configured to form a reference line using the coordinates of the two front corner points of the current parking space, and traverse the distances between the coordinates of the two front corner points of other parking spaces to be corrected and the reference line;

[0052] A first classification subunit is configured to classify the parking space to be corrected and the current parking space as parking spaces of the same row and type when the distances are all less than the preset distance and the parking space type of the parking space to be corrected is the same as that of the current parking space; and loop until all parking spaces of the same row and type are obtained;

[0053] The second classification subunit is configured to classify the parking spaces to be corrected that are not classified as the parking spaces of the same row and type as the independent parking spaces.

[0054] Optionally, the correction unit includes:

[0055] A first obtaining subunit is configured to normalize the confidence of the front corner points of the parking spaces of the same type and in the same row to obtain the coordinate weights of the front corner points of the parking spaces of the same type and in the same row;

[0056] The second obtaining subunit is configured to obtain a fitting straight line of the front corner points of the parking spaces of the same type and in the same row using a weighted least squares method according to the weights of the front corner coordinates of the parking spaces of the same type and in the same row and the coordinates of the front corner points of the parking spaces;

[0057] A first correction subunit is configured to correct the coordinates of the front corner points of the parking spaces of the same type and in the same row by using the coordinates of the intersection points of the side lines of the parking spaces and the fitting lines of the front corner points of the parking spaces;

[0058] A third obtaining subunit is configured to normalize the confidence of the rear corner points of the parking spaces of the same type and in the same row to obtain the coordinate weights of the rear corner points of the parking spaces of the same type and in the same row;

[0059] a fourth obtaining subunit, configured to obtain a fitted straight line for the rear corner points of the parking spaces of the same type and in the same row of parking spaces using a point-slope straight line equation based on the weights of the coordinates of the rear corner points of the parking spaces of the same type and in the same row of parking spaces, the coordinates of the rear corner points of the parking spaces, and the slope of the fitted straight line for the front corner points of the parking spaces;

[0060] The second correction subunit is used to correct the coordinates of the rear corner points of the parking spaces of the same type and in the same row by using the coordinates of the intersection points of the side lines of the parking spaces of the same type and in the same row with the fitting lines of the rear corner points of the parking spaces.

[0061] Optionally, the correction unit includes:

[0062] a fifth obtaining subunit, configured to obtain a slope of a parking space entrance line of the individual parking space according to the coordinates of the two parking space front corner points of the individual parking space;

[0063] a sixth obtaining subunit, configured to perform normalization processing on the confidence levels of the two rear corner points of the single parking space to obtain coordinate weights of the two rear corner points of the single parking space;

[0064] a seventh obtaining subunit, configured to obtain a fitting straight line of the rear corner points of the individual parking space using a point-slope straight line equation according to the coordinate weights of the two rear corner points of the individual parking space, the coordinates of the two rear corner points of the individual parking space, and the slope of the parking space entrance line;

[0065] The third correction subunit is configured to correct the coordinates of the two rear corner points of the single parking space by using the coordinates of the two intersection points of the two parking space side lines of the single parking space and the fitting straight line of the rear corner point of the parking space.

[0066] In a third aspect, an embodiment of the present application provides a terminal device, the terminal device including a processor and a memory:

[0067] The memory is used to store program code and transmit the program code to the processor;

[0068] The processor is configured to execute the method for correcting a parking space corner point as described in any one of the first aspects above according to instructions in the program code.

[0069] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store program code, and the program code is used to execute the method for correcting the corner point of a parking space as described in any one of the first aspects above.

[0070] Compared with the prior art, this application has at least the following advantages:

[0071] By adopting the technical solution of the embodiment of the present application, based on the overhead view of the parking spaces around the vehicle and the parking space detection algorithm, multiple parking spaces and the parking corner point coordinates and parking corner point confidence of each parking space are obtained; based on the parking corner point coordinates and parking corner point confidence of each parking space, multiple parking spaces to be corrected are determined from the multiple parking spaces; based on the parking corner point coordinates of each parking space to be corrected, the parking space type of each parking space to be corrected is determined; based on the parking corner point coordinates, parking corner point confidence and parking space type of the multiple parking spaces to be corrected, the multiple parking spaces to be corrected are classified into parking spaces of the same type in the same row or separate parking spaces; different corner point correction strategies are used to correct the parking corner points of the parking spaces of the same type in the same row and separate parking spaces.

[0072] Specifically, after inputting the parking space detection algorithm into a bird's-eye view of the parking spaces surrounding the vehicle and obtaining the corner coordinates and confidence scores of multiple parking spaces, the algorithm first uses these corner coordinates and confidence scores to select multiple parking spaces to be corrected. Secondly, the corner coordinates are used to determine the parking space type of the multiple spaces to be corrected. Finally, the corner coordinates, confidence scores, and parking space type are used to categorize the multiple spaces as either in the same row and type or as individual spaces. Finally, different corner correction strategies are applied to the same row and type, as well as individual spaces. This method effectively and specifically corrects the corner points of the located parking spaces, improving their accuracy and subsequent accurate parking space determination, thereby enhancing the accuracy of the automated parking technology and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0074] Figure 1 A schematic diagram of a system framework involved in an application scenario in an embodiment of the present application;

[0075] Figure 2 A flowchart of a method for correcting parking space corner points provided in an embodiment of the present application;

[0076] Figure 3 A schematic diagram of parking spaces of the same type and in the same row, individual parking spaces, and non-corrected parking spaces in a parking space to be corrected around a vehicle provided in an embodiment of the present application;

[0077] Figure 4A schematic structural diagram of a device for correcting parking space corner points provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0079] Currently, a vehicle's surround view system can detect parking spaces around the vehicle, generating four fisheye views of the vehicle's front, rear, left, and right sides, which are then transmitted to the vehicle parking system. The vehicle parking system then stitches these four fisheye views together to generate a bird's-eye view of the parking spaces surrounding the vehicle, centered on the vehicle. Based on this bird's-eye view of the parking spaces, a parking space corner detection algorithm is used to locate the corner points of the parking spaces, allowing for automatic parking based on these located corner points. However, the inventors have discovered that the parking space corner points located in this method exhibit a certain degree of error compared to the actual parking space corner points. In other words, the located parking space corner points are not accurate enough. This results in inaccurate parking space determination, reducing the accuracy of the automatic parking technology and thus impacting the user experience.

[0080] In order to solve this problem, in an embodiment of the present application, based on a bird's-eye view of the parking spaces around the vehicle and a parking space detection algorithm, multiple parking spaces and the parking corner point coordinates and parking corner point confidence of each parking space are obtained; based on the parking corner point coordinates and parking corner point confidence of each parking space, multiple parking spaces to be corrected are determined from the multiple parking spaces; based on the parking corner point coordinates of each parking space to be corrected, the parking space type of each parking space to be corrected is determined; based on the parking corner point coordinates, parking corner point confidence and parking space type of the multiple parking spaces to be corrected, the multiple parking spaces to be corrected are classified into parking spaces of the same type in the same row or separate parking spaces; different corner point correction strategies are used to correct the parking corner points of the parking spaces of the same type in the same row and separate parking spaces.

[0081] Specifically, after inputting the parking space detection algorithm into a bird's-eye view of the parking spaces surrounding the vehicle and obtaining the corner coordinates and confidence scores of multiple parking spaces, the algorithm first uses these corner coordinates and confidence scores to select multiple parking spaces to be corrected. Secondly, the corner coordinates are used to determine the parking space type of the multiple spaces to be corrected. Finally, the corner coordinates, confidence scores, and parking space type are used to categorize the multiple spaces as either in the same row and type or as individual spaces. Finally, different corner correction strategies are applied to the same row and type, as well as individual spaces. This method effectively and specifically corrects the corner points of the located parking spaces, improving their accuracy and subsequent accurate parking space determination, thereby enhancing the accuracy of the automated parking technology and improving the user experience.

[0082] For example, one of the scenarios of the embodiment of the present application may be applied to Figure 1 In the scenario shown, the scenario includes a vehicle surround view system 101 and a vehicle parking system 102. During automatic parking, the vehicle surround view system 101 detects parking spaces around the vehicle, obtains four fisheye views of the front, rear, left, and right sides of the vehicle, and sends them to the vehicle parking system 102. Based on these views, the vehicle parking system 102 first stitches the four fisheye views together to obtain a bird's-eye view of the parking spaces around the vehicle centered on the vehicle. It then uses various implementations provided in the embodiments of this application to correct the corner points of the parking spaces, allowing the vehicle parking system 102 to subsequently automatically park based on the corrected corner points.

[0083] First, in the above application scenario, although the action description of the implementation method provided in the embodiment of the present application is performed by the vehicle parking system 102; however, the embodiment of the present application is not limited in terms of the execution subject, as long as the actions disclosed in the implementation method provided in the embodiment of the present application are performed.

[0084] Secondly, the above scenario is only an example scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.

[0085] The specific implementation of the method for correcting parking space corner points and related devices in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0086] Exemplary Methods

[0087] See also Figure 2 , shows a flow chart of a method for correcting parking space corner points in an embodiment of the present application. In this embodiment, the method may include the following steps:

[0088] Step 201: Based on a bird's-eye view of parking spaces around the vehicle and a parking space detection algorithm, a plurality of parking spaces and the coordinates and confidence levels of parking space corner points of each parking space are obtained.

[0089] In an embodiment of the present application, after obtaining four fisheye views of the front, rear, left, and right sides of the vehicle through the vehicle surround view system and splicing them together to obtain a bird's-eye view of the parking spaces around the vehicle centered on the vehicle, the views are input into a parking space detection algorithm obtained by pre-training a deep learning model based on the bird's-eye view of the parking spaces around the vehicle and the coordinates of the marked parking space corner points. This algorithm can output multiple parking spaces, as well as the coordinates of the parking space corner points and the parking space corner point confidence level of each parking space.

[0090] Among them, since a parking space can generally be represented by four parking space corner point coordinates, that is, a parking space can be represented by two parking space front corner point coordinates and two parking space rear corner points; therefore, in an optional implementation of an embodiment of the present application, the parking space corner point coordinates include two parking space front corner point coordinates and two parking space rear corner point coordinates, and the parking space corner point confidence includes two parking space front corner point confidence and two parking space rear corner point confidence.

[0091] As an example, the coordinates of the two front corner points and the two rear corner points of a parking space are: A1(x1,y1), A2(x2,y2), A3(x3,y3), A4(x4,y4); the confidence of the two front corner points and the two rear corner points is: A 1score ,A 2score ,A 3score ,A 4score .

[0092] Step 202: determining a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and parking space corner point confidence levels of each parking space.

[0093] In the embodiment of the present application, after obtaining multiple parking spaces and the parking space corner point coordinates and parking space corner point confidence levels of each parking space in step 201, if the parking space corner point coordinates of some of the multiple parking spaces require correction while the parking space corner point coordinates of some parking spaces do not, it is necessary to determine from the multiple parking spaces the parking space corner point coordinates that require correction as the parking spaces to be corrected, thereby obtaining multiple parking spaces to be corrected. Whether a parking space is a parking space to be corrected actually requires determining based on both the parking space corner point coordinates and the parking space corner point confidence levels.

[0094] During the specific implementation of step 202, whether the parking space is a parking space to be corrected is determined based on the parking space corner point coordinates and the parking space corner point confidence level. In fact, it is necessary to determine whether the quadrilateral formed by the parking space corner point coordinates is a quasi-parallelogram based on the parking space corner point coordinates; and it is also necessary to determine whether the front corner point of the parking space is more obvious than the rear corner point of the parking space based on the parking space corner point confidence level.

[0095] Based on this, the angles of the two front corners and the two rear corners of the parking space can be calculated using the coordinates of the two front corners and the two rear corners of the parking space. This can be used to determine whether the quadrilateral formed by the parking space corner coordinates is a quasi-parallelogram. In other words, the absolute difference between the angles of the front corners and the rear corners of each pair of diagonal points of the parking space is determined to be less than a preset angle. If so, the quadrilateral formed by the parking space corner coordinates is considered a quasi-parallelogram. Furthermore, it is necessary to determine whether the sum of the angles of the two front corners of the parking space is greater than the sum of the angles of the two rear corners of the parking space. If so, the parking space is considered to be a parking space to be corrected.

[0096] Therefore, in an optional implementation of the embodiment of the present application, step 202 may include, for example, steps A and B of the following steps:

[0097] Step A: For each parking space, calculate the angles of the two front corner points of the parking space and the angles of the two rear corner points of the parking space according to the coordinates of the two front corner points of the parking space and the coordinates of the two rear corner points of the parking space.

[0098] Step B: If the absolute value of the difference between the angle of the front corner point of the parking space and the angle of the rear corner point of the parking space in each pair of parking space diagonal points is less than the preset angle, and the sum of the confidence levels of the two front corner points of the parking space is greater than the sum of the confidence levels of the two rear corner points of the parking space, the parking space is determined to be the parking space to be corrected.

[0099] As an example, based on the above example, the angles of the two front corner points and the two rear corner points of the parking space are: A 1angle ,A 2angle ,A 3angle ,A 4angle , assuming the preset angle is 15 degrees, if the absolute value of the difference between the angle of the front corner point of the parking space and the angle of the rear corner point of the parking space in the diagonal points of the parking space is less than the preset angle, that is, |A 1angle -A 3angle |<15&|A 2angle -A 4angle |<15; and the sum of the confidences of the two front corner points of the parking space is greater than the sum of the confidences of the two rear corner points of the parking space, that is, A 1score +A 2score >A 3score +A 4score , then the parking space is determined to be the parking space to be corrected.

[0100] Step 203: Determine the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected.

[0101] In the embodiment of the present application, after a plurality of parking spaces to be corrected are determined in step 202, since the parking spaces to be corrected conform to a parallelogram-like shape, and the parallelogram-like parking spaces to be corrected can be divided into parking space types such as vertical parking spaces, horizontal parking spaces, or oblique parking spaces, it is also necessary to determine the parking space type of each parking space to be corrected based on the coordinates of the parking space corner points of each parking space to be corrected.

[0102] During the specific implementation of step 203, the parking space type of each parking space to be corrected is determined based on the coordinates of the parking space corner points of each parking space to be corrected. In fact, it is determined whether each parking space to be corrected is a vertical parking space, a horizontal parking space, or a diagonal parking space based on the length of the parking space line of each parking space to be corrected and the angles of the two front corner points of the parking space. First, it is necessary to calculate the length of the parking space entrance line, the parking space bottom line, and the two parking space side lines of each parking space to be corrected through the coordinates of the two front corner points of each parking space to be corrected and the coordinates of the two rear corner points of the parking space; then, on this basis, combined with the angles of the two front corner points of each parking space to be corrected, determine whether the parking space type of the parking space to be corrected is a vertical parking space, a horizontal parking space, or a diagonal parking space. Therefore, in an optional implementation of the embodiment of the present application, the step 203 may, for example, include steps C to D in the following steps:

[0103] Step C: For each parking space to be corrected, the lengths of the parking space entrance line, the parking space bottom line, and the two parking space side lines are calculated based on the coordinates of the two front corner points of the parking space and the coordinates of the two rear corner points of the parking space.

[0104] Step D: Determine the parking space type of the to-be-corrected parking space as a vertical parking space, a horizontal parking space, or an oblique parking space based on the angles of the two front corner points of the parking space, the lengths of the parking space entrance line, the parking space bottom line, and the two parking space side lines.

[0105] As an example, based on the above example, the lengths of the parking space entrance line, parking space bottom line, and two parking space side lines are as follows:

[0106]

[0107]

[0108]

[0109]

[0110] The angles of the two front corners of the vertical parking space, the parking space entrance line, the parking space bottom line, and the lengths of the two side lines of the parking space must meet the following conditions:

[0111] d A12 <d A14 &d A12 <d A23 &d A12<2.5m&|A 1angle -90|<10&|A 2angle -90|<10;

[0112] The angles of the two front corners of a horizontal parking space, the parking space entrance line, the parking space bottom line, and the lengths of the two parking space side lines must meet the following conditions:

[0113] d A12 >d A14 &d A12 >d A23 &d A12 >3.0m&|A 1angle -90|<10&|A 2angle -90|<10;

[0114] The parking space type of the parking space to be corrected that is not a horizontal parking space or a vertical parking space is an inclined parking space.

[0115] Step 204: Classify the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces based on the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected.

[0116] In the embodiment of the present application, since the arrangement characteristics of multiple parking spaces are expressed as being arranged in the same row and of the same type or being arranged separately, the parking space corner point coordinates of the parking spaces to be corrected in the same row and of the same type can be corrected together, and the parking space corner point coordinates of the parking spaces to be corrected in the separate arrangements need to be corrected separately; then, after determining the parking space type of each parking space to be corrected in step 203, the parking space corner point coordinates and the parking space corner point confidence of the parking space to be corrected can be combined to jointly determine whether the multiple parking spaces to be corrected can be classified as parking spaces of the same type in the same row; if not, they are classified as separate parking spaces.

[0117] When step 204 is specifically implemented, first, it is necessary to find the parking space to be corrected with the largest sum of the confidences of the two front corner points among the multiple parking spaces to be corrected, and use it as the current parking space. Then, take the straight line formed by the coordinates of the two front corner points of the current parking space as the baseline, and traverse the other parking spaces to be corrected except the current parking space among the multiple parking spaces to be corrected. First, determine whether the distance between the coordinates of the two front corner points of the parking space and the baseline is less than the preset distance. If so, it means that the parking space to be corrected is in the same row as the current parking space. Then, determine whether the parking space type of the parking space to be corrected and the current parking space is the same. If so, it means that the parking space to be corrected is in the same row and type as the current parking space. This cycle is repeated until all parking spaces of the same row and type among the multiple parking spaces to be corrected are obtained. Finally, the parking space to be corrected that does not belong to the same row and type among the multiple parking spaces to be corrected is a separate parking space. Therefore, in an optional implementation of the embodiment of the present application, step 204 may, for example, include steps E to H in the following steps:

[0118] Step E: From the plurality of parking spaces to be corrected, determine the parking space to be corrected with the maximum sum of the confidence scores of the two front corner points of the parking space as the current parking space.

[0119] Step F: Using the coordinates of the two front corner points of the current parking space to form a baseline, and traversing the distances between the coordinates of the two front corner points of other parking spaces to be corrected and the baseline.

[0120] Step G: When the distances are all less than the preset distance, and the parking space to be corrected and the current parking space are of the same parking space type, the parking space to be corrected and the current parking space are classified as parking spaces of the same type in the same row; and the process is repeated until all parking spaces of the same type in the same row are obtained.

[0121] Step H: Classify the parking spaces to be corrected that are not classified as the parking spaces of the same row and type as the independent parking spaces.

[0122] As an example, based on the above example, each parking space to be corrected is considered as an unclassified parking space before it is classified, and the type is 0 (slot_feature=0). Let the type of the current parking space be i (slot_feature=i, i is the current cycle number), and the coordinates of the two front corner points of the current parking space constitute the baseline L front :A front x+B front y+C front = 0; traverse the coordinates of the two front corner points of other parking spaces to be corrected and the baseline L fr o nt If the distances are all less than the preset distances, the following will be shown:

[0123]

[0124]

[0125] If the parking space to be corrected is of the same type as the current parking space, the type of the parking space to be corrected is i (slot_feature=i, i is the current loop number), and the loop continues until the types of all parking spaces to be corrected are greater than 0. The type of the parking space to be corrected after classification is i (slot_feature=i, i=1, 2, 3...). When the types i of multiple parking spaces to be corrected after classification are the same, it means that these parking spaces to be corrected after classification are of the same type in the same row. When the type i of the parking space to be corrected after classification corresponds to only one parking space, it means that the parking space to be corrected after classification is a single parking space. For example, Figure 3 A schematic diagram of parking spaces of the same row and type, single parking spaces, and non-corrected parking spaces among parking spaces to be corrected around a vehicle is shown.

[0126] Step 205: Using different corner point correction strategies to correct parking space corner points for the same type of parking spaces in the same row and the single parking space.

[0127] In the embodiment of the present application, after the multiple parking spaces to be corrected are classified into the same row and same type of parking spaces or individual parking spaces in step 204, the parking space corner point coordinates of the same row and same type of parking spaces can be corrected together, while the parking space corner point coordinates of the individual parking spaces need to be corrected individually, and the corner point correction strategies adopted are different.

[0128] For the same type of parking spaces in the same row, the parking corner correction strategy is actually as follows:

[0129] Parking space front corner point coordinate correction strategy: First, obtain the confidence of each parking space front corner point of the same row and type of parking space, normalize it, and regard the normalized confidence of each parking space front corner point as the coordinate weight of each parking space front corner point; then use the weighted least squares method to process the coordinate weight of each parking space front corner point and the coordinates of each parking space front corner point of the same row and type of parking space to obtain the fitting line of the parking space front corner point of the same row and type of parking space; finally, calculate the coordinates of each intersection of each parking space side line and the fitting line of the parking space front corner point of the same row and type of parking space, which are the corrected coordinates of each parking space front corner point of the same row and type of parking space.

[0130] Coordinate correction strategy for the rear corner points of parking spaces: first, obtain the confidence of the rear corner points of each parking space of the same row and type, normalize it, and regard the normalized confidence of each parking space rear corner point as the coordinate weight of each parking space rear corner point; then, according to the coordinate weight of each parking space rear corner point and the coordinate of each parking space rear corner point, perform weighted average to obtain the weighted coordinates of each parking space rear corner point. Since the same row and type of parking spaces are parallelogram-like parking spaces, the principle of parallelogram-like parking spaces is that the bottom line of the parking space is parallel to the parking space entrance line, that is, the slope is equal; based on the point-slope straight line equation, according to the weighted coordinates of the rear corner points of the parking spaces and the slope of the fitting line of the front corner points of the parking spaces, the fitting line of the rear corner points of the parking spaces of the same row and type can be calculated; finally, calculate the coordinates of each intersection of the side lines of each parking space in the same row and type of parking spaces and the fitting line of the rear corner points of the parking spaces, which are the corrected coordinates of the rear corner points of each parking space in the same row and type of parking spaces.

[0131] Therefore, in an optional implementation of the embodiment of the present application, the step 205 may include, for example, steps I to N of the following steps:

[0132] Step I: normalizing the confidence of each front corner point of the same type of parking space in the same row to obtain the coordinate weight of each front corner point of the same type of parking space in the same row.

[0133] Step J: according to the weights of the coordinates of the front corner points of each parking space of the same type and the same row, the weighted least squares method is used to obtain the fitting straight line of the front corner points of the parking spaces of the same type and the same row.

[0134] Step K: using the coordinates of the intersections of the side lines of the parking spaces of the same row and type and the fitting lines of the front corner points of the parking spaces, correct the coordinates of the front corner points of the parking spaces of the same row and type.

[0135] Step L: normalizing the confidence of the rear corner points of the parking spaces of the same row and type to obtain the coordinate weights of the rear corner points of the parking spaces of the same row and type.

[0136] Step M: Obtain a straight line fitting the rear corner points of the same type of parking spaces in the same row using a point-slope straight line equation based on the weights of the rear corner coordinates of each parking space, the coordinates of each rear corner coordinate, and the slope of the straight line fitting the front corner points of the parking spaces.

[0137] Step N: using the coordinates of the intersections of the side lines of the parking spaces of the same row and type and the fitting lines of the rear corner points of the parking spaces, correct the coordinates of the rear corner points of the parking spaces of the same row and type.

[0138] As an example, based on the above example, the confidence of the front corner points of each parking space of the same row and type is normalized as follows:

[0139]

[0140] in, The coordinate weight of the front corner point of each parking space of the same row and type;

[0141] According to the weights of the front corner coordinates of each parking space of the same type in the same row and the coordinates of each parking space, the weighted least squares method is used to obtain the fitting straight line L of the front corner coordinates of the parking space of the same type in the same row. front_base As shown below:

[0142]

[0143] make

[0144] Solve the equation to obtain k and b. The fitting straight line of the front corner points of the same type of parking spaces in the same row is:

[0145] L front_base :y=kx+b;

[0146] The first side line L of a parking space in the same row and type is known. side1 The second parking space side line L passes through the two parking space corner points A1 and A4side2 Through the two parking space corner points A2 and A3, find the equations of the two parking space side lines:

[0147] L side1 :y=k side1 x+b side1 ;

[0148] L side2 :y=k side2 x+b side2 ;

[0149] Calculate L front_base With L side1 The intersection coordinates A'1(x'1,y'1), L front_base With L side2 The intersection coordinates A'2(x'2,y'2) are the corrected coordinates of the front corner points of the two parking spaces of the same row and type.

[0150] The confidence of the rear corner points of the same type of parking spaces in the same row is normalized, and the weighted average of the coordinates of the rear corner points of each parking space is obtained to obtain the weighted coordinates of the rear corner points of each parking space, as shown below:

[0151]

[0152]

[0153]

[0154] According to the weight of the coordinates of the rear corner points of each parking space in the same row and type, the coordinates of the rear corner points of each parking space and the slope of the fitting line of the front corner points of the parking space, the fitting line of the rear corner points of the parking space in the same row and type is obtained by using the point-slope straight line equation: (L rear :A rearx +B reary +C rear =0);

[0155] Calculate L rear With L side1 The intersection coordinates A'4(x'4,y'4), L rear With L side2 The intersection coordinates A'3 (x'3, y'3) are the coordinates of the rear corner points of the two parking spaces of the same row and type after correction.

[0156] For a single parking space, the parking space corner correction strategy is actually: first, calculate the slope of the straight line formed by the coordinates of the two front corner points of the single parking space, and use it as the slope of the parking space entrance line of the single parking space; second, obtain the confidence of the two rear corner points of the single parking space, perform normalization on it, and regard the normalized confidence of the two rear corner points of the two parking spaces as the coordinate weights of the two rear corner points of the two parking spaces; then, according to the weights of the coordinates of the two rear corner points of the two parking spaces and the coordinates of the two rear corner points of the two parking spaces, perform weighted average to obtain the weighted two The coordinates of the rear corner points of the parking space are calculated based on the fact that the individual parking space is a parallelogram-shaped parking space. The principle of a parallelogram-shaped parking space is that the bottom line of the parking space is parallel to the parking space entrance line, that is, the slopes are equal. Based on the point-slope straight line equation, the fitted straight line of the rear corner points of the parking space of the individual parking space can be calculated according to the weighted coordinates of the rear corner points of the parking space and the slope of the fitted straight line of the front corner points of the parking space. Finally, the coordinates of the two intersection points of the two side lines of the individual parking space and the fitted straight line of the rear corner points of the parking space are calculated, which are the corrected coordinates of the rear corner points of each parking space.

[0157] Therefore, in an optional implementation of the embodiment of the present application, the step 205 may include, for example, step O and step R of the following steps:

[0158] Step O: Obtain the slope of the parking space entrance line of the single parking space according to the coordinates of the two front corner points of the single parking space.

[0159] Step P: normalizing the confidences of the two rear corner points of the single parking space to obtain the coordinate weights of the two rear corner points of the single parking space.

[0160] Step Q: according to the coordinate weights of the two rear corner points of the single parking space, the coordinates of the two rear corner points of the single parking space and the slope of the parking space entrance line, a point-slope straight line equation is used to obtain a fitting straight line of the rear corner points of the single parking space.

[0161] Step R: using the coordinates of the two intersection points of the two parking space side lines of the single parking space and the fitting straight line of the parking space rear corner point, correct the coordinates of the two parking space rear corner points of the single parking space.

[0162] As an example, the confidence of the two rear corner points of a single parking space is normalized to obtain the coordinate weights of the two rear corner points of the single parking space, as shown below:

[0163]

[0164]

[0165]

[0166] According to the weights of the coordinates of the two rear corner points of a single parking space, the coordinates of the two rear corner points of the parking space and the slope of the parking space entrance line, the fitting straight line of the rear corner points of the single parking space is obtained using the point-slope straight line equation: L rear :A rearx +B reary +C rear =0;

[0167] The first side line L of a known single parking space side1 The second parking space side line L passes through the two parking space corner points A1 and A4 side2 Through the two parking space corner points A2 and A3, find the equations of the two parking space side lines:

[0168] L side1 :y=k side1 x+b side1 ;

[0169] L side2 :y=k side2 x+b side2 ;

[0170] Calculate L rear With L side1 The intersection coordinates A'4(x'4,y'4), L rear With L side2 The intersection coordinates A'3 (x'3, y'3) are the coordinates of the rear corner points of the two parking spaces after the correction of the single parking space.

[0171] Through the various implementation methods provided in this embodiment, based on the overhead view of the parking spaces around the vehicle and the parking space detection algorithm, multiple parking spaces and the parking space corner point coordinates and parking space corner point confidence of each parking space are obtained; based on the parking space corner point coordinates and parking space corner point confidence of each parking space, multiple parking spaces to be corrected are determined from the multiple parking spaces; based on the parking space corner point coordinates of each parking space to be corrected, the parking space type of each parking space to be corrected is determined; based on the parking space corner point coordinates, parking space corner point confidence and parking space type of the multiple parking spaces to be corrected, the multiple parking spaces to be corrected are classified into parking spaces of the same type in the same row or separate parking spaces; different corner point correction strategies are used to correct the parking space corner points of the same type in the same row and separate parking spaces.

[0172] Specifically, after inputting the parking space detection algorithm into a bird's-eye view of the parking spaces surrounding the vehicle and obtaining the corner coordinates and confidence scores of multiple parking spaces, the algorithm first uses these corner coordinates and confidence scores to select multiple parking spaces to be corrected. Secondly, the corner coordinates are used to determine the parking space type of the multiple spaces to be corrected. Finally, the corner coordinates, confidence scores, and parking space type are used to categorize the multiple spaces as either in the same row and type or as individual spaces. Finally, different corner correction strategies are applied to the same row and type, as well as individual spaces. This method effectively and specifically corrects the corner points of the located parking spaces, improving their accuracy and subsequent accurate parking space determination, thereby enhancing the accuracy of the automated parking technology and improving the user experience.

[0173] Exemplary devices

[0174] See also Figure 4 , shows a schematic structural diagram of a device for correcting parking space corners in an embodiment of the present application. In this embodiment, the device may specifically include:

[0175] An obtaining unit 401 is configured to obtain a plurality of parking spaces and the coordinates of a parking space corner point and a parking space corner point confidence level of each parking space based on a bird's-eye view of parking spaces surrounding the vehicle and a parking space detection algorithm;

[0176] A first determining unit 402 is configured to determine a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and parking space corner point confidence levels of each parking space;

[0177] The second determining unit 403 is configured to determine the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected;

[0178] a classification unit 404, configured to classify the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces based on the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected;

[0179] The correction unit 405 is configured to correct parking space corner points of the parking spaces of the same type in the same row and the individual parking spaces using different corner point correction strategies.

[0180] In an optional implementation of the embodiment of the present application, the parking space corner point coordinates include two parking space front corner point coordinates and two parking space rear corner point coordinates, and the parking space corner point confidence includes two parking space front corner point confidence and two parking space rear corner point confidence.

[0181] In an optional implementation of the embodiment of the present application, the first determining unit 402 includes:

[0182] A first calculation subunit is configured to calculate, for each parking space, two parking space front corner point angles and two parking space rear corner point angles according to the two parking space front corner point coordinates and the two parking space rear corner point coordinates;

[0183] The first determination subunit is configured to determine that the parking space is the parking space to be corrected if the absolute value of the difference between the angle of the front corner point of the parking space and the angle of the rear corner point of the parking space in each pair of diagonal points of the parking space is less than a preset angle, and the sum of the confidence levels of the two front corner points of the parking space is greater than the sum of the confidence levels of the two rear corner points of the parking space.

[0184] In an optional implementation of the embodiment of the present application, the second determining unit 403 includes:

[0185] A second calculation subunit is configured to calculate, for each of the parking spaces to be corrected, the lengths of the parking space entrance line, the parking space bottom line, and the two parking space side lines according to the coordinates of the two parking space front corner points and the coordinates of the two parking space rear corner points;

[0186] The second determining subunit is used to determine the parking space type of the parking space to be corrected as a vertical parking space, a horizontal parking space or a diagonal parking space according to the angles of the two front corner points of the parking space, the parking space entrance line, the parking space bottom line and the lengths of the two parking space side lines.

[0187] In an optional implementation of the embodiment of the present application, the classification unit 404 includes:

[0188] a third determining subunit, configured to determine, from the plurality of parking spaces to be corrected, the parking space to be corrected having the largest sum of confidences of the front corner points of the two parking spaces as the current parking space;

[0189] A traversal subunit is configured to form a reference line using the coordinates of the two front corner points of the current parking space, and traverse the distances between the coordinates of the two front corner points of other parking spaces to be corrected and the reference line;

[0190] A first classification subunit is configured to classify the parking space to be corrected and the current parking space as parking spaces of the same row and type when the distances are all less than the preset distance and the parking space type of the parking space to be corrected is the same as that of the current parking space; and loop until all parking spaces of the same row and type are obtained;

[0191] The second classification subunit is configured to classify the parking spaces to be corrected that are not classified as the parking spaces of the same row and type as the independent parking spaces.

[0192] In an optional implementation of the embodiment of the present application, the correction unit 405 includes:

[0193] A first obtaining subunit is configured to normalize the confidence of the front corner points of the parking spaces of the same type and in the same row to obtain the coordinate weights of the front corner points of the parking spaces of the same type and in the same row;

[0194] The second obtaining subunit is configured to obtain a fitting straight line of the front corner points of the parking spaces of the same type and in the same row using a weighted least squares method according to the weights of the front corner coordinates of the parking spaces of the same type and in the same row and the coordinates of the front corner points of the parking spaces;

[0195] A first correction subunit is configured to correct the coordinates of the front corner points of the parking spaces of the same type and in the same row by using the coordinates of the intersection points of the side lines of the parking spaces and the fitting lines of the front corner points of the parking spaces;

[0196] A third obtaining subunit is configured to normalize the confidence of the rear corner points of the parking spaces of the same type and in the same row to obtain the coordinate weights of the rear corner points of the parking spaces of the same type and in the same row;

[0197] a fourth obtaining subunit, configured to obtain a fitted straight line for the rear corner points of the parking spaces of the same type and in the same row of parking spaces using a point-slope straight line equation based on the weights of the coordinates of the rear corner points of the parking spaces of the same type and in the same row of parking spaces, the coordinates of the rear corner points of the parking spaces, and the slope of the fitted straight line for the front corner points of the parking spaces;

[0198] The second correction subunit is used to correct the coordinates of the rear corner points of the parking spaces of the same type and in the same row by using the coordinates of the intersection points of the side lines of the parking spaces of the same type and in the same row with the fitting lines of the rear corner points of the parking spaces.

[0199] In an optional implementation of the embodiment of the present application, the correction unit 405 includes:

[0200] a fifth obtaining subunit, configured to obtain a slope of a parking space entrance line of the individual parking space according to the coordinates of the two parking space front corner points of the individual parking space;

[0201] a sixth obtaining subunit, configured to perform normalization processing on the confidence levels of the two rear corner points of the single parking space to obtain coordinate weights of the two rear corner points of the single parking space;

[0202] a seventh obtaining subunit, configured to obtain a fitting straight line of the rear corner points of the individual parking space using a point-slope straight line equation according to the coordinate weights of the two rear corner points of the individual parking space, the coordinates of the two rear corner points of the individual parking space, and the slope of the parking space entrance line;

[0203] The third correction subunit is configured to correct the coordinates of the two rear corner points of the single parking space by using the coordinates of the two intersection points of the two parking space side lines of the single parking space and the fitting straight line of the rear corner point of the parking space.

[0204] Through the various implementation methods provided in this embodiment, based on the overhead view of the parking spaces around the vehicle and the parking space detection algorithm, multiple parking spaces and the parking space corner point coordinates and parking space corner point confidence of each parking space are obtained; based on the parking space corner point coordinates and parking space corner point confidence of each parking space, multiple parking spaces to be corrected are determined from the multiple parking spaces; based on the parking space corner point coordinates of each parking space to be corrected, the parking space type of each parking space to be corrected is determined; based on the parking space corner point coordinates, parking space corner point confidence and parking space type of the multiple parking spaces to be corrected, the multiple parking spaces to be corrected are classified into parking spaces of the same type in the same row or separate parking spaces; different corner point correction strategies are used to correct the parking space corner points of the same type in the same row and separate parking spaces.

[0205] Specifically, after inputting the parking space detection algorithm into a bird's-eye view of the parking spaces surrounding the vehicle and obtaining the corner coordinates and confidence scores of multiple parking spaces, the algorithm first uses these corner coordinates and confidence scores to select multiple parking spaces to be corrected. Secondly, the corner coordinates are used to determine the parking space type of the multiple spaces to be corrected. Finally, the corner coordinates, confidence scores, and parking space type are used to categorize the multiple spaces as either in the same row and type or as individual spaces. Finally, different corner correction strategies are applied to the same row and type, as well as individual spaces. This method effectively and specifically corrects the corner points of the located parking spaces, improving their accuracy and subsequent accurate parking space determination, thereby enhancing the accuracy of the automated parking technology and improving the user experience.

[0206] In addition, an embodiment of the present application further provides a terminal device, the terminal device including a processor and a memory:

[0207] The memory is used to store program code and transmit the program code to the processor;

[0208] The processor is configured to execute the method for correcting parking space corner points described in the above method embodiment according to the instructions in the program code.

[0209] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the method for correcting parking space corner points described in the above method embodiment.

[0210] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0211] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0212] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

[0213] The above description is only a preferred embodiment of the present application and does not constitute any formal limitation to the present application. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technician familiar with the art can use the above-disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment with equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still falls within the scope of protection of the technical solution of the present application.

Claims

1. A method for correcting parking space corner points, characterized in that: include: According to a top view of parking spaces around the vehicle and a parking space detection algorithm, a plurality of parking spaces and the parking space corner coordinates and parking space corner confidence of each parking space are obtained, wherein the parking space corner coordinates include the coordinates of two front corner points of the parking space and the coordinates of two rear corner points of the parking space, and the parking space corner confidence includes the confidence of the two front corner points of the parking space and the confidence of the two rear corner points of the parking space; Determining a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and parking space corner point confidence levels of each parking space; Determining the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected; Classifying the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces according to the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected; Different corner point correction strategies are adopted to correct the coordinates of the front corner points of each parking space and the rear corner points of each parking space in the same row and type, as well as the coordinates of the two rear corner points of the single parking space.

2. The method according to claim 1, characterized in that The step of determining a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and the parking space corner point confidence level of each parking space comprises: For each of the parking spaces, calculating the angles of the two front corner points of the parking space and the angles of the two rear corner points of the parking space according to the coordinates of the two front corner points of the parking space and the coordinates of the two rear corner points of the parking space; If the absolute value of the difference between the angle of the front corner point of the parking space and the angle of the rear corner point of the parking space in each pair of parking space diagonal points is less than the preset angle, and the sum of the confidence levels of the two front corner points of the parking space is greater than the sum of the confidence levels of the two rear corner points of the parking space, the parking space is determined to be the parking space to be corrected.

3. The method according to claim 2, characterized in that The step of determining the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected includes: For each parking space to be corrected, the lengths of the parking space entrance line, the parking space bottom line, and the two parking space side lines are calculated based on the coordinates of the two front corner points of the parking space and the coordinates of the two rear corner points of the parking space; The parking space type of the to-be-corrected parking space is determined to be a vertical parking space, a horizontal parking space, or an oblique parking space according to the angles of the two parking space front corner points, the parking space entrance line, the parking space bottom line, and the lengths of the two parking space side lines.

4. The method according to claim 2, characterized in that The step of classifying the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces according to the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected includes: From the plurality of parking spaces to be corrected, determine the parking space to be corrected having the largest sum of confidence scores of the front corner points of the two parking spaces as the current parking space; The coordinates of the two front corner points of the current parking space form a baseline, and the distances between the coordinates of the two front corner points of other parking spaces to be corrected and the baseline are traversed; When the distances are all less than the preset distance, and the parking space to be corrected is of the same type as the current parking space, the parking space to be corrected and the current parking space are classified as parking spaces of the same type in the same row; and the process repeats until all parking spaces of the same type in the same row are obtained. The parking spaces to be corrected that are not classified as the parking spaces of the same row and type are classified as the separate parking spaces.

5. The method according to claim 3, characterized in that The different corner point correction strategies are used to correct the coordinates of the front corner points of each parking space and the coordinates of the rear corner points of each parking space in the same row and type, as well as the coordinates of the two rear corner points of the single parking space, including: Normalizing the confidence of each front corner point of the same type of parking space in the same row to obtain the coordinate weight of each front corner point of the same type of parking space in the same row; Obtaining a fitting straight line of the front corner points of the same type of parking spaces in the same row using a weighted least squares method according to the weights of the front corner coordinates of the parking spaces and the coordinates of the front corner coordinates of the parking spaces; Correcting the coordinates of the front corner points of the parking spaces of the same type and in the same row using the coordinates of the intersections of the side lines of the parking spaces and the fitted lines of the front corner points of the parking spaces; Normalizing the confidence of the rear corner points of each parking space of the same type and in the same row to obtain the coordinate weight of the rear corner points of each parking space of the same type and in the same row; Obtaining a straight line fitting the rear corner points of the same type of parking spaces in the same row using a point-slope straight line equation based on the weights of the coordinates of the rear corner points of each parking space, the coordinates of the rear corner points of each parking space, and the slope of the straight line fitting the front corner points of the parking spaces; The coordinates of the rear corner points of the parking spaces of the same type and in the same row are corrected by using the coordinates of the intersections of the side lines of the parking spaces of the same type and in the same row with the fitting lines of the rear corner points of the parking spaces.

6. The method according to claim 3, characterized in that The different corner point correction strategies are used to correct the coordinates of the front corner points of each parking space and the coordinates of the rear corner points of each parking space in the same row and type, as well as the coordinates of the two rear corner points of the single parking space, including: Obtaining the slope of a parking space entrance line of the single parking space according to the coordinates of the two front corner points of the single parking space; Normalizing the confidences of the two rear corner points of the single parking space to obtain coordinate weights of the two rear corner points of the single parking space; Obtaining a fitting straight line of the rear corner points of the individual parking space using a point-slope straight line equation according to the weights of the coordinates of the two rear corner points of the individual parking space, the coordinates of the two rear corner points of the individual parking space, and the slope of the parking space entrance line; The coordinates of the two parking space rear corner points of the single parking space are corrected by using the coordinates of the two intersection points of the two parking space side lines of the single parking space and the fitting straight line of the parking space rear corner point.

7. A device for correcting parking space corner points, characterized in that: include: an obtaining unit, configured to obtain, based on a bird's-eye view of parking spaces surrounding the vehicle and a parking space detection algorithm, a plurality of parking spaces and the coordinates of parking space corner points of each parking space, and a parking space corner confidence level, wherein the parking space corner coordinates include the coordinates of two front parking space corner points and the coordinates of two rear parking space corner points, and the parking space corner confidence levels include the confidence levels of the two front parking space corner points and the confidence levels of the two rear parking space corner points; A first determining unit is configured to determine a plurality of parking spaces to be corrected from the plurality of parking spaces according to the parking space corner point coordinates and parking space corner point confidence levels of each parking space; a second determining unit, configured to determine the parking space type of each parking space to be corrected according to the parking space corner point coordinates of each parking space to be corrected; a classification unit, configured to classify the plurality of parking spaces to be corrected into parking spaces of the same type in the same row or as separate parking spaces based on the parking space corner point coordinates, parking space corner point confidences, and parking space types of the plurality of parking spaces to be corrected; The correction unit is used to adopt different corner point correction strategies to correct the coordinates of the front corner points of each parking space and the coordinates of the rear corner points of each parking space in the same row and type, as well as the coordinates of the two rear corner points of the single parking space.

8. A terminal device, characterized in that: The terminal device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method for correcting a parking space corner point according to any one of claims 1 to 6 according to instructions in the program code.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store program code, and the program code is used to execute the method for correcting parking space corner points according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Automatic-parking parking space detection method based on graph neural network

    CN112201078A

  • Parking space corner correction method, parking space corner correction system and vehicle

    CN112580508A