A method for updating a parking area boundary, a vehicle and related apparatus
Patent Information
- Application Number
- CN202611428084.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-03
AI Technical Summary
In existing technologies, ultrasonic sensors misjudge the spatial position of obstacles when updating the parking area boundary due to the linear straight-line assumption, resulting in errors in the parking area boundary update and affecting the automatic parking effect.
By acquiring multiple sampling points, filtering out interference points, fitting a straight line, calculating the included angle value and iteratively correcting it, and updating the boundary using a preset mapping relationship, the error of the linear straight line assumption is eliminated, thereby improving the accuracy of boundary fitting.
It effectively reduces the calculation error of the linear straight line assumption, improves the accuracy of parking area boundary updates, and enhances automatic parking performance.
Smart Images

Figure CN123029537A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automatic parking technology, and more particularly to a method for updating parking area boundaries, a vehicle, and related devices. Background Technology
[0002] With technological advancements, automatic parking has become one of the primary functions of vehicles. Automatic parking identifies parking spaces using sensors, primarily ultrasonic sensors or surround-view sensors. When a vehicle parks, it selects the appropriate space. However, environmental interference and recognition errors can lead to unsatisfactory parking results. Therefore, it's necessary to continuously update the parking area boundaries during the parking process to improve parking efficiency.
[0003] The automatic parking function of a vehicle primarily updates the parking area boundary using ultrasonic sensors. During this process, the ultrasonic sensors detect obstacles within the parking area and, based on the spatial positions of these obstacles, fit a virtual parking space boundary in real time. Parking is then performed according to this fitted virtual boundary. However, because ultrasonic sensors typically use a relatively simple linear assumption to calculate the parking space boundary, this assumption can project the detected obstacles into incorrect spatial positions. This leads to misjudgments of the obstacle's location by the ultrasonic sensors, resulting in errors in the parking area boundary update. Summary of the Invention
[0004] In view of the above problems, this application provides a method, vehicle, and related devices for updating parking area boundaries to improve the fitting accuracy of parking area boundaries. The specific solution is as follows:
[0005] The first aspect of this application provides a method for updating the boundary of a parking area, the method comprising:
[0006] Multiple sampling points in the target parking area are obtained using the vehicle's ultrasonic sensors;
[0007] The first fitting boundary of the target parking area is obtained by fitting a straight line through at least some of the sampling points. The partial sampling points are the valid sampling points retained after interference filtering.
[0008] Calculate the first angle between the first fitted boundary and the vehicle's side profile.
[0009] Based on the preset mapping relationship between the first and second included angle values, the second included angle value is calculated iteratively multiple times. After each calculation of the second included angle value, the first fitting boundary is updated based on the calculated second included angle value, so that the first fitting boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship that characterizes the angle distortion generated by the oblique incident detection of the ultrasonic sensor. The second included angle value is the angle between the first fitting boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
[0010] In one possible implementation, based on a preset mapping relationship between the first and second included angle values, the second included angle value is calculated iteratively multiple times. After each calculation yields the second included angle value, the first fitting boundary is updated based on the calculated second included angle value, so that the first fitting boundary continuously approaches the target boundary, including:
[0011] Use the first included angle value as the current iteration value;
[0012] Substitute the current iteration value into the preset mapping formula to calculate and obtain the second included angle value. The preset mapping formula is a formula that describes the preset mapping relationship between the first included angle value and the second included angle value.
[0013] The first fitted boundary is updated based on the second included angle value obtained in this calculation;
[0014] Determine whether the angle difference between the current iteration value and the second included angle value obtained in this calculation is less than the angle threshold. If the angle difference is not less than the angle threshold, then take the second included angle value obtained in this calculation as the current iteration value, and return to execute the step of substituting the current iteration value into the preset mapping formula to calculate and obtain the second included angle value.
[0015] If the angle difference is less than the angle threshold, then stop updating the first fitted boundary.
[0016] In one possible implementation, multiple sampling points of the target parking area are acquired using the vehicle's ultrasonic sensors, including:
[0017] During the sampling process, the distance between the target obstacle point and the adjacent sampling point in the boundary direction is calculated. If the distance between the target obstacle point and the adjacent sampling point meets the preset threshold, the target obstacle point is determined as the sampling point.
[0018] In one possible implementation, before obtaining the first fitted boundary of the target parking area by fitting a straight line through at least some of the sampled points, the following is also included:
[0019] Based on the outlier states of the sampling points, multiple sampling points are filtered to obtain at least a portion of the sampling points used to fit the first fitting boundary.
[0020] In one possible implementation, multiple sampling points are filtered based on their outlier states to obtain at least a subset of sampling points for fitting a first fitting boundary, including:
[0021] Arbitrarily select two sampling points from multiple sampling points, determine the first straight line through the two sampling points, and obtain multiple first straight lines;
[0022] For each first straight line, calculate the distance from other sampling points to the first straight line, and count the number of sampling points whose distance is less than the preset distance;
[0023] Obtain the number of sampling points for each first straight line, and take the two sampling points that the target first straight line with the most sampling points passes through, as well as the multiple sampling points that are less than a preset distance from the target first straight line, as at least a portion of the sampling points used to fit the first fitting boundary.
[0024] One possible implementation also includes:
[0025] The outer corner points of the target parking area are updated based on the updated first fitted boundary to update the parking depth of the vehicle in the target parking area;
[0026] The parking space boundaries of the target parking area are updated based on the updated parking depth.
[0027] In one possible implementation, the outer corner points of the target parking area are updated based on the updated first fitted boundary, including:
[0028] Based on the initial detection position of the outer corner point of the target parking area, a perpendicular line is drawn to the updated first fitted boundary, and the foot of the perpendicular line on the updated first fitted boundary is taken as the outer corner point of the updated target parking area.
[0029] A second aspect of this application provides a vehicle including an ultrasonic sensor and a processor;
[0030] The processor acquires multiple sampling points of the target parking area obtained by the ultrasonic sensor;
[0031] The processor fits a straight line using at least some sampling points to obtain the first fitted boundary of the target parking area. The partial sampling points are the valid sampling points retained after interference filtering. The processor calculates the first angle between the first fitted boundary and the vehicle's side profile. Based on a preset mapping relationship between the first and second angles, the processor iteratively calculates the second angle multiple times. After each calculation of the second angle, the processor updates the first fitted boundary based on the calculated second angle, so that the first fitted boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship that characterizes the angular distortion caused by the oblique incidence detection of the ultrasonic sensor. The second angle is the angle between the first fitted boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
[0032] A third aspect of this application provides a parking area boundary updating device, which includes:
[0033] The sampling unit is used to acquire multiple sampling points in the target parking area through the vehicle's ultrasonic sensors;
[0034] A fitting unit is used to fit a straight line through at least a portion of the sampling points to obtain the first fitting boundary of the target parking area. The partial sampling points are: valid sampling points retained after interference screening.
[0035] The calculation unit is used to calculate the first angle value between the first fitting boundary and the side profile of the vehicle;
[0036] The update unit is used to iteratively calculate the second included angle value multiple times according to the preset mapping relationship between the first included angle value and the second included angle value, and update the first fitting boundary according to the second included angle value calculated each time, so that the first fitting boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship that characterizes the angle distortion generated by the oblique incident detection of the ultrasonic sensor. The second included angle value is the angle between the first fitting boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
[0037] The fourth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the parking area boundary update method of the first aspect or any implementation thereof.
[0038] Based on the above technical solution, this application provides a method, vehicle, and related device for updating the boundary of a parking area. When fitting the boundary of a parking area, this method collects multiple sampling points of the target parking area using the vehicle's ultrasonic sensor. A straight line is fitted based on at least some of the fitted sampling points to obtain a first fitted boundary. A second included angle value is calculated iteratively multiple times according to a preset mapping relationship between the first and second included angle values. The first fitted boundary is updated based on each calculated second included angle value, making the first fitted boundary continuously approach the target boundary. Since the target boundary is a virtual boundary of the target parking area, and a detection line within the detection range of the ultrasonic sensor is perpendicular to the target boundary, it is a reasonable boundary for approximating the parking space boundary after eliminating the linear straight line assumption. This method reduces the calculation error of the linear straight line assumption through iterative angle correction between the first fitted boundary and the target boundary. Furthermore, the angle correction references the angle distortion generated by the oblique incidence detection of the ultrasonic sensor, effectively improving the accuracy of angle correction and thus the accuracy of parking space boundary updates. Attached Figure Description
[0039] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0040] Figure 1 A flowchart illustrating a method for updating parking area boundaries provided in an embodiment of this application;
[0041] Figure 2 A schematic diagram illustrating the projected distance of a sampling point as provided in an embodiment of this application;
[0042] Figure 3 A schematic diagram showing a sampling point perpendicular to a first straight line, provided as an embodiment of this application;
[0043] Figure 4 A schematic diagram illustrating the detection error of an ultrasonic sensor provided in an embodiment of this application;
[0044] Figure 5 A schematic diagram illustrating the boundary error of a target parking area provided in an embodiment of this application;
[0045] Figure 6 A schematic diagram illustrating an outer corner point update provided in an embodiment of this application;
[0046] Figure 7 This is a schematic diagram of a parking area boundary updating device provided in an embodiment of this application. Detailed Implementation
[0047] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0048] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0049] The terms "first," "second," etc., used in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0050] In current automatic parking solutions, the overall performance of the automatic parking function and key indicators such as parking centering are not up to standard due to environmental interference in the parking area and the cumulative positioning error during the boundary update process. Therefore, it is necessary to further update the parking area boundary during the vehicle parking process.
[0051] Because ultrasonic sensors cannot determine the relative angle of the detected object's location using ultrasonic waves, they can only output the distance between the detected object and the vehicle. Common methods of updating boundaries using ultrasonic waves do not fully consider the detection characteristics of the ultrasonic sensors themselves. They often use relatively simple linear assumptions, resulting in inaccurate angle estimations and misjudgments of obstacle spatial positions, leading to errors in updating the parking area boundaries.
[0052] To address the aforementioned problems, this application provides a method for updating parking area boundaries. The method for updating parking area boundaries according to this application will be described in detail below with reference to the accompanying drawings.
[0053] Reference Figure 1 , Figure 1 A flowchart illustrating a method for updating parking area boundaries provided in this application embodiment is shown below. Figure 1 As shown in the figure, the method for updating the boundary of a parking area provided in this application embodiment may include steps S10 to S13, which are described in detail below.
[0054] S10. Obtain multiple sampling points in the target parking area using the vehicle's ultrasonic sensors.
[0055] The ultrasonic sensor is a sensor device that uses ultrasonic signals to measure distance or detect obstacles. It determines the distance and position of a target object by emitting ultrasonic waves and receiving the reflected echoes. Ultrasonic sensors are typically installed on the side or front and rear of the vehicle body, and their detection range can be fan-shaped. In this embodiment, the ultrasonic sensors mainly refer to multiple sensors on the side of the vehicle body, primarily installed at the wheel positions. The target parking area can refer to an area suitable for parking, such as a marked parking space or a semi-enclosed area formed by surrounding obstacles (such as adjacent vehicles, guardrails, etc.). A sampling point refers to a data point obtained by observing the target object. Each sampling point corresponds to a spatial coordinate position, used to characterize the geometric features of the target object. In this embodiment, the sampling point can specifically be the coordinate point of an obstacle detected by the ultrasonic sensor. This embodiment uses ultrasonic sensors for boundary updates. Compared to lidar, ultrasonic sensors are lower in cost and more versatile. Furthermore, this embodiment is insensitive to changes in the number and arrangement of ultrasonic sensors, making it applicable to different vehicle models and exhibiting good robustness.
[0056] Since the output value of an ultrasonic sensor is a distance value, the actual position of the obstacle point in two-dimensional space can be calculated from the distance value output by the ultrasonic sensor. The calculation formula is as follows:
[0057] ;
[0058] in, This can refer to the two-dimensional coordinates of the obstacle point; It can refer to the two-dimensional coordinates of the ultrasonic sensor's installation location; This could refer to the detection range of an ultrasonic sensor; This could refer to the installation angle of the ultrasonic sensor.
[0059] During vehicle movement or parking, ultrasonic sensors mounted on the side of the vehicle continuously emit ultrasonic signals and receive reflected echoes in each sampling cycle, acquiring multiple sampling points to form boundary observation data of the target parking area. Specifically, in this embodiment, the ultrasonic sensors continuously emit ultrasonic signals and continuously receive reflected echoes from obstacles, generating a series of obstacle point data. Since the subsequent boundary fitting process requires uniform sampling points, without points concentrated in one location, this embodiment calculates the projected distance of each obstacle point in the boundary direction during sampling. Only when the projected distance of an obstacle point meets a certain threshold is it used as a sampling point in this embodiment. The projected distance of an obstacle point can be calculated as follows: Figure 2 As shown, a target parking area is defined by a solid line. Within the virtual boundary AB of this target parking area, multiple sampling points (such as...) are collected by the ultrasonic sensors on the vehicle within their detection range. Figure 2 The multiple solid circles shown can be projected as indicated by the double-headed arrows, with the distance between the sampling points along the boundary direction of the virtual boundary AB being the distance indicated by the double-headed arrows. Figure 2 This is merely an example to simply illustrate the projected distance of sampling points. To avoid excessive memory and computing power consumption during sampling point acquisition, this embodiment employs a first-in, first-out (FIFO) strategy to limit the number of sampling points. When the limit is exceeded, the obstacle point with the earliest sampling time is deleted first, ensuring the total number of sampling points remains constant. This effectively avoids data accumulation and suppresses the impact of sensor errors on the sampling point identification results, providing a data foundation for subsequent outlier removal and line fitting.
[0060] The specific process for obtaining the sampling points described above can be as follows: During the sampling process, the distance between the target obstacle point and the adjacent sampling points in the boundary direction is calculated. If the distance between the target obstacle point and the adjacent sampling points meets the preset threshold, the target obstacle point is determined as the sampling point.
[0061] The target obstacle point can refer to a new obstacle point detected by the ultrasonic sensor at the current moment, and the adjacent sampling point can refer to the recorded obstacle point that is closest to the new obstacle point along the boundary direction. The specific value of the preset threshold can be flexibly adjusted according to the accuracy of the ultrasonic sensor, the parking environment, and the requirements for boundary accuracy. For example, in high-precision parking scenarios, the threshold can be appropriately reduced to ensure the density of sampling points.
[0062] In this embodiment, two boundary positioning points of the target parking area are first determined to determine the boundary direction of the target parking area. Then, based on the coordinates of the positioning points and the coordinates of the new obstacle point, the calculation result is used as the distance between the target obstacle point and the adjacent sampling point in the boundary direction. The specific calculation formula is as follows:
[0063] ;
[0064] in, This can refer to the distance between the target obstacle point and its adjacent sampling point along the boundary direction; It can refer to the coordinates of the target obstacle point; It can refer to the coordinates of a boundary location point; It could refer to the coordinates of another boundary location point.
[0065] S11. By fitting a straight line through at least some sampling points, the first fitting boundary of the target parking area is obtained.
[0066] The fitted line can refer to the straight line that best represents the distribution trend of a set of data points obtained by processing the data points using a mathematical fitting algorithm. Specifically, a fitting algorithm can be used to achieve line fitting, including least squares method, random sample consensus algorithm, etc. The first fitting boundary can refer to the initial estimated boundary of the parking area boundary fitted based on the sampling points obtained by the ultrasonic sensor.
[0067] In this embodiment, due to interference factors such as sensor noise or environmental interference, some interference points may exist in the collected sampling point set, such as outliers or points not linearly distributed. Since the presence of interference points can significantly affect the subsequent straight line fitting effect, this embodiment filters multiple sampling points based on their outlier status before fitting a straight line, obtaining at least a portion of the sampling points used to fit the first fitting boundary. These sampling points can be the effective sampling points retained after interference filtering. The sampling point filtering, combined with the limitation of projection distance during the ultrasonic sensor sampling stage, can effectively suppress the influence of sensor false detection on the sampling point identification result, eliminating the need for other forms of signal filtering, saving computational power, and exhibiting good compatibility with low-cost, noisy sensors. The specific process of sampling point filtering is as follows:
[0068] Two sampling points are arbitrarily selected from multiple sampling points. A first straight line is determined through these two sampling points, resulting in multiple first straight lines. For each first straight line, the distance from other sampling points to the first straight line is calculated, and the number of sampling points whose distance is less than a preset distance is counted. The number of sampling points for each first straight line is obtained. The two sampling points traversed by the target first straight line with the largest number of sampling points, as well as the multiple sampling points whose distance to the target first straight line is less than a preset distance, are used as at least a portion of the sampling points for fitting the first fitting boundary.
[0069] Taking a first straight line as an example, after obtaining the first straight line formed by any two sampling points, other sampling points can each draw perpendicular lines to this first straight line. The distance from each sampling point to the foot of the perpendicular (the length of the perpendicular line from each sampling point) is calculated. This distance can be used as the distance from other sampling points to the first straight line. Sampling points with a distance less than a preset distance can be considered valid sampling points of the first straight line, while sampling points with a distance not less than the preset distance can be considered interference points of the first straight line. Figure 3 As shown, there are four sampling points: sampling point 1, sampling point 2, sampling point 3, and sampling point 4. Connecting sampling point 1 and sampling point 2 creates a first straight line. Perpendicular lines are drawn from sampling point 3 and sampling point 4 to this first straight line. The distance from sampling point 3 to the foot of the perpendicular (the length of the perpendicular line from sampling point 3) can be used as the distance from sampling point 3 to the first straight line. Similarly, the distance from sampling point 4 to the foot of the perpendicular (the length of the perpendicular line from sampling point 4) can be used as the distance from sampling point 4 to the first straight line. Figure 3 This is merely an example to simply illustrate the aforementioned process.
[0070] The above operations can be performed on each first straight line to obtain the number of effective sampling points of each first straight line. Select the target first straight line with the largest number of effective sampling points, and select two sampling points that constitute the target first straight line and the effective sampling points of the target first straight line to participate in the subsequent line fitting.
[0071] After the above sampling point screening, it can be guaranteed that at least some of the obtained sampling points are free of duplicates, have uniform sampling, and are free of outlier interference. This embodiment can use the least squares method or other similar line fitting algorithms to fit a line based on the screened sampling points to obtain the first fitting boundary. The specific fitting process is as follows:
[0072] Suppose the expression for the straight line of the first fitting boundary is:
[0073] ;
[0074] To calculate the coefficients of the linear expression and And require fitting error The smallest, can be used separately for and The partial derivative can be obtained as follows:
[0075] ;
[0076] in, This can refer to the number of at least some sampling points used to fit the boundary; It can represent at least a portion of the sampling points used to fit the boundary. Values; It can represent at least a portion of the sampling points used to fit the boundary. Values.
[0077] After calculation, the coefficients are obtained. and Best estimate and Its representation can be as follows:
[0078] ;
[0079] Therefore, the formula for the straight line of the first fitting boundary can be obtained: .
[0080] Due to the detection principle of ultrasonic sensors, they can return the nearest obstacle within their detection range. Therefore, when the obstacle is not within the detection axis of the ultrasonic sensor, or when there is an angular difference between the obstacle and the ultrasonic sensor, the linear straight-line assumption will have an error in the spatial position of the obstacle (generally misjudging the position of the obstacle as being on the central axis of the ultrasonic sensor), resulting in angular errors in the boundary fitting.
[0081] like Figure 4 As shown, an ultrasonic sensor has an obstacle C within its fan-shaped detection range. The obstacle C has an angular difference from the ultrasonic sensor, causing the linear straight-line assumption to project the spatial position of obstacle C onto the location of the dashed line shape of obstacle C (located on the central axis of the ultrasonic sensor) when calculating the obstacle's spatial position. This results in an error in the spatial position of obstacle C. Due to this spatial position error, a fitting error exists at the boundary. Figure 5 As shown, the vehicle's ultrasonic sensor detects obstacles at two different times. Due to the aforementioned error, the detected obstacle positions at these two times differ, resulting in an error in the actual measurement line within the ultrasonic sensor's detection range. and Distorted into and (Perpendicular to the vehicle's centerline), therefore, the boundary fitted based on the obstacle position with errors. , and the virtual ideal boundary corresponding to the actual measurement line It has obvious deviations.
[0082] Therefore, in order to eliminate the influence of the spatial position error of the obstacle on the boundary detection, this embodiment adopts an iterative angle solution to eliminate the error.
[0083] S12. Calculate the first angle between the first fitted boundary and the vehicle side profile;
[0084] S13. Based on the preset mapping relationship between the first included angle value and the second included angle value, the second included angle value is calculated iteratively multiple times. After each calculation to obtain the second included angle value, the first fitting boundary is updated based on the second included angle value calculated each time, so that the first fitting boundary continuously approaches the target boundary.
[0085] The vehicle's side profile can refer to the projected lines or contours of the vehicle's side body, used to characterize the vehicle's side geometry. The first included angle value can refer to the angle between the first fitted boundary and the side profile, representing the relative angle between the vehicle's current posture and the first fitted boundary. The second included angle value can refer to the angle between the first fitted boundary and the target boundary, representing the relative angle between the first fitted boundary and the ideal boundary. The target boundary can refer to a virtual boundary of the target parking area, with a detection line within the ultrasonic sensor's detection range perpendicular to the target boundary, representing the ideal boundary after eliminating detection errors.
[0086] The preset mapping relationship between the first and second included angle values can refer to: a mathematical mapping relationship characterizing the angular distortion generated by the oblique incident detection of the ultrasonic sensor, which is a mathematical relationship between the first and second included angle values derived from the detection characteristics of the ultrasonic sensor. The relationship between the first and second included angle values can be as follows: Figure 5 As shown, Figure 5 As shown, the first included angle Second included angle value It can be constructed according to the relationships in the diagram. and The numerical relationship.
[0087] Specifically, in this embodiment, a preset mapping formula can be established based on a preset mapping relationship between the first included angle value and the second included angle value. This formula represents the preset mapping relationship between the first included angle value and the second included angle value. The form of the preset mapping formula can be as follows:
[0088] ;
[0089] in, It can represent the second included angle value; This can represent the first included angle value. The function's range is [-90°, 90°], and within this range, it gradually converges towards 0. Iterative calculations are performed based on this preset mapping formula, with the angle decreasing continuously after each iteration to gradually reduce the error. The iterative calculation process is as follows:
[0090] Step 1: Use the first included angle value as the current iteration value;
[0091] Step 2: Substitute the current iteration value into the preset mapping formula to calculate and obtain the second included angle value. The preset mapping formula is a formula that describes the preset mapping relationship between the first included angle value and the second included angle value.
[0092] Step 3: Update the first fitted boundary based on the second included angle value obtained in this calculation;
[0093] Step 4: Determine whether the angle difference between the current iteration value and the second angle value obtained in this calculation is less than the angle threshold. If the angle difference is not less than the angle threshold, then take the second angle value obtained in this calculation as the current iteration value and return to step 2; if the angle difference is less than the angle threshold, then proceed to step 5.
[0094] Step 5: Stop updating the first fitted boundary.
[0095] The angle threshold refers to a pre-set precision control parameter, which in this embodiment is 0.5°. The specific value of the angle threshold can be adjusted according to the sensor precision of different vehicle models or the requirements of parking scenarios. For example, in narrow parking spaces, a smaller angle threshold can be set to obtain higher boundary fitting accuracy. When the angle difference is not less than the angle threshold, it indicates that the current boundary has not reached the convergence condition and further iteration is needed. When the angle difference is less than the angle threshold, the fitted boundary is sufficiently close to the target boundary, and the benefit of further iteration is negligible. Therefore, convergence can be determined, and the iteration process can be stopped. This effectively ensures the accuracy of boundary updates, avoids infinite loops or waste of computational resources, and also meets the response speed requirements of the automatic parking process.
[0096] In the first iteration, the first included angle value is used as... Substitute the values into the preset mapping formula to obtain the second included angle value. The tangent value is used to determine the second included angle value. According to the second included angle value Rotate and correct the first fitted boundary. (Judgment) and If the angle difference is not less than the angle threshold, then the second included angle value calculated in this operation will be changed. As Substitute the values into the preset mapping formula to calculate the next second included angle value. The tangent value is used to determine the newly calculated second included angle value. According to the newly calculated second included angle value The first fitted boundary is rotated and corrected again, and this process is repeated until the second included angle value is calculated. The second included angle value calculated previously If the angle difference between the two is less than the angle threshold, the correction of the first fitting boundary is completed. Furthermore, in this embodiment, sampling points can be continuously collected according to the sampling period, and the boundary fitting is actively triggered. When the correction of the first fitting boundary is completed, it indicates that the boundary fitting is completed, until the next boundary fitting is triggered. Between the triggering of two boundary fittings, this embodiment can continuously collect sampling points according to the sampling period.
[0097] This embodiment utilizes the characteristics of ultrasonic sensors to customize, optimize, and iteratively correct the identification process, thereby improving the speed and accuracy of boundary recognition and enhancing overall parking performance.
[0098] Furthermore, after fitting and correcting the boundary of the target parking area, the final parking depth of the vehicle in the target parking area also needs to be considered. Since the final parking depth is related to the position of the outer corner point of the target parking area, this embodiment scans outside the target parking area to obtain the initial detection results of the outer corner point. Based on the updated first fitted boundary, the outer corner point of the target parking area is updated to update the parking depth of the vehicle in the target parking area, thereby realizing the dynamic correction of the parking depth of the vehicle. The parking space boundary of the target parking area is updated based on the updated parking depth.
[0099] Specifically, in this embodiment, based on the initial detection position of the outer corner point of the target parking area, a perpendicular line is drawn to the updated first fitted boundary. The foot of the perpendicular line on the updated first fitted boundary is taken as the outer corner point of the updated target parking area. A straight line is then extended based on the updated outer corner point to determine the parking space boundary of the final updated target parking area. For example... Figure 6 As shown, the initial boundary of the target parking area is detected, such as... Figure 6 As shown by the solid line boundary, the initial detection positions P1 and P2 of the outer corner points are obtained. After updating the two side boundaries of the target parking area, the perpendicular feet P1* and P2* of the outer corner points P1 and P2 on their corresponding boundaries are drawn respectively. P1* and P2* are used as the new outer corner points. A straight line of fixed length is extended along P1* and P2* to obtain the updated boundary of the target parking area, as shown. Figure 6 The dashed boundary line is shown.
[0100] This embodiment can adjust the parking posture of the vehicle according to the final updated parking space boundary, which can effectively improve the accuracy of vehicle parking and effectively avoid the risk of the front of the vehicle sticking out of the parking space or the rear of the vehicle colliding with obstacles behind it.
[0101] This application provides a method for updating the boundary of a parking area. When fitting the boundary of the parking area, the method collects multiple sampling points of the target parking area using an ultrasonic sensor on a vehicle. A straight line is fitted based on at least some of the fitted sampling points to obtain a first fitted boundary. A second included angle value is calculated iteratively multiple times according to a preset mapping relationship between the first and second included angle values. The first fitted boundary is updated based on each calculated second included angle value, making the first fitted boundary continuously approach the target boundary. Since the target boundary is a virtual boundary of the target parking area, and a detection line within the detection range of the ultrasonic sensor is perpendicular to the target boundary, it is a reasonable boundary that approximates the parking space boundary after eliminating the linear straight line assumption. This method reduces the calculation error of the linear straight line assumption through iterative angle correction between the first fitted boundary and the target boundary. Furthermore, the angle correction references the angle distortion generated by the oblique incidence detection of the ultrasonic sensor, which can effectively improve the accuracy of the angle correction and thus effectively improve the accuracy of the parking space boundary update.
[0102] The boundary update method in this embodiment can also be combined with other planning methods and perception schemes, exhibiting good portability. Furthermore, it can compensate for the limitations of visual perception in detecting obstacles within parking lines, obstacles in blind spots, and suspended obstacles.
[0103] The above describes a method for updating the boundary of a parking area provided by an embodiment of this application. The following describes a vehicle that applies the above-described method for updating the boundary of a parking area. The vehicle may include an ultrasonic sensor and a processor.
[0104] The processor acquires multiple sampling points of the target parking area obtained by the ultrasonic sensor;
[0105] The processor fits a straight line using at least some sampling points to obtain the first fitted boundary of the target parking area. The partial sampling points are the valid sampling points retained after interference filtering. The processor calculates the first angle between the first fitted boundary and the vehicle's side profile. Based on a preset mapping relationship between the first and second angles, the processor iteratively calculates the second angle multiple times. After each calculation of the second angle, the processor updates the first fitted boundary based on the calculated second angle, so that the first fitted boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship that characterizes the angular distortion caused by the oblique incidence detection of the ultrasonic sensor. The second angle is the angle between the first fitted boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
[0106] In one possible implementation, the processor iteratively calculates the second included angle value multiple times based on a preset mapping relationship between the first and second included angle values. After obtaining the second included angle value in each calculation, the processor updates the first fitting boundary based on the calculated second included angle value, so that the first fitting boundary continuously approaches the target boundary. This can be specifically configured as follows:
[0107] The first included angle value is used as the current iteration value; the current iteration value is substituted into the preset mapping formula to calculate the second included angle value. The preset mapping formula is a formula that describes the preset mapping relationship between the first included angle value and the second included angle value; the first fitting boundary is updated according to the second included angle value obtained in this calculation; it is determined whether the angle difference between the current iteration value and the second included angle value obtained in this calculation is less than the angle threshold. If the angle difference is not less than the angle threshold, the second included angle value obtained in this calculation is used as the current iteration value, and the process returns to the step of substituting the current iteration value into the preset mapping formula to calculate the second included angle value; if the angle difference is less than the angle threshold, the update of the first fitting boundary is stopped.
[0108] In one possible implementation, the ultrasonic sensor acquires multiple sampling points in the target parking area, which can be specifically configured as follows:
[0109] During the sampling process, the distance between the target obstacle point and the adjacent sampling point in the boundary direction is calculated. If the distance between the target obstacle point and the adjacent sampling point meets the preset threshold, the target obstacle point is determined as the sampling point.
[0110] In one possible implementation, before the processor obtains the first fitting boundary of the target parking area by fitting a straight line through at least some of the sampling points, the processor filters multiple sampling points based on the outlier state of the sampling points to obtain at least some sampling points for fitting the first fitting boundary.
[0111] In one possible implementation, the processor filters multiple sampling points based on their outlier states to obtain at least a subset of sampling points for fitting a first fitting boundary, which can be specifically configured as follows:
[0112] Two sampling points are arbitrarily selected from multiple sampling points. A first straight line is determined through these two sampling points, resulting in multiple first straight lines. For each first straight line, the distance from other sampling points to the first straight line is calculated, and the number of sampling points whose distance is less than a preset distance is counted. The number of sampling points for each first straight line is obtained. The two sampling points traversed by the target first straight line with the largest number of sampling points, as well as the multiple sampling points whose distance to the target first straight line is less than a preset distance, are used as at least a portion of the sampling points for fitting the first fitting boundary.
[0113] In one possible implementation, the processor updates the outer corner points of the target parking area based on the updated first fitted boundary to update the parking depth of the vehicle in the target parking area, and updates the parking space boundary of the target parking area based on the updated parking depth.
[0114] In one possible implementation, the processor updates the outer corner points of the target parking area based on the updated first fitted boundary, which can be specifically configured as follows:
[0115] Based on the initial detection position of the outer corner point of the target parking area, a perpendicular line is drawn to the updated first fitted boundary, and the foot of the perpendicular line on the updated first fitted boundary is taken as the outer corner point of the updated target parking area.
[0116] like Figure 7 As shown in the embodiments of this application, a parking area boundary updating device is also provided. The parking area boundary updating device may include:
[0117] The sampling unit 100 is used to acquire multiple sampling points of the target parking area through the vehicle's ultrasonic sensors;
[0118] Fitting unit 110 is used to fit a straight line through at least some sampling points to obtain the first fitting boundary of the target parking area. The partial sampling points are: valid sampling points retained after interference screening.
[0119] The calculation unit 120 is used to calculate the first angle value between the first fitting boundary and the side profile of the vehicle;
[0120] The update unit 130 is used to iteratively calculate the second included angle value multiple times according to the preset mapping relationship between the first included angle value and the second included angle value, and update the first fitting boundary according to the second included angle value calculated each time, so that the first fitting boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship that characterizes the angle distortion generated by the oblique incident detection of the ultrasonic sensor. The second included angle value is the angle between the first fitting boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
[0121] In one possible implementation, the update unit 130 iteratively calculates the second included angle value multiple times based on a preset mapping relationship between the first included angle value and the second included angle value. After obtaining the second included angle value in each calculation, the first fitting boundary is updated based on the calculated second included angle value, so that the first fitting boundary continuously approaches the target boundary. Specifically, this can be configured as follows:
[0122] The first included angle value is used as the current iteration value; the current iteration value is substituted into the preset mapping formula to calculate the second included angle value. The preset mapping formula is a formula that describes the preset mapping relationship between the first included angle value and the second included angle value; the first fitting boundary is updated according to the second included angle value obtained in this calculation; it is determined whether the angle difference between the current iteration value and the second included angle value obtained in this calculation is less than the angle threshold. If the angle difference is not less than the angle threshold, the second included angle value obtained in this calculation is used as the current iteration value, and the process returns to the step of substituting the current iteration value into the preset mapping formula to calculate the second included angle value; if the angle difference is less than the angle threshold, the update of the first fitting boundary is stopped.
[0123] In one possible implementation, the sampling unit 100 acquires multiple sampling points in the target parking area using the vehicle's ultrasonic sensors, and can be specifically configured as follows:
[0124] During the sampling process, the distance between the target obstacle point and the adjacent sampling point in the boundary direction is calculated. If the distance between the target obstacle point and the adjacent sampling point meets the preset threshold, the target obstacle point is determined as the sampling point.
[0125] In one possible implementation, the fitting unit 110 may also be configured to obtain the first fitting boundary of the target parking area before fitting a straight line through at least some of the sampling points:
[0126] Based on the outlier states of the sampling points, multiple sampling points are filtered to obtain at least a portion of the sampling points used to fit the first fitting boundary.
[0127] In one possible implementation, the fitting unit 110 filters multiple sampling points based on the outlier states of the sampling points to obtain at least a portion of the sampling points used to fit the first fitting boundary, which can be specifically configured as follows:
[0128] Two sampling points are arbitrarily selected from multiple sampling points. A first straight line is determined through these two sampling points, resulting in multiple first straight lines. For each first straight line, the distance from other sampling points to the first straight line is calculated, and the number of sampling points whose distance is less than a preset distance is counted. The number of sampling points for each first straight line is obtained. The two sampling points traversed by the target first straight line with the largest number of sampling points, as well as the multiple sampling points whose distance to the target first straight line is less than a preset distance, are used as at least a portion of the sampling points for fitting the first fitting boundary.
[0129] In one possible implementation, the update unit 130 can also be configured as follows:
[0130] The outer corner points of the target parking area are updated based on the updated first fitted boundary to update the parking depth of the vehicle in the target parking area; the parking space boundary of the target parking area is updated based on the updated parking depth.
[0131] In one possible implementation, the update unit 130 updates the outer corner points of the target parking area based on the updated first fitted boundary, which can be specifically configured as follows:
[0132] Based on the initial detection position of the outer corner point of the target parking area, a perpendicular line is drawn to the updated first fitted boundary, and the foot of the perpendicular line on the updated first fitted boundary is taken as the outer corner point of the updated target parking area.
[0133] This application also provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the parking area boundary update methods provided in this application.
[0134] This application also provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the parking area boundary update methods provided in this application.
[0135] It should also be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the system embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0136] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0137] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0138] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0139] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0140] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0141] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for updating the boundary of a parking area, characterized in that, The method for updating the parking area boundaries includes: Multiple sampling points in the target parking area are obtained using the vehicle's ultrasonic sensors; The first fitting boundary of the target parking area is obtained by fitting a straight line through at least a portion of the sampling points, wherein the portion of the sampling points are: valid sampling points retained after interference filtering; Calculate the first angle between the first fitted boundary and the side profile of the vehicle; Based on the preset mapping relationship between the first included angle value and the second included angle value, the second included angle value is calculated iteratively multiple times. After each calculation of the second included angle value, the first fitting boundary is updated based on the calculated second included angle value, so that the first fitting boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship that characterizes the angle distortion generated by the oblique incident detection of the ultrasonic sensor. The second included angle value is the angle between the first fitting boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
2. The method for updating the boundary of a parking area according to claim 1, characterized in that, The step of iteratively calculating the second included angle value multiple times based on a preset mapping relationship between the first included angle value and the second included angle value, and updating the first fitting boundary based on the calculated second included angle value after each calculation, so that the first fitting boundary continuously approaches the target boundary, includes: The first included angle value is used as the current iteration value; Substitute the current iteration value into the preset mapping formula to calculate and obtain the second included angle value. The preset mapping formula is a formula that describes the preset mapping relationship between the first included angle value and the second included angle value. The first fitted boundary is updated based on the second included angle value obtained in this calculation; Determine whether the angle difference between the current iteration value and the second angle value obtained in this calculation is less than an angle threshold. If the angle difference is not less than the angle threshold, then take the second angle value obtained in this calculation as the current iteration value and return to the step of substituting the current iteration value into the preset mapping formula to calculate and obtain the second angle value. If the angle difference is less than the angle threshold, then the update of the first fitting boundary is stopped.
3. The method for updating the boundary of a parking area according to claim 1, characterized in that, The method of acquiring multiple sampling points of the target parking area using the vehicle's ultrasonic sensors includes: During the sampling process, the distance between the target obstacle point and the adjacent sampling point in the boundary direction is calculated. If the distance between the target obstacle point and the adjacent sampling point meets the preset threshold, the target obstacle point is determined as a sampling point.
4. The method for updating the boundary of a parking area according to claim 1, characterized in that, Before obtaining the first fitted boundary of the target parking area by fitting a straight line through at least some sampling points, the method further includes: Based on the outlier state of the sampling points, multiple sampling points are filtered to obtain at least a portion of the sampling points used to fit the first fitting boundary.
5. The method for updating the boundary of a parking area according to claim 4, characterized in that, The step of filtering multiple sampling points based on their outlier states to obtain at least a subset of sampling points for fitting the first fitting boundary includes: Arbitrarily select two sampling points from multiple sampling points, determine the first straight line through the two sampling points, and obtain multiple first straight lines; For each first straight line, calculate the distance from other sampling points to the first straight line, and count the number of sampling points whose distance is less than a preset distance; Obtain the number of sampling points for each first straight line, and take the two sampling points that the target first straight line with the largest number of sampling points passes through, as well as a number of sampling points that are less than the preset distance from the target first straight line, as at least a portion of the sampling points used to fit the first fitting boundary.
6. The method for updating the boundary of a parking area according to claim 1, characterized in that, Also includes: The outer corner points of the target parking area are updated based on the updated first fitted boundary to update the parking depth of the vehicle in the target parking area; The parking space boundaries of the target parking area are updated based on the updated parking depth.
7. The method for updating the boundary of a parking area according to claim 6, characterized in that, Updating the outer corner points of the target parking area based on the updated first fitted boundary includes: Based on the initial detection position of the outer corner point of the target parking area, a perpendicular line is drawn to the updated first fitting boundary, and the foot of the perpendicular line on the updated first fitting boundary is taken as the updated outer corner point of the target parking area.
8. A vehicle, characterized in that, The vehicle includes ultrasonic sensors and a processor; The processor acquires multiple sampling points of the target parking area obtained by the ultrasonic sensor; The processor fits a straight line using at least a portion of the sampling points to obtain a first fitted boundary of the target parking area. The portion of the sampling points are valid sampling points retained after interference filtering. The processor calculates a first angle between the first fitted boundary and the side profile of the vehicle. Based on a preset mapping relationship between the first and second angles, the processor iteratively calculates the second angle multiple times. After each calculation of the second angle, the processor updates the first fitted boundary based on the calculated second angle, so that the first fitted boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship characterizing the angular distortion caused by the oblique incidence detection of the ultrasonic sensor. The second angle is the angle between the first fitted boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
9. A device for updating the boundary of a parking area, characterized in that, The device for updating the parking area boundary includes: The sampling unit is used to acquire multiple sampling points in the target parking area through the vehicle's ultrasonic sensors; A fitting unit is used to fit a straight line through at least a portion of the sampling points to obtain the first fitting boundary of the target parking area, wherein the portion of the sampling points are: valid sampling points retained after interference screening. The calculation unit is used to calculate the first angle value between the first fitting boundary and the side profile of the vehicle; The update unit is used to iteratively calculate the second included angle value multiple times according to the preset mapping relationship between the first included angle value and the second included angle value, and update the first fitting boundary according to the second included angle value calculated each time, so that the first fitting boundary continuously approaches the target boundary. The preset mapping relationship is a mathematical mapping relationship that characterizes the angle distortion generated by the oblique incident detection of the ultrasonic sensor. The second included angle value is the angle between the first fitting boundary and the target boundary. The target boundary is a virtual boundary of the target parking area, and a detection line in the detection range of the ultrasonic sensor is perpendicular to the target boundary.
10. A computer storage medium, characterized in that, The computer storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the parking area boundary update method as described in any one of claims 1 to 7.
